-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Cannot move access
from google_bigquery_dataset
#8165
Comments
Hey @olib963 does adding https://www.terraform.io/docs/configuration/meta-arguments/lifecycle.html#ignore_changes I don't believe there is a better way short of destroying and recreating the dataset with access unspecified |
I can't ignore changes since the Do we know why it is the case that removing all access blocks does not show a change in the desired state? For example if I change the resource to resource "google_bigquery_dataset" "private" {
dataset_id = "test-dataset"
friendly_name = "Test"
description = "Testing BQ Permissions"
location = "EU"
access {
role = "OWNER"
user_by_email = google_service_account.bqowner.email
}
} It completely understands it needs to remove the |
Yeah, when you remove the By moving to using the |
Also, I believe this feature request is for something that would help moving between these resources: #7486 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Currently terraform 0.13.5 and google provider 3.44.0, however is still an issue when attempted with 0.14.4 and 3.51.1 respectively.
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
I should be able to move the access definition from the dataset itself to separate resources. The reason for doing this is that currently we have a lot of
access
blocks and a change in any of them results in an ugly plan that removes allaccess
blocks, even the ones that don't change, then adds all the correct blocks. I thought that having each access block live on its own would make the changes in state much clearer.Actual Behavior
Removing all
access
blocks from a dataset however results in an empty plan and you cannot setaccess = []
since that results in a terraform error asking if "you meant you define an "access" block". This means we are unable to transition to thegoogle_bigquery_dataset_access
resource.Steps to Reproduce
terraform apply
the "before" terraform fileterraform plan
orterraform apply
the "after" file to see that no changes are detectedIdeally there would then be a step 3: uncomment new resources and
terraform apply
again to get access back.The text was updated successfully, but these errors were encountered: