Loading...
Loading...
Plan: 0 to add, 1 to change, 0 to destroy. 2025-02-11T17:00:54.147+0100 [DEBUG] command: asking for input: "\nDo you want to perform these actions?" We are using GCP terraform to modify some policies of one of our repositories of Artifact Registry and we keep getting an error when we try to remove or modify those policies. ### Terraform Version terraform-provider-google_v6.20.0 ```shell Terraform will perform the following actions: # google_artifact_registry_repository.eu_docker will be updated in-place ~ resource "google_artifact_registry_repository" "eu_docker" { id = "xxx/eu.gcr.io" name = "eu.gcr.io" # (12 unchanged attributes hidden) - cleanup_policies { - action = "KEEP" -> null - id = "keep-latest-tag" -> null - condition { - package_name_prefixes = [ - "product", ] -> null - tag_prefixes = [ - "latest", ] -> null - tag_state = "TAGGED" -> null - version_name_prefixes = [] -> null } } - cleanup_policies { - action = "KEEP" -> null - id = "keep-10-dry-run" -> null - most_recent_versions { - keep_count = 10 -> null - package_name_prefixes = [ - "xx", ] -> null } } + cleanup_policies { } # (1 unchanged block hidden) } Plan: 0 to add, 1 to change, 0 to destroy. 2025-02-11T17:00:54.147+0100 [DEBUG] command: asking for input: "\nDo you want to perform these actions?" Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/google/6.20.0/darwin_arm64/terraform-provider-google_v6.20.0_x5 pid=61069 error="exit status 2" 2025-02-11T17:01:32.762+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF" 2025-02-11T17:01:32.763+0100 [ERROR] plugin.(*GRPCProvider).ApplyResourceChange: error="rpc error: code = Unavailable desc = error reading from server: EOF" 2025-02-11T17:01:32.763+0100 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState to workingState for google_artifact_registry_repository.eu_docker 2025-02-11T17:01:32.763+0100 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState: writing state object for google_artifact_registry_repository.eu_docker 2025-02-11T17:01:32.764+0100 [TRACE] evalApplyProvisioners: google_artifact_registry_repository.eu_docker is not freshly-created, so no provisioning is required 2025-02-11T17:01:32.764+0100 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState to workingState for google_artifact_registry_repository.eu_docker 2025-02-11T17:01:32.764+0100 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState: writing state object for google_artifact_registry_repository.eu_docker 2025-02-11T17:01:32.764+0100 [ERROR] vertex "google_artifact_registry_repository.eu_docker" error: Plugin did not respond 2025-02-11T17:01:32.764+0100 [TRACE] vertex "google_artifact_registry_repository.eu_docker": visit complete, with errors 2025-02-11T17:01:32.764+0100 [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/hashicorp/google\"] (close)" errored, so skipping 2025-02-11T17:01:32.764+0100 [TRACE] dag/walk: upstream of "root" errored, so skipping 2025-02-11T17:01:32.764+0100 [DEBUG] states/remote: state read serial is: 92; serial is: 92 2025-02-11T17:01:32.764+0100 [DEBUG] states/remote: state read lineage is: 39ded337-045b-e6d0-1dd6-b537f3f23767; lineage is: 39ded337-045b-e6d0-1dd6-b537f3f23767 ╷ │ Error: Plugin did not respond │ │ with google_artifact_registry_repository.eu_docker, │ on eu_docker_repo.tf line 1, in resource "google_artifact_registry_repository" "eu_docker": │ 1: resource "google_artifact_registry_repository" "eu_docker" { │ │ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details. ╵ Stack trace from the terraform-provider-google_v6.20.0_x5 plugin: panic: interface conversion: interface {} is nil, not map[string]interface {} goroutine 205 [running]: github.com/hashicorp/terraform-provider-google/google/services/artifactregistry.mapHashID({0x0?, 0x0?}) github.com/hashicorp/terraform-provider-google/google/services/artifactregistry/resource_artifact_registry_repository.go:119 +0x94 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Set).hash(0x140013bab40?, {0x0?, 0x0?}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/set.go:221 +0x34 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Set).add(0x140013f0460, {0x0, 0x0}, 0x0) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/set.go:201 +0x6c github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readSet(0x140019081b0, {0x140013e9ea0, 0x1, 0x1}, 0x140013b9680) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/field_reader_config.go:287 +0x298 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0x140019081b0, {0x140013e9ea0, 0x1, 0x1}, 0x0) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/field_reader_config.go:110 +0x320 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).ReadField(0x103f7ce00?, {0x140013e9ea0?, 0x1032a789f?, 0x6?}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/field_reader_config.go:32 +0x84 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*MultiLevelFieldReader).ReadFieldExact(0x140013e9e90?, {0x140013e9ea0, 0x1, 0x1}, {0x1032a789f, 0x6}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/field_reader_multi.go:34 +0x78 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).get(0x14000295500, {0x140013e9ea0, 0x1, 0x1}, 0x0?) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource_data.go:551 +0xfc github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).getChange(0x14000295500, {0x1032c9864?, 0x10?}, 0x1?, 0x12) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource_data.go:527 +0x150 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).diffChange(0x14001f1ebc8?, {0x1032c9864?, 0x98?}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource_data.go:504 +0x44 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.diffSet(0x140017b97d0, {0x1046a01b8, 0x140011d2660}, {0x1032c9864, 0x10}, 0x140013b9680, 0x14001f1ef98, {0x1046a8c10, 0x14000295500}, 0x0) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/schema.go:1412 +0x5c github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.diff(0x140017b97d0, {0x1046a01b8, 0x140011d2660}, {0x1032c9864, 0x10}, 0x140013b9680, 0x14000295480, {0x1046a8c10, 0x14000295500}, 0x0) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/schema.go:1134 +0x180 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0x140017b97d0, {0x1046a01b8, 0x140011d2660}, 0x140011281a0, 0x1400113abe0, 0x0, {0x0, 0x0}, 0x0) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/schema.go:678 +0x298 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.diffFromValues({0x1046a01b8, 0x140011d2660}, {{{0x1046a0730?, 0x14000299cb8?}}, {0x103f79620?, 0x140012ec030?}}, {{{0x1046a0730?, 0x14000299da8?}}, {0x103f79620?, 0x140012ecae0?}}, ...) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/shims.go:46 +0x208 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.DiffFromValues(...) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/shims.go:23 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x140011f6fc0, {0x1046a01b8?, 0x140011d25a0?}, 0x14000683810) github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:1018 +0x500 github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0x140000b2680, {0x1046a01b8?, 0x140011d22d0?}, 0x14000683810) github.com/hashicorp/terraform-plugin-mux@v0.17.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x184 github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x14000196b40, {0x1046a01b8?, 0x140011a1890?}, 0x14001345180) github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov5/tf5server/server.go:865 +0x2a8 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x1045e9e20, 0x14000196b40}, {0x1046a01b8, 0x140011a1890}, 0x14000294780, 0x0) github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:611 +0x1c0 google.golang.org/grpc.(*Server).processUnaryRPC(0x140002be800, {0x1046a01b8, 0x140011a1800}, {0x1046ad520, 0x1400121e4e0}, 0x14001368120, 0x140012bd9b0, 0x106598538, 0x0) google.golang.org/grpc@v1.67.1/server.go:1394 +0xb64 google.golang.org/grpc.(*Server).handleStream(0x140002be800, {0x1046ad520, 0x1400121e4e0}, 0x14001368120) google.golang.org/grpc@v1.67.1/server.go:1805 +0xb20 google.golang.org/grpc.(*Server).serveStreams.func2.1() google.golang.org/grpc@v1.67.1/server.go:1029 +0x84 created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 12 google.golang.org/grpc@v1.67.1/server.go:1040 +0x13c Error: The terraform-provider-google_v6.20.0_x5 plugin crashed! This is always indicative of a bug within the plugin. It would be immensely helpful if you could report the crash with the plugin's maintainers so that it can be fixed. The output above should help diagnose the issue. 2025-02-11T17:01:32.838+0100 [DEBUG] provider: plugin exited ``` ### Expected Behavior Should remove the old policies, we also try to change those policies for other ones and also return the same error. (panic crash) ### Actual Behavior Right now is not working with 6.20 version and neither 6.19 nor 6.18 that we test it ### Steps to Reproduce 1. `terraform init` 2. `terraform plan` 3. `terraform apply` ### Additional Context We follow the documentation [here](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/artifact_registry_repository) ### References _No response_ ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.