Open nickozilla opened 2 months ago
Hi @nickozilla
I tried to replicate this issue, but the result was successful without errors. In the tfstate
file each time the google_service_networking_vpc_service_controls.enable
property changes its value from true to false or false to true. On the other hand where there were not changes to apply the result was:
No changes. Your infrastructure matches the configuration.
I'm seeing the same thing. The output of the apply is successful but nothing happens and on the next apply the it tries to do the same thing. In the tf state, it stays false (while I'm trying to set it to true).
Note that the gcloud command behaves the same way: no explicit failure but doesn't enable it either.
Also, I have seen it worked before. It just that it seems it got itself in a state where it doesn't anymore.
in the TF logs I see:
2024-09-10T09:56:08.303+0200 [DEBUG] provider.terraform-provider-google_v5.41.0_x5: -----------------------------------------------------
2024-09-10T09:56:08.934+0200 [WARN] Provider "provider[\"registry.terraform.io/hashicorp/google\"]" produced an unexpected new value for google_service_networking_vpc_service_controls.bridge_service_networking, but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .enabled: was cty.True, but now cty.False
and
2024-09-10T09:56:08.936+0200 [DEBUG] State storage *remote.State declined to persist a state snapshot
If I delete and recreate the associated google_service_networking_connection
, it starts behaving correctly again.
After some tries it wasn't possible to replicate the behavior. I'm forwarding this ticket because maybe this is an intermittent issue
Community Note
Terraform Version & Provider Version(s)
Terraform v1.8.5 on
Affected Resource(s)
google_service_networking_vpc_service_controls
Terraform Configuration
Debug Output
No response
Expected Behavior
Setting
enabled = true
on the resource should have the same effect as:or setting
enabled = false
on the resource should have the same effect as:Actual Behavior
In actuality, this seemingly has no effect at all, instead showing a permadiff on the resource:
If the vpc-peerings vpc-service-controls for servicenetworking.googleapis.com starts as disabled and I use terraform to enable it, I get a clean apply, but no actual change, the same is true in reverse
Steps to reproduce
terraform apply
Important Factoids
No response
References
No response
b/365815185