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
google_compute_security_policy layer_7_ddos_defense_config forcing rule_visibility even though it's optional #17966
Comments
Hi @paololazzari! This ticket was replicated successfully with the provided configuration, versions and specifications, but after importing the resource and executing the
If you are importing a resource in your terraform files I suggest you to follow the next steps:
If you continue having problems after this share your |
@ggtisc can you confirm that when you attempted to reproduce this the resource did not have the |
As was mentioned in the above steps the unique initial code (step 1) was |
You misunderstood what this ticket is about. Of course if I copy the imported values to the resource no differences will be found. The problem here is that having imported an identical object, |
Yes, and as it was explained in the 1st message with a correct import of the resource the message in terminal was:
|
Hello @ggtisc , We are also facing a similar issue. We have and existing Security Policy which have "Adaptive Protection" Disabled on GCP Console. Our Terraform Configuration:
During terraform plan we are seeing below drift:
On the state file we have below configuration (this is same even after we tried your suggestion to import with empty resource block):
This seems to be an issue with "rule_visibility" argument. |
@RGMishan could you please raise a new ticket with the next information, or share it?
Also please mention if you are importing an existing |
Terraform Version
Terraform v1.7.2
on darwin_arm64
Affected Resource(s)
google_compute_security_policy
Terraform Configuration
Expected Behavior
terraform plan should not update the resource as there are no changes
Actual Behavior
I have imported an existing security policy. When I run
terraform plan
, I can see that terraform wants to add arule_visibility
field even though it's optional according to the documentation:The text was updated successfully, but these errors were encountered: