Skip to content
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

fix: prevent disabling apis on destroy #296

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matthewdavidson
Copy link

@matthewdavidson matthewdavidson commented Mar 4, 2025

As per hashicorp/terraform-provider-google#18058, the default value of google_project_service.disable_on_destroy can be destructive if applying the terraform to an existing GCP project with resource defined outside of it. See related docs also. This PR sets it to false explicitly.

It also swaps the use of google_project_iam_binding and google_storage_bucket_iam_binding for google_project_iam_member and google_storage_bucket_iam_member respectively as they too can result in destructive changes to existing resources (see hashicorp/terraform-provider-google#5760 and hashicorp/terraform-provider-google#10903).

Copy link

google-cla bot commented Mar 4, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@matthewdavidson matthewdavidson changed the title prevent disabling apis on destroy fix: prevent disabling apis on destroy Mar 4, 2025
also use _iam_member over _iam_binding
@matthewdavidson matthewdavidson marked this pull request as ready for review March 4, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants