-
Notifications
You must be signed in to change notification settings - Fork 187
bundle: Add postgres_roles resource #5467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
36c29a7
48d1701
efe72ff
02108c6
c253582
1bff84d
8768a75
9d89b35
ee1eb81
f102b28
b6a669d
91871b6
4360f21
c8b7a1e
79fb4fe
08473f8
9408669
81d6c10
b3bcfd3
f0f3b05
412d086
5976509
ea1f33c
06554de
935a4cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| bundle: | ||
| name: test-bundle | ||
|
|
||
| resources: | ||
| postgres_roles: | ||
| role1: | ||
| parent: projects/test-project/branches/main | ||
| role_id: test-role | ||
| postgres_role: app_role |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
|
|
||
| >>> [CLI] bundle deployment bind role1 projects/test-project/branches/main/roles/test-role --auto-approve | ||
| Updating deployment state... | ||
| Successfully bound postgres_role with an id 'projects/test-project/branches/main/roles/test-role' | ||
| Run 'bundle deploy' to deploy changes to your workspace | ||
|
|
||
| >>> [CLI] bundle summary | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this doesn't really show bind was successful, because it looks the same as after unbind |
||
| Name: test-bundle | ||
| Target: default | ||
| Workspace: | ||
| User: [USERNAME] | ||
| Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default | ||
| Resources: | ||
| Postgres roles: | ||
| role1: | ||
| Name: | ||
| URL: (not deployed) | ||
|
|
||
| >>> [CLI] bundle deployment unbind role1 | ||
| Updating deployment state... | ||
|
|
||
| >>> [CLI] bundle summary | ||
| Name: test-bundle | ||
| Target: default | ||
| Workspace: | ||
| User: [USERNAME] | ||
| Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default | ||
| Resources: | ||
| Postgres roles: | ||
| role1: | ||
| Name: | ||
| URL: (not deployed) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| ROLE_NAME="projects/test-project/branches/main/roles/test-role" | ||
| trace $CLI bundle deployment bind role1 "${ROLE_NAME}" --auto-approve | ||
| trace $CLI bundle summary | ||
|
|
||
| trace $CLI bundle deployment unbind role1 | ||
| trace $CLI bundle summary |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| Local = true | ||
| Cloud = false | ||
|
|
||
| Ignore = [ | ||
| ".databricks" | ||
| ] | ||
|
|
||
| [[Server]] | ||
| Pattern = "GET /api/2.0/postgres/projects/test-project/branches/main/roles/test-role" | ||
| Response.Body = ''' | ||
| { | ||
| "name": "projects/test-project/branches/main/roles/test-role", | ||
| "parent": "projects/test-project/branches/main", | ||
| "status": { | ||
| "postgres_role": "app_role" | ||
| } | ||
| } | ||
| ''' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| bundle: | ||
| name: test-bundle-$UNIQUE_NAME | ||
|
|
||
| resources: | ||
| postgres_projects: | ||
| project: | ||
| project_id: test-pg-project-$UNIQUE_NAME | ||
| display_name: Test Postgres Project | ||
|
|
||
| postgres_branches: | ||
| branch: | ||
| parent: ${resources.postgres_projects.project.name} | ||
| branch_id: test-branch-$UNIQUE_NAME | ||
| no_expiry: true | ||
|
|
||
| postgres_roles: | ||
| foo: | ||
| parent: ${resources.postgres_branches.branch.name} | ||
| role_id: test-role-$UNIQUE_NAME | ||
| postgres_role: app_role |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| bundle: | ||
| name: deploy-postgres-role-$UNIQUE_NAME | ||
|
|
||
| sync: | ||
| paths: [] | ||
|
|
||
| resources: | ||
| postgres_projects: | ||
| my_project: | ||
| project_id: test-pg-proj-$UNIQUE_NAME | ||
| display_name: "Test Project for Role" | ||
| pg_version: 16 | ||
| history_retention_duration: "604800s" | ||
|
|
||
| postgres_branches: | ||
| main: | ||
| parent: ${resources.postgres_projects.my_project.id} | ||
| branch_id: main | ||
| no_expiry: true | ||
|
|
||
| postgres_roles: | ||
| my_role: | ||
| parent: ${resources.postgres_branches.main.id} | ||
| role_id: test-role | ||
| postgres_role: app_role | ||
| attributes: | ||
| createdb: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/postgres/projects", | ||
| "q": { | ||
| "project_id": "test-pg-proj-[UNIQUE_NAME]" | ||
| }, | ||
| "body": { | ||
| "spec": { | ||
| "display_name": "Test Project for Role", | ||
| "history_retention_duration": "604800s", | ||
| "pg_version": 16 | ||
| } | ||
| } | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches", | ||
| "q": { | ||
| "branch_id": "main" | ||
| }, | ||
| "body": { | ||
| "spec": { | ||
| "no_expiry": true | ||
| } | ||
| } | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles", | ||
| "q": { | ||
| "role_id": "test-role" | ||
| }, | ||
| "body": { | ||
| "spec": { | ||
| "attributes": { | ||
| "createdb": true | ||
| }, | ||
| "postgres_role": "app_role" | ||
| } | ||
| } | ||
| } | ||
| { | ||
| "method": "GET", | ||
| "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/postgres/projects", | ||
| "q": { | ||
| "project_id": "test-pg-proj-[UNIQUE_NAME]" | ||
| }, | ||
| "body": { | ||
| "spec": { | ||
| "display_name": "Test Project for Role", | ||
| "history_retention_duration": "604800s", | ||
| "pg_version": 16 | ||
| } | ||
| } | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches", | ||
| "q": { | ||
| "branch_id": "main" | ||
| }, | ||
| "body": { | ||
| "parent": "projects/test-pg-proj-[UNIQUE_NAME]", | ||
| "spec": { | ||
| "no_expiry": true | ||
| } | ||
| } | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles", | ||
| "q": { | ||
| "role_id": "test-role" | ||
| }, | ||
| "body": { | ||
| "parent": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main", | ||
| "spec": { | ||
| "attributes": { | ||
| "createdb": true | ||
| }, | ||
| "postgres_role": "app_role" | ||
| } | ||
| } | ||
| } | ||
| { | ||
| "method": "GET", | ||
| "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role" | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.