|
35 | 35 | JSON array of container names that need authorization configuration injection (RBAC/ABAC).
|
36 | 36 | Example: ["api", "store", "custom-service"]
|
37 | 37 | Required when using auth_model or auth_policy in container_configs.
|
| 38 | +<<<<<<< Updated upstream |
| 39 | +======= |
| 40 | + cloudsql_instances: |
| 41 | + required: false |
| 42 | + type: string |
| 43 | + description: >- |
| 44 | + Comma-separated list of CloudSQL instance connection names to add to the service. |
| 45 | + Example: "project:region:instance1,project:region:instance2" |
| 46 | + allow_unauthenticated: |
| 47 | + required: false |
| 48 | + type: boolean |
| 49 | + default: false |
| 50 | + description: "Whether to allow unauthenticated access to the service" |
| 51 | + |
| 52 | + |
| 53 | +>>>>>>> Stashed changes |
38 | 54 | outputs:
|
39 | 55 | url:
|
40 | 56 | description: "The deployed Cloud Run service URL."
|
@@ -185,10 +201,25 @@ jobs:
|
185 | 201 | - name: Deploy to Cloud Run
|
186 | 202 | id: deploy
|
187 | 203 | run: |
|
188 |
| - # Deploy the Knative YAML using gcloud |
189 |
| - gcloud run services replace service.deploy.yaml \ |
| 204 | + # Build the base deployment command |
| 205 | + DEPLOY_CMD="gcloud run services replace service.deploy.yaml \ |
190 | 206 | --region=${{ vars.PULUMI_GAR_LOCATION }} \
|
191 |
| - --project=${{ vars.PULUMI_GCP_PROJECT_ID }} |
| 207 | + --project=${{ vars.PULUMI_GCP_PROJECT_ID }}" |
| 208 | + |
| 209 | + # Add CloudSQL instances if specified |
| 210 | + if [ -n "${{ inputs.cloudsql_instances }}" ]; then |
| 211 | + DEPLOY_CMD="$DEPLOY_CMD --add-cloudsql-instances=${{ inputs.cloudsql_instances }}" |
| 212 | + echo "Adding CloudSQL instances: ${{ inputs.cloudsql_instances }}" |
| 213 | + fi |
| 214 | + |
| 215 | + # Add allow unauthenticated if specified |
| 216 | + if [ "${{ inputs.allow_unauthenticated }}" = "true" ]; then |
| 217 | + DEPLOY_CMD="$DEPLOY_CMD --allow-unauthenticated" |
| 218 | + echo "Allowing unauthenticated access" |
| 219 | + fi |
| 220 | + |
| 221 | + echo "Executing deployment command: $DEPLOY_CMD" |
| 222 | + eval $DEPLOY_CMD |
192 | 223 |
|
193 | 224 | echo "Service deployed successfully!"
|
194 | 225 |
|
|
0 commit comments