Open shpml opened 11 months ago
I slso encountered this. As a workaround you can manually edit the TF state and add project
to a list of google_container_registry
resource attributes. Like this:
"attributes": {
"location": "some_location",
"project": "project_foobar" # <== added this one
I slso encountered this. As a workaround you can manually edit the TF state and add
project
to a list ofgoogle_container_registry
resource attributes. Like this:"attributes": { "location": "some_location", "project": "project_foobar" # <== added this one
Thanks for the workaround @aleks-m
For those working with remote state:
terraform state pull > default.tfstate
cp default.tfstate ../somewhere_else
terraform state push -force default.tfstate
Note that Container Registry is now deprecated in favor of Artifact Registry https://github.com/hashicorp/terraform-provider-google/issues/19661. FWIW, this looks like a bug in how the project field is handled by google_container_registry
specifically, but moving forward, I don't think this type of bucket management is needed at all.
Per https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr:
In Artifact Registry, there are no Cloud Storage buckets to manage in your Google Cloud projects. You perform image management actions directly on a repository.
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
Affected Resource(s)
google_container_registry
google_storage_bucket_iam_member
Terraform Configuration Files
Debug Output
Expected Behavior
The resources should not be replaced.
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
0000
b/306360857