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

DMS Endpoint: Specify MongoDB connection info in the top-level namespace #4636

Merged
merged 1 commit into from
May 24, 2018

Conversation

microamp
Copy link
Contributor

Fixes #4635

Changes proposed in this pull request:

  • MongoDB connection info (server name, port, username, passport and database name) are now specified in the top-level namespace as well as in the nested mongodb_settings settings. Otherwise it would not be able to test the connection as explained in the issue above.
  • Running
# Trigger a connection test
$ aws dms test-connection --replication-instance-arn <replication-instance-arn> --endpoint-arn <endpoint-arn>
# Retrieve the most recent connection test result
$ aws dms describe-connections

will now return

{
    "Connections": [
        {
            "ReplicationInstanceArn": "..."
            "EndpointArn": "..."
            "Status": "successful",
            "EndpointIdentifier": "..."
            "ReplicationInstanceIdentifier": "..."
        },
        ...
    ]
}

Output from acceptance testing (unchanged and still passes):

$ make testacc TEST=./aws TESTARGS='-run=TestAccAwsDmsEndpointMongoDb'

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAwsDmsEndpointMongoDb -timeout 120m
=== RUN   TestAccAwsDmsEndpointMongoDb
--- PASS: TestAccAwsDmsEndpointMongoDb (74.04s)
PASS
ok     github.com/terraform-providers/terraform-provider-aws/aws      74.053s

@ghost ghost added the size/S Managed by automation to categorize the size of a PR. label May 24, 2018
@microamp microamp changed the title Specify MongoDB connection info in the top-level namespace DMS Endpoint: Specify MongoDB connection info in the top-level namespace May 24, 2018
@bflad bflad added bug Addresses a defect in current functionality. service/databasemigrationservice labels May 24, 2018
@bflad bflad added this to the v1.21.0 milestone May 24, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Well that's quite annoying behavior! It would be really nice if the API actually mentioned this when creating/updating endpoints. (If you have an AWS support plan, definitely ping them.)

Its unfortunate that in order to properly acceptance test this we would have to fully stand up working MongoDB environment and all the other DMS bits to test the connection. We'd definitely love a PR for that! 😉

LGTM and thanks for fixing this!

4 tests passed (all tests)
=== RUN   TestAccAwsDmsEndpointBasic
--- PASS: TestAccAwsDmsEndpointBasic (12.10s)
=== RUN   TestAccAwsDmsEndpointMongoDb
--- PASS: TestAccAwsDmsEndpointMongoDb (14.09s)
=== RUN   TestAccAwsDmsEndpointDynamoDb
--- PASS: TestAccAwsDmsEndpointDynamoDb (33.23s)
=== RUN   TestAccAwsDmsEndpointS3
--- PASS: TestAccAwsDmsEndpointS3 (33.57s)

@bflad bflad merged commit 29769c9 into hashicorp:master May 24, 2018
bflad added a commit that referenced this pull request May 24, 2018
@microamp microamp deleted the dms-endpoint-mongodb-db-name branch May 24, 2018 21:22
@bflad
Copy link
Contributor

bflad commented May 31, 2018

This has been released in version 1.21.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 5, 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 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DMS Endpoint (MongoDB) cannot be tested due to DatabaseName missing
2 participants