Move strr-api deployed DB access to Cloud SQL IAM auth - #1763
Open
Jacky-Pham wants to merge 5 commits into
Open
Conversation
Jacky-Pham
requested review from
JazzarKarim,
dimak1,
jimmypalelil and
thorwolpert
as code owners
July 8, 2026 22:00
Collaborator
|
Temporary Url for review: https://strr-hosts-dev--pr-1763-ciu8zc70.web.app |
Jacky-Pham
force-pushed
the
Jacky/alembic-service-account-ownership
branch
2 times, most recently
from
July 8, 2026 22:10
bc568e9 to
1834cc0
Compare
Jacky-Pham
force-pushed
the
Jacky/alembic-service-account-ownership
branch
from
July 8, 2026 22:20
1834cc0 to
16ef0a0
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



what changed
this moves
strr-apifrom password and socket database auth to Cloud SQL automatic IAM auth using the shared Python Connector andpg8000setup from bcgov/sbc-connect-common#77.local development and tests still use the current password settings when Cloud SQL runtime variables are not set.
DATABASE_USERNAMEis used by the api andDATABASE_MIGRATION_USERNAMEis used by migrationsDATABASE_OWNER_ROLEand the migration user usesSET ROLErelationship and dependency
this now uses the same Python Connector and pg8000 setup as #1764.
this pr and #1764 do not change the same files, so they can merge in either order after #77 is merged and the pins are updated.
the branch is pinned to the tested #77 commit through my fork for now. #77 needs to merge first, then i will update this to the bcgov merge commit and regenerate the lock before this merges.
before merge
merging to
mainstarts the deploy, so these need to be done first:DATABASE_INSTANCE_CONNECTION_NAME,DATABASE_IAM_USERNAME,DATABASE_MIGRATION_IAM_USERNAME,DATABASE_NAME, andDATABASE_OWNER_ROLEin 1Passwordbcrbk9-devfor dev,bcrbk9-testfor test and uat,bcrbk9-toolsfor sandbox, andbcrbk9-prodfor prodDATABASE_MIGRATION_USERNAME, because the deploy only runs the existing jobSET ROLE strrDATABASE_PASSWORD,DATABASE_HOST,DATABASE_PORT, andDATABASE_UNIX_SOCKETbecause the redeploy path keeps old variablestesting