Skip to content
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

Fix "SSL Mode and Require Connectors Support for AlloyDB (#9064)" to be backwards compatible #16202

Conversation

modular-magician
Copy link
Collaborator

This fixes commit GoogleCloudPlatform/magic-modules@5c05541 which introduced a backward incompatible change (permadiff) that will break all existing configurations. This PR fixes the permadiff by adding default_from_api to clientConnectionConfig.sslConfig.sslMode, clientConnectionConfig.sslConfig, and clientConnectionConfig. So now when the default value for clientConnectionConfig.sslConfig.sslMode is applied during create and update, the terraform state recognizes that it is there. Therefore, if the user doesn't specify this field when they create it and upon update continues to leave it unspecified, terraform recognizes that there is no change.

Release Note Template for Downstream PRs (will be copied)

alloydb: added `client_connection_config` field to `google_alloydb_instance` resource

Derived from GoogleCloudPlatform/magic-modules#9195

)" to be backwards compatible (hashicorp#9195)

* support to create instance with ssl mode and require connectors, with acceptance tests

* removed client_connection_config in basic instance example, and cleaned up the code a little bit

* attempts to set the default ssl mode in the custom code

* able to set default value during instance creation and addressing some comments

* trying to fix updating ssl mode

* fixed updating the instance with ssl mode

* cleaning up code and fixing acceptance tests

* Fixing spacing issues in instance.yaml

* fixing spacing issues again in instance.yaml

* fixing formatting in unit test

* fixing the acceptance tests for other alloydb resources by explicitly adding the clientconnectionconfig

* fixing spacing and removing commented out imports

* commenting out createInstanceWithMandatoryFields and createPrimaryAndReadPoolInstance tests because they're failing due to an unrelated service networking issue

* fix tests failing due to missing client_connection_config

* removing service networking resources from tests since there's a bug in service networking

* fix breaking change that causes a permadiff in terraform on update

* uncomment out the TestAccAlloydbInstance_createPrimaryAndReadPoolInstance and TestAccAlloydbInstance_createInstanceWithMandatoryFields tests

* remove private_ip_alloc from client connection config tests

* use BootstrapSharedServiceNetworkingConnection in tests instead of BootstrapSharedTestNetwork in tests

* add back in custom code

* remove commented out code

* fix formatting

* match network name to be the same format as the other acceptance tests in the file

* change network names in test
[upstream:dcd92717bf49490c8f7463cb98217ebdaba429e6]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit f9fe6bb into hashicorp:main Oct 10, 2023
4 checks passed
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant