Skip to content

Commit

Permalink
Update Cloud SQL samples to Artifact Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
glasnt committed Nov 5, 2024
1 parent befee9d commit 711b987
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions sql-private-pool/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@ steps:
options:
pool:
name: projects/$PROJECT_ID/locations/us-central1/workerPools/private-pool
dynamic_substitutions: true
dynamicSubstitutions: true

substitutions:
_DATABASE_PASSWORD_KEY: database_password
_DATABASE_TYPE: postgres
_IMAGE_NAME: gcr.io/${PROJECT_ID}/sample-private-pool
_AR_REPO_REGION: us-central1
_AR_REPO_NAME: my-docker-repo
_IMAGE_NAME: ${_REGION}-docker.pkg.dev/${PROJECT_ID}/${_AR_REPO_NAME}/sample-private-pool

availableSecrets:
secretManager:
- versionName: projects/$PROJECT_ID/secrets/${_DATABASE_PASSWORD_KEY}/versions/latest
env: DATABASE_PASS
# [END cloudbuild_sql_private_pool]
# [END cloudbuild_sql_private_pool]
6 changes: 4 additions & 2 deletions sql-proxy/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ steps:
# [END cloudbuild_sql_proxy_socket]

options:
dynamic_substitutions: true
dynamicSubstitutions: true

substitutions:
_DATABASE_USER: myuser
Expand All @@ -87,7 +87,9 @@ substitutions:
_DATABASE_PORT: '5432'
_DATABASE_TYPE: postgres
_DATABASE_PASSWORD_KEY: database_password
_IMAGE_NAME: gcr.io/${PROJECT_ID}/sample-sql-proxy
_AR_REPO_REGION: us-central1
_AR_REPO_NAME: my-docker-repo
_IMAGE_NAME: ${_REGION}-docker.pkg.dev/${PROJECT_ID}/${_AR_REPO_NAME}/sample-sql-proxy

availableSecrets:
secretManager:
Expand Down

0 comments on commit 711b987

Please sign in to comment.