-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Flaky test: TestAccNetworkSecuritySecurityProfile_networkSecuritySecurityProfileOverridesExample #20970
Flaky test: TestAccNetworkSecuritySecurityProfile_networkSecuritySecurityProfileOverridesExample #20970
Comments
I've created GoogleCloudPlatform/magic-modules#12814 to fix this. |
Hi @duvni Could you please share with us the terraform code you are using WITHOUT USING MODULES, VARIABLES or LOCALS to ensure this is an issue as well as being clearer with the steps? For sensitive data you could use examples like:
|
Sorry, I'll share a more detailed reproduction steps that I take, I'm not making any changes to the code just running one of the existing tests:
An example of a failure:
Alternatively, you can run a terraform script, creating only one resource:
You will see that after initially applying this and creating the security profile, subsequent calls to |
Hi @duvni I got a 404 trying to clone the repository and this could be a more complex process than just copy-pasting the code of the resources, but after using the shared code which is the same as the terraform registry examples (link here) everything works as expected without errors or diffs, even if there are no changes and just running new Could you please share the Also please confirm us if you are using modules, locals or variables for your base resource |
Not sure why you would get a 404 trying to clone the repository, this is the official link to clone this repository in GitHub's UI (via the Code drop-down menu on the main page). The steps to run the tests are based on the official dev-guide for working with magic modules: My recent attempt was with:
But I also tried Terraform v1.9.6 As for modules/locals/variable, I'm not using any, it's a simple resource used as-is like the example. Are you sure you terraform apply did actually create the SP with the overrides? You can verify with gcloud using:
You should also see that if you describe the resource multiple times it's not guaranteed that the specific overrides will always return in the same order. |
Thanks for your support here and through chat @duvni I confirmed the |
Community Note
Error example:
This happens because the
severityOverrides
andthreatOverrides
properties ofthreatPreventionProfile
are incorrectly marked as Array instead of Set which is their real internal representation.Terraform Version & Provider Version(s)
Terraform v1.9.6
on linux_amd64
Your version of Terraform is out of date! The latest version
is 1.10.4. You can update by downloading from https://www.terraform.io/downloads.html
Affected Resource(s)
google_network_security_security_profile
Terraform Configuration
No response
Debug Output
No response
Expected Behavior
No response
Actual Behavior
No response
Steps to reproduce
make testacc TEST=./google/services/networksecurity TESTARGS='-run=TestAccNetworkSecuritySecurityProfile_networkSecuritySecurityProfileOverridesExample'
Important Factoids
No response
References
No response
b/391927028
The text was updated successfully, but these errors were encountered: