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

Add support for additional kinesis_settings to dms_endpoint #20084

Merged
merged 11 commits into from
Oct 18, 2021

Conversation

ksagle77
Copy link

@ksagle77 ksagle77 commented Jul 6, 2021

Closes #20083

Output from acceptance testing:

I am not very familiar with go and am not sure what changes this requires to resource_aws_dms_endpoint_test.go. I'm unable to test it myself, but if this looks correct I will commit it:

func TestAccAwsDmsEndpoint_Kinesis(t *testing.T) {
	resourceName := "aws_dms_endpoint.dms_endpoint"
	randId := acctest.RandString(8) + "-kinesis"

	resource.ParallelTest(t, resource.TestCase{
		PreCheck:     func() { testAccPreCheck(t) },
		ErrorCheck:   testAccErrorCheck(t, dms.EndpointsID),
		Providers:    testAccProviders,
		CheckDestroy: dmsEndpointDestroy,
		Steps: []resource.TestStep{
			{
				Config: dmsEndpointKinesisConfig(randId),
				Check: resource.ComposeTestCheckFunc(
					checkDmsEndpointExists(resourceName),
					resource.TestCheckResourceAttr(resourceName, "kinesis_settings.#", "1"),
					resource.TestCheckResourceAttr(resourceName, "kinesis_settings.0.message_format", "json"),
					resource.TestCheckResourceAttrPair(resourceName, "kinesis_settings.0.stream_arn", "aws_kinesis_stream.stream1", "arn"),
					resource.TestCheckResourceAttrPair(resourceName, "kinesis_settings.0.include_null_and_empty", "aws_kinesis_stream.stream1", "true"),
				),
			},
			{
				ResourceName:            resourceName,
				ImportState:             true,
				ImportStateVerify:       true,
				ImportStateVerifyIgnore: []string{"password"},
			},
			{
				Config: dmsEndpointKinesisConfigUpdate(randId),
				Check: resource.ComposeTestCheckFunc(
					checkDmsEndpointExists(resourceName),
					resource.TestCheckResourceAttr(resourceName, "kinesis_settings.#", "1"),
					resource.TestCheckResourceAttr(resourceName, "kinesis_settings.0.message_format", "json"),
					resource.TestCheckResourceAttrPair(resourceName, "kinesis_settings.0.stream_arn", "aws_kinesis_stream.stream2", "arn"),
					resource.TestCheckResourceAttrPair(resourceName, "kinesis_settings.0.include_null_and_empty", "aws_kinesis_stream.stream1", "false"),
				),
			},
		},
	})
}

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/databasemigrationservice size/XS Managed by automation to categorize the size of a PR. labels Jul 6, 2021
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @ksagle77 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Jul 6, 2021
@ksagle77 ksagle77 marked this pull request as ready for review July 6, 2021 14:48
@ksagle77 ksagle77 changed the title [WIP] Add include_null_and_empty to kinesis_settings Add include_null_and_empty to kinesis_settings Jul 6, 2021
@ksagle77 ksagle77 closed this Jul 7, 2021
@ksagle77 ksagle77 reopened this Jul 7, 2021
@vikatskhay
Copy link

@ksagle77 thank you for adding this. Would it be possible to add support for IncludeTransactionDetails as well? (Duplicating the request in #20083 (comment).)

@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Jul 9, 2021
@ksagle77 ksagle77 changed the title Add include_null_and_empty to kinesis_settings Add support for additional kinesis_settings to dms_endpoint Jul 9, 2021
@anGie44 anGie44 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 Aug 18, 2021
@ewbankkit
Copy link
Contributor

ewbankkit commented Oct 7, 2021

Similar #18750.

@ewbankkit
Copy link
Contributor

@ksagle77 Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit closed this Oct 7, 2021
@ewbankkit ewbankkit reopened this Oct 8, 2021
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label Oct 17, 2021
added the following settings:
IncludeTransactionDetails
IncludePartitionValue
PartitionIncludeSchemaTable
IncludeTableAlterOperations
IncludeControlDetails
IncludeNullAndEmpty
added the new elements to the schema of the Kinesis settings
removed a "}," that should not have been removed :-)
Acceptance test output:

$ make testacc TESTARGS='-run=TestAccDMSEndpoint_kinesis' PKG_NAME=internal/service/dms
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/dms -v -count 1 -parallel 20 -run=TestAccDMSEndpoint_kinesis -timeout 180m
=== RUN   TestAccDMSEndpoint_kinesis
=== PAUSE TestAccDMSEndpoint_kinesis
=== CONT  TestAccDMSEndpoint_kinesis
--- PASS: TestAccDMSEndpoint_kinesis (182.20s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/dms	182.255s
@ewbankkit ewbankkit force-pushed the f-aws_dms_endpoint-add-setting branch from 129140c to e9dfe40 Compare October 17, 2021 22:43
@github-actions github-actions bot added size/XL 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 Oct 17, 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 🚀.

$ make testacc TESTARGS='-run=TestAccDMSEndpoint_' PKG_NAME=internal/service/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_docDB
=== PAUSE TestAccDMSEndpoint_docDB
=== RUN   TestAccDMSEndpoint_db2
=== PAUSE TestAccDMSEndpoint_db2
=== CONT  TestAccDMSEndpoint_basic
=== CONT  TestAccDMSEndpoint_kafka
=== CONT  TestAccDMSEndpoint_db2
=== CONT  TestAccDMSEndpoint_docDB
=== CONT  TestAccDMSEndpoint_MongoDB_update
=== CONT  TestAccDMSEndpoint_mongoDB
=== CONT  TestAccDMSEndpoint_kinesis
=== CONT  TestAccDMSEndpoint_elasticSearch
=== CONT  TestAccDMSEndpoint_ElasticSearch_fullLoadErrorPercentage
=== CONT  TestAccDMSEndpoint_ElasticSearch_errorRetryDuration
=== CONT  TestAccDMSEndpoint_ElasticSearch_extraConnectionAttributes
=== CONT  TestAccDMSEndpoint_S3_extraConnectionAttributes
=== CONT  TestAccDMSEndpoint_dynamoDB
=== CONT  TestAccDMSEndpoint_s3
--- PASS: TestAccDMSEndpoint_mongoDB (152.48s)
--- PASS: TestAccDMSEndpoint_S3_extraConnectionAttributes (173.79s)
--- PASS: TestAccDMSEndpoint_ElasticSearch_errorRetryDuration (173.85s)
--- PASS: TestAccDMSEndpoint_elasticSearch (173.85s)
--- PASS: TestAccDMSEndpoint_ElasticSearch_extraConnectionAttributes (173.86s)
--- PASS: TestAccDMSEndpoint_ElasticSearch_fullLoadErrorPercentage (173.95s)
--- PASS: TestAccDMSEndpoint_kafka (181.68s)
--- PASS: TestAccDMSEndpoint_docDB (182.84s)
--- PASS: TestAccDMSEndpoint_basic (182.90s)
--- PASS: TestAccDMSEndpoint_db2 (183.23s)
--- PASS: TestAccDMSEndpoint_dynamoDB (192.89s)
--- PASS: TestAccDMSEndpoint_s3 (193.44s)
--- PASS: TestAccDMSEndpoint_MongoDB_update (197.49s)
--- PASS: TestAccDMSEndpoint_kinesis (221.13s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/dms	221.256s

@ewbankkit
Copy link
Contributor

@ksagle77 @kduvekot-wehkamp-nl Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit c9bd565 into hashicorp:main Oct 18, 2021
@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 Jun 15, 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 support for other arguments in aws_dms_endpoint kinesis_settings
5 participants