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

f/resource_aws_dms_endpoint: support for secrets id for oracle and postgres #19040

Merged

Conversation

nikhil-goenka
Copy link
Contributor

@nikhil-goenka nikhil-goenka commented Apr 21, 2021

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 #18123

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAwsDmsEndpoint_OracleDb'
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsDmsEndpoint_OracleDb -timeout 180m
=== RUN   TestAccAwsDmsEndpoint_OracleDb
=== PAUSE TestAccAwsDmsEndpoint_OracleDb
=== RUN   TestAccAwsDmsEndpoint_OracleDb_SecretId
=== PAUSE TestAccAwsDmsEndpoint_OracleDb_SecretId
=== RUN   TestAccAwsDmsEndpoint_OracleDb_Update
=== PAUSE TestAccAwsDmsEndpoint_OracleDb_Update
=== CONT  TestAccAwsDmsEndpoint_OracleDb
=== CONT  TestAccAwsDmsEndpoint_OracleDb_Update
=== CONT  TestAccAwsDmsEndpoint_OracleDb_SecretId
--- PASS: TestAccAwsDmsEndpoint_OracleDb (51.35s)
--- PASS: TestAccAwsDmsEndpoint_OracleDb_SecretId (73.63s)
--- PASS: TestAccAwsDmsEndpoint_OracleDb_Update (96.97s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	99.303s

make testacc TESTARGS='-run=TestAccAwsDmsEndpoint_Postgres'
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsDmsEndpoint_Postgres -timeout 180m
=== RUN   TestAccAwsDmsEndpoint_Postgres
=== PAUSE TestAccAwsDmsEndpoint_Postgres
=== RUN   TestAccAwsDmsEndpoint_Postgres_SecretId
=== PAUSE TestAccAwsDmsEndpoint_Postgres_SecretId
=== RUN   TestAccAwsDmsEndpoint_Postgres_Update
=== PAUSE TestAccAwsDmsEndpoint_Postgres_Update
=== CONT  TestAccAwsDmsEndpoint_Postgres
=== CONT  TestAccAwsDmsEndpoint_Postgres_Update
=== CONT  TestAccAwsDmsEndpoint_Postgres_SecretId
--- PASS: TestAccAwsDmsEndpoint_Postgres (47.97s)
--- PASS: TestAccAwsDmsEndpoint_Postgres_SecretId (65.65s)
--- PASS: TestAccAwsDmsEndpoint_Postgres_Update (88.04s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	90.243s
...

@nikhil-goenka nikhil-goenka requested a review from a team as a code owner April 21, 2021 05:22
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/databasemigrationservice tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 21, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 21, 2021
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 22, 2021
@apriljo
Copy link

apriljo commented May 13, 2021

Is it possible to add the same change for mysql as well? Eager to see this released.

@ewbankkit ewbankkit changed the title f/resource_aws_dms_endpoint: support for secrets id for oracle and po… f/resource_aws_dms_endpoint: support for secrets id for oracle and postgres May 14, 2021
@jspaine
Copy link

jspaine commented Jun 25, 2021

I added support for the other listed engines in a PR to this PR (nikhil-goenka#4). I'm not sure about the tests though, it would be a lot of repetition to cover all the cases and could probably use some refactoring.

Also I've tried with MongoDB and it fails to connect, according to AWS support MongoDB and Document DB aren't currently supported despite the documentation and api suggesting they are, so not sure whether to leave these in and add a note or remove them.

@slords
Copy link

slords commented Aug 25, 2021

In addition to this you can also specify the ASM secret for oracle. Any chance of getting that integrated as well?

@zhelding
Copy link
Contributor

Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding.

Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single aws directory to a large number of separate directories in internal/service, each corresponding to a particular AWS service. This separation of code has also allowed for us to simplify the names of underlying functions -- while still avoiding namespace collisions.

We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author.

For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000.

For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide.

@breathingdust
Copy link
Member

Hi all 👋 Just letting you know that this is issue is featured on this quarters roadmap. If a PR exists to close the issue a maintainer will review and either make changes directly, or work with the original author to get the contribution merged. If you have written a PR to resolve the issue please ensure the "Allow edits from maintainers" box is checked. Thanks for your patience and we are looking forward to getting this merged soon!

@breathingdust breathingdust added this to the Roadmap milestone Nov 10, 2021
@YakDriver YakDriver added the pre-service-packages Includes pre-Service Packages aspects. label Nov 30, 2021
@adamantike
Copy link

@nikhil-goenka, are you available to make the required rebase that @zhelding mentioned?
It would be great to get this merged, based on the amount of 👍 that both this PR and the related issue have.

@ewbankkit ewbankkit self-assigned this Dec 13, 2021
@ewbankkit ewbankkit force-pushed the f/resource_aws_dms_endpoint.go branch from 95d4657 to 36b85d8 Compare December 13, 2021 17:36
@ewbankkit ewbankkit removed the pre-service-packages Includes pre-Service Packages aspects. label Dec 13, 2021
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

Commercial
% make testacc TESTS=TestAccDMSEndpoint_ PKG=dms            
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/dms/... -v -count 1 -parallel 20 -run='TestAccDMSEndpoint_' -timeout 180m
=== RUN   TestAccDMSEndpoint_basic
=== PAUSE TestAccDMSEndpoint_basic
=== RUN   TestAccDMSEndpoint_s3
=== PAUSE TestAccDMSEndpoint_s3
=== RUN   TestAccDMSEndpoint_S3_extraConnectionAttributes
=== PAUSE TestAccDMSEndpoint_S3_extraConnectionAttributes
=== RUN   TestAccDMSEndpoint_dynamoDB
=== PAUSE TestAccDMSEndpoint_dynamoDB
=== RUN   TestAccDMSEndpoint_elasticSearch
=== PAUSE TestAccDMSEndpoint_elasticSearch
=== RUN   TestAccDMSEndpoint_Elasticsearch_extraConnectionAttributes
=== PAUSE TestAccDMSEndpoint_Elasticsearch_extraConnectionAttributes
=== RUN   TestAccDMSEndpoint_Elasticsearch_errorRetryDuration
=== PAUSE TestAccDMSEndpoint_Elasticsearch_errorRetryDuration
=== RUN   TestAccDMSEndpoint_Elasticsearch_fullLoadErrorPercentage
=== PAUSE TestAccDMSEndpoint_Elasticsearch_fullLoadErrorPercentage
=== RUN   TestAccDMSEndpoint_kafka
=== PAUSE TestAccDMSEndpoint_kafka
=== RUN   TestAccDMSEndpoint_kinesis
=== PAUSE TestAccDMSEndpoint_kinesis
=== RUN   TestAccDMSEndpoint_mongoDB
=== PAUSE TestAccDMSEndpoint_mongoDB
=== RUN   TestAccDMSEndpoint_MongoDB_update
=== PAUSE TestAccDMSEndpoint_MongoDB_update
=== RUN   TestAccDMSEndpoint_Oracle
=== PAUSE TestAccDMSEndpoint_Oracle
=== RUN   TestAccDMSEndpoint_Oracle_secretId
=== PAUSE TestAccDMSEndpoint_Oracle_secretId
=== RUN   TestAccDMSEndpoint_Oracle_update
=== PAUSE TestAccDMSEndpoint_Oracle_update
=== RUN   TestAccDMSEndpoint_Postgres
=== PAUSE TestAccDMSEndpoint_Postgres
=== RUN   TestAccDMSEndpoint_Postgres_secretId
=== PAUSE TestAccDMSEndpoint_Postgres_secretId
=== RUN   TestAccDMSEndpoint_Postgres_update
=== PAUSE TestAccDMSEndpoint_Postgres_update
=== RUN   TestAccDMSEndpoint_docDB
=== PAUSE TestAccDMSEndpoint_docDB
=== RUN   TestAccDMSEndpoint_db2
=== PAUSE TestAccDMSEndpoint_db2
=== CONT  TestAccDMSEndpoint_basic
=== CONT  TestAccDMSEndpoint_MongoDB_update
=== CONT  TestAccDMSEndpoint_db2
=== CONT  TestAccDMSEndpoint_elasticSearch
=== CONT  TestAccDMSEndpoint_Elasticsearch_fullLoadErrorPercentage
=== CONT  TestAccDMSEndpoint_Postgres_secretId
=== CONT  TestAccDMSEndpoint_docDB
=== CONT  TestAccDMSEndpoint_Postgres_update
=== CONT  TestAccDMSEndpoint_Oracle_update
=== CONT  TestAccDMSEndpoint_Oracle_secretId
=== CONT  TestAccDMSEndpoint_Postgres
=== CONT  TestAccDMSEndpoint_Elasticsearch_errorRetryDuration
=== CONT  TestAccDMSEndpoint_mongoDB
=== CONT  TestAccDMSEndpoint_kinesis
=== CONT  TestAccDMSEndpoint_Oracle
=== CONT  TestAccDMSEndpoint_kafka
=== CONT  TestAccDMSEndpoint_dynamoDB
=== CONT  TestAccDMSEndpoint_Elasticsearch_extraConnectionAttributes
=== CONT  TestAccDMSEndpoint_S3_extraConnectionAttributes
=== CONT  TestAccDMSEndpoint_s3
--- PASS: TestAccDMSEndpoint_Oracle (47.82s)
--- PASS: TestAccDMSEndpoint_Postgres (48.62s)
--- PASS: TestAccDMSEndpoint_mongoDB (48.89s)
--- PASS: TestAccDMSEndpoint_Postgres_secretId (49.08s)
--- PASS: TestAccDMSEndpoint_Oracle_secretId (51.85s)
--- PASS: TestAccDMSEndpoint_docDB (56.89s)
--- PASS: TestAccDMSEndpoint_elasticSearch (59.03s)
--- PASS: TestAccDMSEndpoint_Elasticsearch_extraConnectionAttributes (59.03s)
--- PASS: TestAccDMSEndpoint_Elasticsearch_fullLoadErrorPercentage (59.19s)
--- PASS: TestAccDMSEndpoint_Elasticsearch_errorRetryDuration (59.42s)
--- PASS: TestAccDMSEndpoint_MongoDB_update (70.12s)
--- PASS: TestAccDMSEndpoint_basic (71.84s)
--- PASS: TestAccDMSEndpoint_db2 (72.57s)
--- PASS: TestAccDMSEndpoint_kafka (72.75s)
--- PASS: TestAccDMSEndpoint_Oracle_update (73.04s)
--- PASS: TestAccDMSEndpoint_Postgres_update (74.29s)
--- PASS: TestAccDMSEndpoint_dynamoDB (78.90s)
--- PASS: TestAccDMSEndpoint_S3_extraConnectionAttributes (79.08s)
--- PASS: TestAccDMSEndpoint_s3 (83.43s)
--- PASS: TestAccDMSEndpoint_kinesis (120.42s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/dms	123.818s
GovCloud
% make testacc TESTS=TestAccDMSEndpoint_ PKG=dms
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/dms/... -v -count 1 -parallel 20 -run='TestAccDMSEndpoint_' -timeout 180m
=== RUN   TestAccDMSEndpoint_basic
=== PAUSE TestAccDMSEndpoint_basic
=== RUN   TestAccDMSEndpoint_s3
=== PAUSE TestAccDMSEndpoint_s3
=== RUN   TestAccDMSEndpoint_S3_extraConnectionAttributes
=== PAUSE TestAccDMSEndpoint_S3_extraConnectionAttributes
=== RUN   TestAccDMSEndpoint_dynamoDB
=== PAUSE TestAccDMSEndpoint_dynamoDB
=== RUN   TestAccDMSEndpoint_elasticSearch
=== PAUSE TestAccDMSEndpoint_elasticSearch
=== RUN   TestAccDMSEndpoint_Elasticsearch_extraConnectionAttributes
=== PAUSE TestAccDMSEndpoint_Elasticsearch_extraConnectionAttributes
=== RUN   TestAccDMSEndpoint_Elasticsearch_errorRetryDuration
=== PAUSE TestAccDMSEndpoint_Elasticsearch_errorRetryDuration
=== RUN   TestAccDMSEndpoint_Elasticsearch_fullLoadErrorPercentage
=== PAUSE TestAccDMSEndpoint_Elasticsearch_fullLoadErrorPercentage
=== RUN   TestAccDMSEndpoint_kafka
=== PAUSE TestAccDMSEndpoint_kafka
=== RUN   TestAccDMSEndpoint_kinesis
=== PAUSE TestAccDMSEndpoint_kinesis
=== RUN   TestAccDMSEndpoint_mongoDB
=== PAUSE TestAccDMSEndpoint_mongoDB
=== RUN   TestAccDMSEndpoint_MongoDB_update
=== PAUSE TestAccDMSEndpoint_MongoDB_update
=== RUN   TestAccDMSEndpoint_Oracle
=== PAUSE TestAccDMSEndpoint_Oracle
=== RUN   TestAccDMSEndpoint_Oracle_secretId
=== PAUSE TestAccDMSEndpoint_Oracle_secretId
=== RUN   TestAccDMSEndpoint_Oracle_update
=== PAUSE TestAccDMSEndpoint_Oracle_update
=== RUN   TestAccDMSEndpoint_Postgres
=== PAUSE TestAccDMSEndpoint_Postgres
=== RUN   TestAccDMSEndpoint_Postgres_secretId
=== PAUSE TestAccDMSEndpoint_Postgres_secretId
=== RUN   TestAccDMSEndpoint_Postgres_update
=== PAUSE TestAccDMSEndpoint_Postgres_update
=== RUN   TestAccDMSEndpoint_docDB
=== PAUSE TestAccDMSEndpoint_docDB
=== RUN   TestAccDMSEndpoint_db2
=== PAUSE TestAccDMSEndpoint_db2
=== CONT  TestAccDMSEndpoint_basic
=== CONT  TestAccDMSEndpoint_MongoDB_update
=== CONT  TestAccDMSEndpoint_Postgres_secretId
=== CONT  TestAccDMSEndpoint_db2
=== CONT  TestAccDMSEndpoint_Postgres
=== CONT  TestAccDMSEndpoint_Oracle
=== CONT  TestAccDMSEndpoint_Oracle_update
=== CONT  TestAccDMSEndpoint_Elasticsearch_errorRetryDuration
=== CONT  TestAccDMSEndpoint_mongoDB
=== CONT  TestAccDMSEndpoint_kinesis
=== CONT  TestAccDMSEndpoint_kafka
=== CONT  TestAccDMSEndpoint_Oracle_secretId
=== CONT  TestAccDMSEndpoint_dynamoDB
=== CONT  TestAccDMSEndpoint_Elasticsearch_extraConnectionAttributes
=== CONT  TestAccDMSEndpoint_Postgres_update
=== CONT  TestAccDMSEndpoint_Elasticsearch_fullLoadErrorPercentage
=== CONT  TestAccDMSEndpoint_elasticSearch
=== CONT  TestAccDMSEndpoint_S3_extraConnectionAttributes
=== CONT  TestAccDMSEndpoint_s3
=== CONT  TestAccDMSEndpoint_docDB
--- PASS: TestAccDMSEndpoint_elasticSearch (151.50s)
--- PASS: TestAccDMSEndpoint_Postgres (151.80s)
--- PASS: TestAccDMSEndpoint_Oracle (151.84s)
--- PASS: TestAccDMSEndpoint_mongoDB (152.31s)
--- PASS: TestAccDMSEndpoint_Postgres_secretId (158.76s)
--- PASS: TestAccDMSEndpoint_Oracle_secretId (159.01s)
--- PASS: TestAccDMSEndpoint_Elasticsearch_extraConnectionAttributes (159.06s)
--- PASS: TestAccDMSEndpoint_S3_extraConnectionAttributes (159.15s)
--- PASS: TestAccDMSEndpoint_Elasticsearch_fullLoadErrorPercentage (160.03s)
--- PASS: TestAccDMSEndpoint_basic (161.44s)
--- PASS: TestAccDMSEndpoint_Postgres_update (161.65s)
--- PASS: TestAccDMSEndpoint_Elasticsearch_errorRetryDuration (161.85s)
--- PASS: TestAccDMSEndpoint_db2 (162.74s)
--- PASS: TestAccDMSEndpoint_MongoDB_update (164.70s)
--- PASS: TestAccDMSEndpoint_docDB (167.82s)
--- PASS: TestAccDMSEndpoint_Oracle_update (167.91s)
--- PASS: TestAccDMSEndpoint_kafka (170.22s)
--- PASS: TestAccDMSEndpoint_dynamoDB (179.34s)
--- PASS: TestAccDMSEndpoint_s3 (181.56s)
--- PASS: TestAccDMSEndpoint_kinesis (202.31s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/dms	205.443s

@ewbankkit
Copy link
Contributor

@nikhil-goenka Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit be1945e into hashicorp:main Dec 13, 2021
@github-actions github-actions bot modified the milestones: Roadmap, v3.70.0 Dec 13, 2021
@github-actions
Copy link

This functionality has been released in v3.70.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

github-actions bot commented Jun 1, 2022

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 Jun 1, 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. enhancement Requests to existing resources that expand the functionality or scope. size/XL 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.

Add option to configure secrets manager secret for aws_dms_endpoint
10 participants