-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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_alloydb_cluster throws error when psc_config or network_config values are passed using dynamic block #18481
Comments
network,network_config.0.network,psc_config.0.psc_enabled
must be specified when using dynamic block
Hi @imrannayer! I noticed that in your code for the variable You could follow this example to test the resource and the go to implement changes on your variables and dynamic code. |
@ggtisc for PSC setup |
Both issues are different, the issue you are sharing looks like a permadiff, but to confirm that we need the full code. And this one is just a mistake in the configuration, besides the invalid value on the The problem you are facing is related to how you are using the dynamic blocks in Terraform to configure the network ( You need to have something like this:
Explanation of the changes:
With these changes, the bug related to invalid combination of arguments should be resolved, as at least one of the required values ( I suggest you to try first the basic example configuration without using variables and dynamic blocks and then when you are completely sure it works fine you could implement the dynamic blocks. |
@ggtisc I dont see any difference in your code and mine. You just changed logic for executing once by putting "1" instead of a string. They both will produce same result. I executed your code and here is the error:
|
If this is the same issue as the one you shared maybe it could be better to share the simplified code to confirm the permadiff on |
@ggtisc user is executing example provided with the module. In order to resolve that issue I need to make both network_config and psc_config blocks dynamic so we dont face the issue. But making both of them dynamic is throwing error. Thats why I provided simple example in this issue to show whats happening. |
After some tries it isn't possible to replicate this issue, the result was the same (successfully without errors) even with the shared module example. This looks more like troubleshooting than a bug. If you have the code that triggers the result of this issue please share it, with all the steps:
|
For the issue mentioned in the module if you execute terraform apply twice you will get the error. You will get error in cross region replica cluster. |
Confirmed issue! To clarify the issue since several configurations and different steps to follow were shared. This is the correct order:
|
Community Note
Terraform Version & Provider Version(s)
Terraform v1.7.5
on darwin_amd64
Affected Resource(s)
google_alloydb_cluster
Terraform Configuration
OR
Debug Output
https://gist.github.com/imrannayer/c2ca657e5ba4a731febf15949f8e7acb
Expected Behavior
It should work fine as the value of
psc_config.0.psc_enabled
is providedActual Behavior
getting following error
Steps to reproduce
terraform apply
Important Factoids
No response
References
No response
b/349388135
The text was updated successfully, but these errors were encountered: