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

aws_dms_endpoint mongo settings default case #8672 #8795

Merged
merged 4 commits into from
May 29, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
#8672 use aws sdk dms constants for default resource attribute config…
…uration.
richardjennings committed May 28, 2019
commit 7ad14617dd638d1ae40c9013d7089e048e2545b3
6 changes: 3 additions & 3 deletions aws/resource_aws_dms_endpoint.go
Original file line number Diff line number Diff line change
@@ -138,17 +138,17 @@ func resourceAwsDmsEndpoint() *schema.Resource {
"auth_type": {
Type: schema.TypeString,
Optional: true,
Default: "PASSWORD",
Default: dms.AuthTypeValuePassword,
},
"auth_mechanism": {
Type: schema.TypeString,
Optional: true,
Default: "DEFAULT",
Default: dms.AuthMechanismValueDefault,
},
"nesting_level": {
Type: schema.TypeString,
Optional: true,
Default: "NONE",
Default: dms.NestingLevelValueNone,
},
"extract_doc_id": {
Type: schema.TypeString,
10 changes: 5 additions & 5 deletions aws/resource_aws_dms_endpoint_test.go
Original file line number Diff line number Diff line change
@@ -163,7 +163,7 @@ func TestAccAwsDmsEndpointMongoDb(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "extra_connection_attributes", "key=value;"),
resource.TestCheckResourceAttr(resourceName, "mongodb_settings.#", "1"),
resource.TestCheckResourceAttr(resourceName, "mongodb_settings.0.auth_mechanism", "SCRAM_SHA_1"),
resource.TestCheckResourceAttr(resourceName, "mongodb_settings.0.nesting_level", "ONE"),
resource.TestCheckResourceAttr(resourceName, "mongodb_settings.0.nesting_level", "one"),
resource.TestCheckResourceAttr(resourceName, "mongodb_settings.0.extract_doc_id", "true"),
resource.TestCheckResourceAttr(resourceName, "mongodb_settings.0.docs_to_investigate", "1001"),
),
@@ -598,9 +598,9 @@ resource "aws_dms_endpoint" "dms_endpoint" {
Remove = "to-remove"
}
mongodb_settings {
auth_type = "PASSWORD"
auth_mechanism = "DEFAULT"
nesting_level = "NONE"
auth_type = "password"
auth_mechanism = "default"
nesting_level = "none"
extract_doc_id = "false"
docs_to_investigate = "1000"
auth_source = "admin"
@@ -634,7 +634,7 @@ resource "aws_dms_endpoint" "dms_endpoint" {
}
mongodb_settings {
auth_mechanism = "SCRAM_SHA_1"
nesting_level = "ONE"
nesting_level = "one"
extract_doc_id = "true"
docs_to_investigate = "1001"
}
2 changes: 1 addition & 1 deletion website/docs/r/dms_endpoint.html.markdown
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ The following arguments are supported:
* `tags` - (Optional) A mapping of tags to assign to the resource.
* `username` - (Optional) The user name to be used to login to the endpoint database.
* `service_access_role` - (Optional) The Amazon Resource Name (ARN) used by the service access IAM role for dynamodb endpoints.
* `mongodb_settings` - (Optional) Settings for the source MongoDB endpoint. Available settings are `auth_type` (default: `PASSWORD`), `auth_mechanism` (default: `DEFAULT`), `nesting_level` (default: `NONE`), `extract_doc_id` (default: `false`), `docs_to_investigate` (default: `1000`) and `auth_source` (default: `admin`). For more details, see [Using MongoDB as a Source for AWS DMS](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html).
* `mongodb_settings` - (Optional) Settings for the source MongoDB endpoint. Available settings are `auth_type` (default: `password`), `auth_mechanism` (default: `default`), `nesting_level` (default: `none`), `extract_doc_id` (default: `false`), `docs_to_investigate` (default: `1000`) and `auth_source` (default: `admin`). For more details, see [Using MongoDB as a Source for AWS DMS](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html).
* `s3_settings` - (Optional) Settings for the target S3 endpoint. Available settings are `service_access_role_arn`, `external_table_definition`, `csv_row_delimiter` (default: `\\n`), `csv_delimiter` (default: `,`), `bucket_folder`, `bucket_name` and `compression_type` (default: `NONE`). For more details, see [Using Amazon S3 as a Target for AWS Database Migration Service](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html).

## Attributes Reference