-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Cloud Functions with Cloud Run to avoid permadiffs #749
Comments
nacnudus
added a commit
that referenced
this issue
Feb 20, 2025
Close #749 Permadiffs cause `terraform apply` to redeploy cloud functions unnecessarily, and it is currently also unbinding service accounts from IAM permissions, which has caused the overnight batch of `publishing-api` to fail. It also seems to interfere with the `google_bigquery_job` that registers the remote function in BigQuery. Now that Cloud Functions are a wrapper around Cloud Run, there would be no functional difference if we were to refactor the Cloud Functions as Cloud Run instances directly. The Dockerfile would make testing easier, and would be offset by being able to delete the double-handling in Terraform of creating both a Cloud Run instance and a Cloud Function wrapper. An existing Cloud Run instance to use as a pattern is terraform/html-to-text.tf and the corresponding source code docker/html-to-text.
nacnudus
added a commit
that referenced
this issue
Feb 20, 2025
Close #749 Permadiffs cause `terraform apply` to redeploy cloud functions unnecessarily, and it is currently also unbinding service accounts from IAM permissions, which has caused the overnight batch of `publishing-api` to fail. It also seems to interfere with the `google_bigquery_job` that registers the remote function in BigQuery. Now that Cloud Functions are a wrapper around Cloud Run, there would be no functional difference if we were to refactor the Cloud Functions as Cloud Run instances directly. The Dockerfile would make testing easier, and would be offset by being able to delete the double-handling in Terraform of creating both a Cloud Run instance and a Cloud Function wrapper. An existing Cloud Run instance to use as a pattern is terraform/html-to-text.tf and the corresponding source code docker/html-to-text.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Permadiffs cause
terraform apply
to redeploy cloud functions unnecessarily, and it is currently also unbinding service accounts from IAM permissions, which has caused the overnight batch ofpublishing-api
to fail. It also seems to interfere with thegoogle_bigquery_job
that registers the remote function in BigQuery.The best I can do to prevent the permadiffs is to copy an MD5 hash from a
terraform plan
into hard-coded config, and then runterraform apply
. Certain fields must also be ignored, which gives to rise to an incorrect warning. Besides being a pain, this is hardly any easier than manually redeploying a function.Now that Cloud Functions are a wrapper around Cloud Run, there would be no functional difference if we were to refactor the Cloud Functions as Cloud Run instances directly. The Dockerfile would make testing easier, and would be offset by being able to delete the double-handling in Terraform of creating both a Cloud Run instance and a Cloud Function wrapper. An existing Cloud Run instance to use as a pattern is terraform/html-to-text.tf and the corresponding source code docker/html-to-text.
The text was updated successfully, but these errors were encountered: