jason baker
02/01/2024, 4:30 PMprefect.yaml
configuration to call the GCP secret manager and add env variables when starting jobs would be ideal.Cameron Raynor
02/02/2024, 5:44 AMprefect_gcp
GcpCredentials
block can then authenticate using application default credentials by calling GcpCredentials()
without any arguments.
These credentials can then be used with the read_secret
task without storing any credentials in the Prefect secret manager.Cameron Raynor
02/02/2024, 5:48 AM```json
...
"variabes": {
"service_account_name": {
"type": "string",
"title": "Service Account Name",
"example": "<mailto:service-account@example.iam.gserviceaccount.com|service-account@example.iam.gserviceaccount.com>",
"description": "The name of the service account to use for the task execution of Cloud Run Job. By default Cloud Run jobs run as the default Compute Engine Service Account. "
}
...
},
"job_configuration": {
...
"job_body": {
...
"template": {
"template": {
...
"maxRetries": "{{ max_retries }}",
"serviceAccount": "{{ service_account_name }}" # <-- added to job template
}
},
"launchStage": "{{ launch_stage }}"
}
...
}
```