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

resource/aws_rds_global_cluster: Add force_destroy and source_db_cluster_identifier arguments, add global_cluster_members attribute #14487

Merged

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Aug 6, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #10965

Release note for CHANGELOG:

* resource/aws_rds_global_cluster: Add `force_destroy` and `source_db_cluster_identifier` arguments
* resource/aws_rds_global_cluster: Add `global_cluster_members` attribute

Attempting to add Computed: true to the aws_rds_cluster resource to match the Terraform core contract that the value will be potentially filled in by the API outside of configuration prevents practitioners from being able to successfully remove a DB Cluster from the Global Cluster, even with setting the value to "". This is likely a bug in the Terraform Plugin SDK, but its behavior has likely been present for so long that attempting to fix it would present its own major problems for providers. For now, just document ignore_changes as the implementation.

Output from acceptance testing:

--- PASS: TestAccAWSRdsGlobalCluster_disappears (11.01s)
--- PASS: TestAccAWSRdsGlobalCluster_Engine_Aurora (14.06s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_AuroraPostgresql (14.18s)
--- PASS: TestAccAWSRdsGlobalCluster_basic (14.27s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_AuroraMySQL (14.55s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_Aurora (14.72s)
--- PASS: TestAccAWSRdsGlobalCluster_DeletionProtection (21.99s)
--- PASS: TestAccAWSRdsGlobalCluster_DatabaseName (23.70s)
--- PASS: TestAccAWSRdsGlobalCluster_StorageEncrypted (25.16s)
--- PASS: TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier (168.11s)

@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 6, 2020
@bflad bflad requested a review from a team August 6, 2020 02:58
@ghost ghost added size/L Managed by automation to categorize the size of a PR. service/rds Issues and PRs that pertain to the rds service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Aug 6, 2020
@phani308
Copy link

phani308 commented Aug 6, 2020

@bflad Which AWS provider version are you planning to release this in?

…ter_identifier arguments, add global_cluster_members attribute

Reference: #10965

Output from acceptance testing:

```
--- PASS: TestAccAWSRdsGlobalCluster_disappears (11.01s)
--- PASS: TestAccAWSRdsGlobalCluster_Engine_Aurora (14.06s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_AuroraPostgresql (14.18s)
--- PASS: TestAccAWSRdsGlobalCluster_basic (14.27s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_AuroraMySQL (14.55s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_Aurora (14.72s)
--- PASS: TestAccAWSRdsGlobalCluster_DeletionProtection (21.99s)
--- PASS: TestAccAWSRdsGlobalCluster_DatabaseName (23.70s)
--- PASS: TestAccAWSRdsGlobalCluster_StorageEncrypted (25.16s)
--- PASS: TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier (168.11s)
```
@bflad bflad force-pushed the f-aws_rds_global_cluster-source_db_cluster_identifier branch from 9341ff3 to 106cc5d Compare August 6, 2020 04:28
@anGie44 anGie44 self-requested a review August 6, 2020 18:55
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Output of acceptance tests:

--- PASS: TestAccAWSRdsGlobalCluster_DatabaseName (24.07s)
--- PASS: TestAccAWSRdsGlobalCluster_DeletionProtection (24.72s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_Aurora (18.20s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_AuroraMySQL (17.95s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_AuroraPostgresql (17.04s)
--- PASS: TestAccAWSRdsGlobalCluster_Engine_Aurora (17.20s)
--- PASS: TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier (160.59s)
--- PASS: TestAccAWSRdsGlobalCluster_StorageEncrypted (25.82s)
--- PASS: TestAccAWSRdsGlobalCluster_basic (17.98s)
--- PASS: TestAccAWSRdsGlobalCluster_disappears (14.17s)

"global_cluster_identifier": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"global_cluster_members": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@bflad bflad added this to the v3.1.0 milestone Aug 6, 2020
@bflad bflad merged commit ee5f917 into master Aug 6, 2020
@bflad bflad deleted the f-aws_rds_global_cluster-source_db_cluster_identifier branch August 6, 2020 23:31
bflad added a commit that referenced this pull request Aug 6, 2020
@ghost
Copy link

ghost commented Aug 7, 2020

This has been released in version 3.1.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Sep 6, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Sep 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERROR when creating an Aurora RDS global cluster and snapshot_identifier is defined
3 participants