Skip to content

Commit b2d2d25

Browse files
committed
fix: For security reasons, move deploy secrets to Google Cloud Secret Manager
1 parent 8602382 commit b2d2d25

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

.github/scripts/deploy-app-engine.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ echo "Image: $IMAGE_NAME:$IMAGE_TAG"
2323
echo "Version: $IMAGE_TAG"
2424
echo "Service Account: $SERVICE_ACCOUNT"
2525
echo "App YAML: $APP_YAML_PATH"
26+
echo "Environment Variables: Will be loaded from Secret Manager via app.yaml"
2627

2728
# Deploy to App Engine using the pre-built image
2829
gcloud app deploy "$APP_YAML_PATH" \

.github/workflows/deploy-production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
run: |
8383
echo "Verifying image was pushed to GitHub Container Registry..."
8484
docker pull ${{ env.IMAGE_NAME }}:${{ github.sha }}
85-
echo "Image successfully pushed and can be pulled"
85+
echo "Image successfully pushed and can be pulled"
8686
8787
# Deploy to App Engine using pre-built Docker image from GitHub Container Registry
8888
deploy:

gcp/policyengine_household_api/app.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,13 @@ liveness_check:
1717
success_threshold: 2
1818
readiness_check:
1919
path: "/readiness-check"
20-
app_start_timeout_sec: 600
20+
app_start_timeout_sec: 600
21+
22+
# Environment variables loaded from Google Cloud Secret Manager
23+
env_variables:
24+
AUTH0_ADDRESS_NO_DOMAIN: "projects/policyengine-household-api/secrets/AUTH0_ADDRESS_NO_DOMAIN/versions/latest"
25+
AUTH0_AUDIENCE_NO_DOMAIN: "projects/policyengine-household-api/secrets/AUTH0_AUDIENCE_NO_DOMAIN/versions/latest"
26+
USER_ANALYTICS_DB_USERNAME: "projects/policyengine-household-api/secrets/USER_ANALYTICS_DB_USERNAME/versions/latest"
27+
USER_ANALYTICS_DB_PASSWORD: "projects/policyengine-household-api/secrets/USER_ANALYTICS_DB_PASSWORD/versions/latest"
28+
USER_ANALYTICS_DB_CONNECTION_NAME: "projects/policyengine-household-api/secrets/USER_ANALYTICS_DB_CONNECTION_NAME/versions/latest"
29+
ANTHROPIC_API_KEY: "projects/policyengine-household-api/secrets/ANTHROPIC_API_KEY/versions/latest"

0 commit comments

Comments
 (0)