GoogleCloudPlatform / terraform-dynamic-python-webapp

Deploy a dynamic python webapp
avocano.dev
Apache License 2.0
65 stars 38 forks source link

fix: add depends_on between cloud run service and IAM #244

Closed glasnt closed 2 months ago

glasnt commented 2 months ago

Reported failures trying to delete deployments tell a tale of woe:

Error: Error setting IAM policy for cloudrun service (service): googleapi: 
Error 404: Resource (service) of kind 'SERVICE' in region (region) in
project (project) does not exist.

In theory, this is because the terraform destory is removing the google_cloud_run_v2_service before the google_cloud_run_service_iam_policy.

Given that, this PR adds a depends_on to the policy, which in theory should ensure a dependency graph where the policy is removed before the service.

Also bumps avocano version to current latest (dependency updates)