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_cluster: Add scaling_configuration argument #5531

Merged
merged 1 commit into from
Aug 22, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Aug 13, 2018

Closes #5505

Changes proposed in this pull request:

  • Supports, documents, and tests scaling_configuration argument

Output from acceptance testing:

25 tests passed (all tests)
=== RUN   TestAccAWSRDSCluster_missingUserNameCausesError
--- PASS: TestAccAWSRDSCluster_missingUserNameCausesError (3.11s)
=== RUN   TestAccAWSRDSCluster_encrypted
--- PASS: TestAccAWSRDSCluster_encrypted (96.90s)
=== RUN   TestAccAWSRDSCluster_basic
--- PASS: TestAccAWSRDSCluster_basic (97.03s)
=== RUN   TestAccAWSRDSCluster_importBasic
--- PASS: TestAccAWSRDSCluster_importBasic (97.47s)
=== RUN   TestAccAWSRDSCluster_EngineVersion
--- PASS: TestAccAWSRDSCluster_EngineVersion (97.88s)
=== RUN   TestAccAWSRDSCluster_takeFinalSnapshot
--- PASS: TestAccAWSRDSCluster_takeFinalSnapshot (107.17s)
=== RUN   TestAccAWSRDSCluster_updateIamRoles
--- PASS: TestAccAWSRDSCluster_updateIamRoles (109.33s)
=== RUN   TestAccAWSRDSCluster_backupsUpdate
--- PASS: TestAccAWSRDSCluster_backupsUpdate (109.48s)
=== RUN   TestAccAWSRDSCluster_updateTags
--- PASS: TestAccAWSRDSCluster_updateTags (109.89s)
=== RUN   TestAccAWSRDSCluster_generatedName
--- PASS: TestAccAWSRDSCluster_generatedName (110.47s)
=== RUN   TestAccAWSRDSCluster_BacktrackWindow
--- PASS: TestAccAWSRDSCluster_BacktrackWindow (111.82s)
=== RUN   TestAccAWSRDSCluster_kmsKey
--- PASS: TestAccAWSRDSCluster_kmsKey (116.06s)
=== RUN   TestAccAWSRDSCluster_iamAuth
--- PASS: TestAccAWSRDSCluster_iamAuth (127.13s)
=== RUN   TestAccAWSRDSCluster_namePrefix
--- PASS: TestAccAWSRDSCluster_namePrefix (140.39s)
=== RUN   TestAccAWSRDSCluster_updateCloudwatchLogsExports
--- PASS: TestAccAWSRDSCluster_updateCloudwatchLogsExports (149.98s)
=== RUN   TestAccAWSRDSCluster_ScalingConfiguration
--- PASS: TestAccAWSRDSCluster_ScalingConfiguration (199.63s)
=== RUN   TestAccAWSRDSCluster_Port
--- PASS: TestAccAWSRDSCluster_Port (231.78s)
=== RUN   TestAccAWSRDSCluster_EngineMode
--- PASS: TestAccAWSRDSCluster_EngineMode (305.28s)
=== RUN   TestAccAWSRDSCluster_SnapshotIdentifier
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier (332.92s)
=== RUN   TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds (304.43s)
=== RUN   TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds_Tags
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds_Tags (304.11s)
=== RUN   TestAccAWSRDSCluster_SnapshotIdentifier_Tags
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_Tags (323.34s)
=== RUN   TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode (353.52s)
=== RUN   TestAccAWSRDSCluster_s3Restore
--- PASS: TestAccAWSRDSCluster_s3Restore (1392.56s)
=== RUN   TestAccAWSRDSCluster_EncryptedCrossRegionReplication
--- PASS: TestAccAWSRDSCluster_EncryptedCrossRegionReplication (1506.91s)

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service. labels Aug 13, 2018
@bflad bflad requested a review from a team August 13, 2018 14:09
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Aug 13, 2018
@w32-blaster
Copy link
Contributor

Any idea when will be this released?

@bflad
Copy link
Contributor Author

bflad commented Aug 16, 2018

We don't generally slot issues/pull requests for specific releases unless its an important crash/bug fix, but this one is just awaiting review from another maintainer. Hopefully in the next release since its pretty straightforward. 😄

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

LGTM minus the minor comments

DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)),
Engine: aws.String(d.Get("engine").(string)),
EngineMode: aws.String(d.Get("engine_mode").(string)),
ScalingConfiguration: expandRdsScalingConfiguration(d.Get("scaling_configuration").([]interface{})),
Copy link
Member

Choose a reason for hiding this comment

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

Should we do a d.GetOk since scaling_configuration is optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In many cases, we allow the expand functions to return nil when it is not defined in the Terraform configuration -- this saves the extra logic of d.GetOk() each time we invoke these functions as well as prevents potential panics relating to zero elements or the first element being empty.

@@ -481,7 +519,8 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error
Engine: aws.String(d.Get("engine").(string)),
EngineMode: aws.String(d.Get("engine_mode").(string)),
ReplicationSourceIdentifier: aws.String(d.Get("replication_source_identifier").(string)),
Tags: tags,
ScalingConfiguration: expandRdsScalingConfiguration(d.Get("scaling_configuration").([]interface{})),
Copy link
Member

Choose a reason for hiding this comment

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

Should we do a d.GetOk since scaling_configuration is optional.

EngineMode: aws.String(d.Get("engine_mode").(string)),
MasterUserPassword: aws.String(d.Get("master_password").(string)),
MasterUsername: aws.String(d.Get("master_username").(string)),
ScalingConfiguration: expandRdsScalingConfiguration(d.Get("scaling_configuration").([]interface{})),
Copy link
Member

Choose a reason for hiding this comment

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

Should we do a d.GetOk since scaling_configuration is optional.

@bflad bflad force-pushed the f-aws_rds_cluster-scaling_configuration branch from 548448e to 4fa5760 Compare August 22, 2018 14:04
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Aug 22, 2018
@bflad bflad added this to the v1.33.0 milestone Aug 22, 2018
@bflad bflad force-pushed the f-aws_rds_cluster-scaling_configuration branch from 4fa5760 to 525009c Compare August 22, 2018 14:15
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Aug 22, 2018
@bflad
Copy link
Contributor Author

bflad commented Aug 22, 2018

Rebased against master for the merge conflict, CI still shows green, merging!

@bflad bflad merged commit 2f28cd8 into master Aug 22, 2018
@bflad bflad deleted the f-aws_rds_cluster-scaling_configuration branch August 22, 2018 14:23
bflad added a commit that referenced this pull request Aug 22, 2018
@bflad
Copy link
Contributor Author

bflad commented Aug 22, 2018

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

@ghost
Copy link

ghost commented Apr 3, 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 Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Support RDS Aurora Serverless Scaling Configuration
3 participants