magic-modules
magic-modules copied to clipboard
Add support AlloyDB for PostgreSQL
Part of #11754
If this PR is for Terraform, I acknowledge that I have:
- [x] Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
- [x] Generated Terraform, and ran
make test
andmake lint
to ensure it passes unit and linter tests. - [x] Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
- [x] Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
- [x] Read the Release Notes Guide before writing my release note below.
Release Note Template for Downstream PRs (will be copied)
google_alloydb_cluster
google_alloydb_instance
Hello! I am a robot who works on Magic Modules PRs.
I've detected that you're a community contributor. @melinath, a repository maintainer, has been assigned to assist you and help review your changes.
:question: First time contributing? Click here for more details
Your assigned reviewer will help review your code by:
- Ensuring it's backwards compatible, covers common error cases, etc.
- Summarizing the change into a user-facing changelog note.
- Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.
You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.
If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 2 files changed, 253 insertions(+)) Terraform Beta: Diff ( 8 files changed, 1537 insertions(+), 2 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-)) TF OiCS: Diff ( 4 files changed, 117 insertions(+))
Tests analytics
Total tests: 2070
Passed tests 1840
Skipped tests: 226
Failed tests: 4
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccFirebaserulesRelease_BasicRelease|TestAccAlloydbCluster_alloydbClusterBasicExample
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 2 files changed, 311 insertions(+)) Terraform Beta: Diff ( 8 files changed, 1897 insertions(+), 2 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-)) TF OiCS: Diff ( 4 files changed, 117 insertions(+))
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 2 files changed, 317 insertions(+)) Terraform Beta: Diff ( 8 files changed, 1917 insertions(+), 2 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-)) TF OiCS: Diff ( 4 files changed, 120 insertions(+))
Tests analytics
Total tests: 2070
Passed tests 1840
Skipped tests: 226
Failed tests: 4
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccAlloydbCluster_alloydbClusterBasicExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation
Tests passed during RECORDING mode:
TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation
[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
[view]
TestAccFirebaserulesRelease_BasicRelease
[view]
Tests failed during RECORDING mode:
TestAccAlloydbCluster_alloydbClusterBasicExample
[view]
Please fix these to complete your PR View the build log or the debug log for each test
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 3 files changed, 506 insertions(+)) Terraform Beta: Diff ( 12 files changed, 3024 insertions(+), 2 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-)) TF OiCS: Diff ( 8 files changed, 248 insertions(+))
Tests analytics
Total tests: 2071
Passed tests 1841
Skipped tests: 226
Failed tests: 4
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccAlloydbInstance_alloydbInstanceBasicExample|TestAccAlloydbCluster_alloydbClusterBasicExample
Tests passed during RECORDING mode:
TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation
[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
[view]
Tests failed during RECORDING mode:
TestAccAlloydbCluster_alloydbClusterBasicExample
[view]
TestAccAlloydbInstance_alloydbInstanceBasicExample
[view]
Please fix these to complete your PR View the build log or the debug log for each test
I've enabled the AlloyDB API and am rerunning tests /gcbrun
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 3 files changed, 506 insertions(+)) Terraform Beta: Diff ( 12 files changed, 3024 insertions(+), 2 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-)) TF OiCS: Diff ( 8 files changed, 248 insertions(+))
Thanks melinath, i was wondering why it fails as locally it passed 😢
Tests analytics
Total tests: 2074
Passed tests 1843
Skipped tests: 226
Failed tests: 5
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccAlloydbInstance_alloydbInstanceBasicExample|TestAccAlloydbCluster_alloydbClusterBasicExample|TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
Tests passed during RECORDING mode:
TestAccAlloydbCluster_alloydbClusterBasicExample
[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
[view]
TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation
[view]
TestAccFirebaserulesRelease_BasicRelease
[view]
Tests failed during RECORDING mode:
TestAccAlloydbInstance_alloydbInstanceBasicExample
[view]
Please fix these to complete your PR View the build log or the debug log for each test
Thanks melinath, ill address all of these. can you point me to a generated update example by any chance?
can you point me to a generated update example by any chance?
I should've clarified, sorry - I believe that update examples need to be handwritten. Here's an example: https://github.com/GoogleCloudPlatform/magic-modules/blob/a37b67b9a6abd47b53f56b95e2411ac2d3a4c755/mmv1/third_party/terraform/tests/resource_compute_disk_test.go.erb#L235
It looks like downstream generation is currently failing with the following error:
RuntimeError: quantity_based_retention does not exist
This is probably due to my suggested changes and I'm not sure offhand what the underlying cause is. I'll mark this PR for review to remind myself I need to look into it when I get a chance.
moving to draft
Reassigning this review since I won't be able to respond next week. Remaining work is https://github.com/GoogleCloudPlatform/magic-modules/pull/6208#discussion_r917047197
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 3 files changed, 520 insertions(+)) Terraform Beta: Diff ( 12 files changed, 3145 insertions(+), 2 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-)) TF OiCS: Diff ( 8 files changed, 247 insertions(+))
Tests analytics
Total tests: 0
Passed tests 0
Skipped tests: 0
Failed tests: 0
Errors occurred during REPLAYING mode. Please fix them to complete your PR View the build log
This is hitting an error due to the OperationWaitTime method signature requiring a project, and the call from AlloyDBInstance not using a project. I think this is actually a bug with magic modules, and I'm unsure how to correct it at the moment.
The autogenerated asynchronous functions are built per product, not per resource. The parent cluster resource requires a project in the base_url
while the child instance resource implies the project from the parent reference. I've tried to find examples of this being remediated in other resources but could not find a similar scenario, so this may be the first time autogen_async
has been used in a parent-child resource combination in mmv1.
Thanks c2thorn, ill think how i can work around this. maybe i can split this PR and push cluster resource? (not a lot of value of just it though without instance)
alternatively i can revert the parent
arg change and pass those as separate args as it worked before?
alternatively i can revert the
parent
arg change and pass those as separate args as it worked before?
yeah if it works well without it, then that would fix this particular issue. I haven't fully reviewed yet, but using the cluster in the base URL is essentially just a convenience here right?
Yep it worked beside some other CR comments, I’ll tidy up the PR with that change.
On Mon, 11 Jul 2022 at 23:14 Cameron Thornton @.***> wrote:
alternatively i can revert the parent arg change and pass those as separate args as it worked before?
yeah if it works well without it, then that would fix this particular issue. I haven't fully reviewed yet, but using the cluster in the base URL is essentially just a convenience here right?
— Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/magic-modules/pull/6208#issuecomment-1180823834, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIA2W7SMTAJ4SOEYDKVWDQTVTR6DJANCNFSM52LY5NLQ . You are receiving this because you authored the thread.Message ID: @.***>
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 5 files changed, 714 insertions(+)) Terraform Beta: Diff ( 14 files changed, 3400 insertions(+), 2 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-)) TF OiCS: Diff ( 8 files changed, 266 insertions(+))
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 5 files changed, 552 insertions(+)) Terraform Beta: Diff ( 14 files changed, 3400 insertions(+), 2 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-)) TF OiCS: Diff ( 8 files changed, 266 insertions(+))
Tests analytics
Total tests: 2112
Passed tests 1878
Skipped tests: 226
Failed tests: 8