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

r/db_instance: deprecate name and add db_name #22668

Merged
merged 6 commits into from
Feb 7, 2022

Conversation

anGie44
Copy link
Contributor

@anGie44 anGie44 commented Jan 19, 2022

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 #22071
Requires #21457

Output from acceptance testing:


@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/rds Issues and PRs that pertain to the rds service. size/M Managed by automation to categorize the size of a PR. labels Jan 19, 2022
anGie44 added a commit that referenced this pull request Jan 19, 2022
@anGie44 anGie44 added this to the v4.0.0 milestone Jan 20, 2022
@anGie44 anGie44 force-pushed the release/4.x branch 4 times, most recently from 1e894e8 to 6623846 Compare January 21, 2022 16:39
@anGie44 anGie44 force-pushed the release/4.x branch 6 times, most recently from e604544 to 18688a6 Compare January 28, 2022 22:24
anGie44 added a commit that referenced this pull request Jan 28, 2022
@anGie44 anGie44 force-pushed the f-deprecate-db-instance-name branch from 7a9bdbb to b91dad3 Compare January 28, 2022 22:33
@github-actions github-actions bot added provider Pertains to the provider itself, rather than any interaction with AWS. and removed provider Pertains to the provider itself, rather than any interaction with AWS. labels Jan 28, 2022
anGie44 added a commit that referenced this pull request Jan 28, 2022
@anGie44 anGie44 force-pushed the f-deprecate-db-instance-name branch from b91dad3 to 38a8363 Compare January 28, 2022 22:34
@github-actions github-actions bot added the provider Pertains to the provider itself, rather than any interaction with AWS. label Jan 28, 2022
anGie44 added a commit that referenced this pull request Jan 28, 2022
@anGie44 anGie44 force-pushed the f-deprecate-db-instance-name branch from 38a8363 to 567fa37 Compare January 28, 2022 22:35
@github-actions github-actions bot removed the provider Pertains to the provider itself, rather than any interaction with AWS. label Jan 28, 2022
anGie44 added a commit that referenced this pull request Jan 28, 2022
@anGie44 anGie44 force-pushed the f-deprecate-db-instance-name branch from 567fa37 to 16500f3 Compare January 28, 2022 22:39
Base automatically changed from release/4.x to main January 31, 2022 22:59
anGie44 added a commit that referenced this pull request Feb 1, 2022
@anGie44 anGie44 force-pushed the f-deprecate-db-instance-name branch from 16500f3 to b097383 Compare February 1, 2022 00:12
@anGie44 anGie44 force-pushed the f-deprecate-db-instance-name branch from b097383 to e8473f5 Compare February 3, 2022 18:53
@anGie44 anGie44 marked this pull request as ready for review February 3, 2022 18:55
@anGie44 anGie44 force-pushed the f-deprecate-db-instance-name branch from 333e28c to a1c7dbd Compare February 3, 2022 18:59
@ewbankkit ewbankkit self-requested a review February 4, 2022 13:13
@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Feb 4, 2022
@ewbankkit
Copy link
Contributor

I added some acceptance tests for the name db_name argument:

% make testacc TESTARGS='-run=TestAccRDSInstance_basic\|TestAccRDSInstance_NameDeprecated_basic\|TestAccRDSInstance_s3Import_basic\|TestAccRDSInstance_s3Import_NameDeprecated_basic' PKG=rds
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 20  -run=TestAccRDSInstance_basic\|TestAccRDSInstance_NameDeprecated_basic\|TestAccRDSInstance_s3Import_basic\|TestAccRDSInstance_s3Import_NameDeprecated_basic -timeout 180m
=== RUN   TestAccRDSInstance_basic
=== PAUSE TestAccRDSInstance_basic
=== RUN   TestAccRDSInstance_NameDeprecated_basic
=== PAUSE TestAccRDSInstance_NameDeprecated_basic
=== RUN   TestAccRDSInstance_s3Import_basic
=== PAUSE TestAccRDSInstance_s3Import_basic
=== RUN   TestAccRDSInstance_s3Import_NameDeprecated_basic
=== PAUSE TestAccRDSInstance_s3Import_NameDeprecated_basic
=== CONT  TestAccRDSInstance_basic
=== CONT  TestAccRDSInstance_NameDeprecated_basic
=== CONT  TestAccRDSInstance_s3Import_basic
=== CONT  TestAccRDSInstance_s3Import_NameDeprecated_basic
--- PASS: TestAccRDSInstance_basic (350.26s)
--- PASS: TestAccRDSInstance_NameDeprecated_basic (382.64s)
=== CONT  TestAccRDSInstance_s3Import_NameDeprecated_basic
    instance_test.go:1614: Step 1/2 error: Error running apply: exit status 1
        
        Error: unexpected state 'incompatible-restore', wanted target 'available, storage-optimization'. last error: %!s(<nil>)
        
          with aws_db_instance.test,
          on terraform_plugin_test.tf line 107, in resource "aws_db_instance" "test":
         107: resource "aws_db_instance" "test" {
        
=== CONT  TestAccRDSInstance_s3Import_basic
    instance_test.go:1580: Step 1/2 error: Error running apply: exit status 1
        
        Error: unexpected state 'incompatible-restore', wanted target 'available, storage-optimization'. last error: %!s(<nil>)
        
          with aws_db_instance.test,
          on terraform_plugin_test.tf line 107, in resource "aws_db_instance" "test":
         107: resource "aws_db_instance" "test" {
        
--- FAIL: TestAccRDSInstance_s3Import_basic (852.41s)
--- FAIL: TestAccRDSInstance_s3Import_NameDeprecated_basic (915.40s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/rds        921.182s
FAIL
make: *** [testacc] Error 1

The failures are unrelated to this change., we have been getting them in nightly CI:

=== RUN   TestAccRDSInstance_s3Import
=== PAUSE TestAccRDSInstance_s3Import
=== CONT  TestAccRDSInstance_s3Import
instance_test.go:1244: Step 1/1 error: Error running apply: exit status 1
Error: unexpected state 'incompatible-restore', wanted target 'available, storage-optimization'. last error: %!s(<nil>)
with aws_db_instance.s3,
on terraform_plugin_test.tf line 124, in resource "aws_db_instance" "s3":
124: resource "aws_db_instance" "s3" {
testing_new.go:70: Error running post-test destroy, there may be dangling resources: exit status 1
Error: error waiting for DB Instance (tf-acc-s3-import-test-1349059545549743240-db) delete: unexpected state 'incompatible-restore', wanted target ''. last error: %!s(<nil>)
--- FAIL: TestAccRDSInstance_s3Import (653.34s)

@YakDriver YakDriver self-assigned this Feb 7, 2022
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

% make testacc TESTS=TestAccRDSInstance_ PKG=rds
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSInstance_'  -timeout 180m
--- SKIP: TestAccRDSInstance_ReplicateSourceDB_deletionProtection (0.00s)
--- SKIP: TestAccRDSInstance_SnapshotIdentifier_Tags_Clear (0.00s)
--- SKIP: TestAccRDSInstance_CoIPEnabled_restoreToPointInTime (2.16s)
--- SKIP: TestAccRDSInstance_CoIPEnabled_snapshotIdentifier (2.19s)
--- SKIP: TestAccRDSInstance_coIPEnabled (2.23s)
--- SKIP: TestAccRDSInstance_CoIPEnabled_enabledToDisabled (2.40s)
--- SKIP: TestAccRDSInstance_CoIPEnabled_disabledToEnabled (2.71s)
--- FAIL: TestAccRDSInstance_MSSQL_domain (9.70s)
--- FAIL: TestAccRDSInstance_EnabledCloudWatchLogsExports_msSQL (7.46s)
--- SKIP: TestAccRDSInstance_ec2Classic (0.81s)
--- PASS: TestAccRDSInstance_EnabledCloudWatchLogsExports_postgresql (432.29s)
--- PASS: TestAccRDSInstance_basic (444.94s)
--- FAIL: TestAccRDSInstance_MSSQL_domainSnapshotRestore (2.63s)
--- PASS: TestAccRDSInstance_caCertificateIdentifier (504.80s)
--- FAIL: TestAccRDSInstance_MSSQL_tz (2.48s)
--- PASS: TestAccRDSInstance_minorVersion (540.15s)
--- PASS: TestAccRDSInstance_cloudWatchLogsExport (556.12s)
--- PASS: TestAccRDSInstance_noDeleteAutomatedBackups (686.54s)
--- PASS: TestAccRDSInstance_EnabledCloudWatchLogsExports_mySQL (819.26s)
--- PASS: TestAccRDSInstance_PerformanceInsightsEnabled_disabledToEnabled (836.34s)
--- PASS: TestAccRDSInstance_performanceInsightsRetentionPeriod (975.93s)
--- PASS: TestAccRDSInstance_PerformanceInsightsEnabled_enabledToDisabled (1066.46s)
--- PASS: TestAccRDSInstance_portUpdate (600.24s)
--- PASS: TestAccRDSInstance_NoNationalCharacterSet_oracle (1158.17s)
--- PASS: TestAccRDSInstance_performanceInsightsKMSKeyID (1183.03s)
--- PASS: TestAccRDSInstance_NationalCharacterSet_oracle (1203.08s)
--- PASS: TestAccRDSInstance_EnabledCloudWatchLogsExports_oracle (1202.03s)
--- PASS: TestAccRDSInstance_RestoreToPointInTime_sourceIdentifier (1247.59s)
--- PASS: TestAccRDSInstance_separateIopsUpdate (679.93s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_io1Storage (1523.81s)
--- PASS: TestAccRDSInstance_RestoreToPointInTime_sourceResourceID (1565.68s)
--- PASS: TestAccRDSInstance_MonitoringRoleARN_removedToEnabled (734.80s)
--- PASS: TestAccRDSInstance_license (1636.80s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_performanceInsightsEnabled (1799.19s)
--- PASS: TestAccRDSInstance_MonitoringRoleARN_enabledToRemoved (839.98s)
--- FAIL: TestAccRDSInstance_SnapshotIdentifier_multiAZ_sqlServer (2.42s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_allocatedStorage (1372.22s)
--- PASS: TestAccRDSInstance_MonitoringRoleARN_enabledToDisabled (841.29s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_performanceInsightsEnabled (2067.27s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_vpcSecurityGroupIDs_tags (942.70s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_multiAZ (1712.37s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_AssociationRemoved (1338.33s)
--- FAIL: TestAccRDSInstance_s3Import_nameGenerated (929.39s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_nameGenerated (1116.61s)
--- PASS: TestAccRDSInstance_monitoringInterval (1137.16s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_backupRetentionPeriod (1750.58s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_namePrefix (1184.94s)
--- FAIL: TestAccRDSInstance_SnapshotIdentifier_parameterGroupName (760.98s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_basic (1214.58s)
--- PASS: TestAccRDSInstance_MySQL_snapshotRestoreWithEngineVersion (2085.90s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_vpcSecurityGroupIDs (1203.68s)
--- FAIL: TestAccRDSInstance_s3Import_namePrefix (1049.12s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_tags (1184.88s)
--- FAIL: TestAccRDSInstance_s3Import_NameDeprecated_basic (939.14s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_port (1186.85s)
--- FAIL: TestAccRDSInstance_s3Import_basic (1033.78s)
--- FAIL: TestAccRDSInstance_ReplicateSourceDBDBSubnetGroupName_ramShared (558.08s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_parameterGroupName_sameSetOnBoth (1414.58s)
--- FAIL: TestAccRDSInstance_SnapshotIdentifier_DBSubnetGroupName_ramShared (610.03s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_monitoring (1397.45s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_maxAllocatedStorage (1345.14s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_maintenanceWindow (1364.47s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_vpcSecurityGroupIDs (1207.09s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_iamDatabaseAuthenticationEnabled (1407.97s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_caCertificateIdentifier (1386.23s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_port (1315.05s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_multiAZ (1900.77s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_parameterGroupName_setOnReplica (1436.35s)
--- PASS: TestAccRDSInstance_ReplicateSourceDBDBSubnetGroupName_vpcSecurityGroupIDs (1745.89s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_monitoring (1151.34s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_parameterGroupName_replicaCopiesValue (1443.34s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_backupWindow (1334.58s)
--- PASS: TestAccRDSInstance_FinalSnapshotIdentifier_skipFinalSnapshot (609.57s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_maxAllocatedStorage (1076.68s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_parameterGroupName_differentSetOnBoth (1494.69s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_dbSubnetGroupName (1691.53s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_iamDatabaseAuthenticationEnabled (1178.38s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_maintenanceWindow (1215.26s)
--- PASS: TestAccRDSInstance_password (479.59s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_replicaMode (2341.44s)
--- PASS: TestAccRDSInstance_maxAllocatedStorage (617.07s)
--- PASS: TestAccRDSInstance_allowMajorVersionUpgrade (535.26s)
--- PASS: TestAccRDSInstance_isAlreadyBeingDeleted (473.85s)
--- FAIL: TestAccRDSInstance_DBSubnetGroupName_ramShared (34.41s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_deletionProtection (1281.60s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_DBSubnetGroupName_vpcSecurityGroupIDs (1276.15s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_autoMinorVersionUpgrade (1262.76s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_availabilityZone (1327.77s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_parameterGroupTwoStep (2826.43s)
--- PASS: TestAccRDSInstance_iamAuth (443.02s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_allowMajorVersionUpgrade (1343.74s)
--- PASS: TestAccRDSInstance_DBSubnetGroupName_vpcSecurityGroupIDs (457.81s)
--- PASS: TestAccRDSInstance_deletionProtection (493.84s)
--- PASS: TestAccRDSInstance_replicateSourceDB_namePrefix (1126.91s)
--- PASS: TestAccRDSInstance_dbSubnetGroupName (457.24s)
--- PASS: TestAccRDSInstance_replicateSourceDB_addLater (1241.55s)
--- FAIL: TestAccRDSInstance_ReplicateSourceDB_allocatedStorage (1320.76s)
--- PASS: TestAccRDSInstance_nameGenerated (488.76s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_allocatedStorageAndIops (1647.47s)
--- PASS: TestAccRDSInstance_onlyMajorVersion (319.65s)
--- PASS: TestAccRDSInstance_replicateSourceDB_nameGenerated (1419.81s)
--- PASS: TestAccRDSInstance_finalSnapshotIdentifier (925.40s)
--- PASS: TestAccRDSInstance_NameDeprecated_basic (332.00s)
--- PASS: TestAccRDSInstance_optionGroup (529.10s)
--- PASS: TestAccRDSInstance_namePrefix (446.20s)
--- PASS: TestAccRDSInstance_kmsKey (483.78s)
--- PASS: TestAccRDSInstance_replicateSourceDB_basic (1293.19s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_autoMinorVersionUpgrade (984.46s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_availabilityZone (1099.31s)
--- PASS: TestAccRDSInstance_subnetGroup (888.77s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_backupWindow (1285.55s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_dbSubnetGroupName (1266.39s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_backupRetentionPeriod_override (1278.52s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_iops (2554.85s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_allowMajorVersionUpgrade (1843.20s)
--- PASS: TestAccRDSInstance_SnapshotIdentifier_backupRetentionPeriod_unset (1819.07s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/rds	6992.134s

Failures are seen in nightly and/or fixed by required PR.

@github-actions github-actions bot added the service/mq Issues and PRs that pertain to the mq service. label Feb 7, 2022
@github-actions github-actions bot removed the service/mq Issues and PRs that pertain to the mq service. label Feb 7, 2022
@anGie44 anGie44 merged commit 7875c87 into main Feb 7, 2022
@anGie44 anGie44 deleted the f-deprecate-db-instance-name branch February 7, 2022 23:45
github-actions bot pushed a commit that referenced this pull request Feb 7, 2022
@github-actions
Copy link

This functionality has been released in v4.0.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. Thank you!

@github-actions
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 May 21, 2022
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. 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.

resource/aws_db_instance: Rename field name to db_name to prevent practitioner confusion
3 participants