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

resource/aws_iot_topic_rule: Allow tags with '@' on creation #19677

Merged
merged 3 commits into from
Jun 10, 2021

Conversation

gdavison
Copy link
Contributor

@gdavison gdavison commented Jun 4, 2021

Tags with @ are valid for IoT topic rules, but they were not accepted at creation time. The AWS API handles its own URL encoding for this call, while we were handling it.

Also validates S3 bucket object tags with @ which were using the same URL encoding call.

Closes #19653

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSIoTTopicRule_Tags\|TestAccAWSS3BucketObject_tags'

--- PASS: TestAccAWSIoTTopicRule_Tags (257.21s)
--- PASS: TestAccAWSS3BucketObject_tagsLeadingSingleSlash (320.11s)
--- PASS: TestAccAWSS3BucketObject_tagsMultipleSlashes (324.51s)
--- PASS: TestAccAWSS3BucketObject_tags (326.24s)
--- PASS: TestAccAWSS3BucketObject_tagsLeadingMultipleSlashes (326.33s)
$ make test TEST=./aws/internal/keyvaluetags

ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags	0.617s

@gdavison gdavison requested a review from a team as a code owner June 4, 2021 23:55
@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label Jun 4, 2021
@github-actions github-actions bot added provider Pertains to the provider itself, rather than any interaction with AWS. service/iot Issues and PRs that pertain to the iot service. service/s3 Issues and PRs that pertain to the s3 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jun 4, 2021
@ewbankkit ewbankkit self-assigned this Jun 7, 2021
@ewbankkit
Copy link
Contributor

Need to add .changelog/19677.txt.

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 TEST=./aws TESTARGS='-run=TestAccAWSIoTTopicRule_Tags\|TestAccAWSS3BucketObject_tags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSIoTTopicRule_Tags\|TestAccAWSS3BucketObject_tags -timeout 180m
=== RUN   TestAccAWSIoTTopicRule_Tags
=== PAUSE TestAccAWSIoTTopicRule_Tags
=== RUN   TestAccAWSS3BucketObject_tags
=== PAUSE TestAccAWSS3BucketObject_tags
=== RUN   TestAccAWSS3BucketObject_tagsLeadingSingleSlash
=== PAUSE TestAccAWSS3BucketObject_tagsLeadingSingleSlash
=== RUN   TestAccAWSS3BucketObject_tagsLeadingMultipleSlashes
=== PAUSE TestAccAWSS3BucketObject_tagsLeadingMultipleSlashes
=== RUN   TestAccAWSS3BucketObject_tagsMultipleSlashes
=== PAUSE TestAccAWSS3BucketObject_tagsMultipleSlashes
=== CONT  TestAccAWSIoTTopicRule_Tags
=== CONT  TestAccAWSS3BucketObject_tagsLeadingMultipleSlashes
=== CONT  TestAccAWSS3BucketObject_tagsMultipleSlashes
=== CONT  TestAccAWSS3BucketObject_tags
=== CONT  TestAccAWSS3BucketObject_tagsLeadingSingleSlash
--- PASS: TestAccAWSIoTTopicRule_Tags (41.35s)
--- PASS: TestAccAWSS3BucketObject_tagsLeadingMultipleSlashes (100.50s)
--- PASS: TestAccAWSS3BucketObject_tagsMultipleSlashes (100.63s)
--- PASS: TestAccAWSS3BucketObject_tags (100.90s)
--- PASS: TestAccAWSS3BucketObject_tagsLeadingSingleSlash (100.93s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	104.718s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSIoTTopicRule_Tags\|TestAccAWSS3BucketObject_tags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSIoTTopicRule_Tags\|TestAccAWSS3BucketObject_tags -timeout 180m
=== RUN   TestAccAWSIoTTopicRule_Tags
=== PAUSE TestAccAWSIoTTopicRule_Tags
=== RUN   TestAccAWSS3BucketObject_tags
=== PAUSE TestAccAWSS3BucketObject_tags
=== RUN   TestAccAWSS3BucketObject_tagsLeadingSingleSlash
=== PAUSE TestAccAWSS3BucketObject_tagsLeadingSingleSlash
=== RUN   TestAccAWSS3BucketObject_tagsLeadingMultipleSlashes
=== PAUSE TestAccAWSS3BucketObject_tagsLeadingMultipleSlashes
=== RUN   TestAccAWSS3BucketObject_tagsMultipleSlashes
=== PAUSE TestAccAWSS3BucketObject_tagsMultipleSlashes
=== CONT  TestAccAWSIoTTopicRule_Tags
=== CONT  TestAccAWSS3BucketObject_tagsLeadingMultipleSlashes
=== CONT  TestAccAWSS3BucketObject_tagsMultipleSlashes
=== CONT  TestAccAWSS3BucketObject_tagsLeadingSingleSlash
=== CONT  TestAccAWSS3BucketObject_tags
--- PASS: TestAccAWSIoTTopicRule_Tags (60.03s)
--- PASS: TestAccAWSS3BucketObject_tagsLeadingMultipleSlashes (108.61s)
--- PASS: TestAccAWSS3BucketObject_tags (109.34s)
--- PASS: TestAccAWSS3BucketObject_tagsMultipleSlashes (109.79s)
--- PASS: TestAccAWSS3BucketObject_tagsLeadingSingleSlash (110.02s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	113.521s

@ewbankkit ewbankkit removed their assignment Jun 7, 2021
@gdavison gdavison merged commit 07e8df0 into main Jun 10, 2021
@gdavison gdavison deleted the iot-tags-with-at-sign branch June 10, 2021 17:54
@github-actions github-actions bot added this to the v3.45.0 milestone Jun 10, 2021
github-actions bot pushed a commit that referenced this pull request Jun 10, 2021
@github-actions
Copy link

This functionality has been released in v3.45.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 Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
provider Pertains to the provider itself, rather than any interaction with AWS. service/iot Issues and PRs that pertain to the iot service. service/s3 Issues and PRs that pertain to the s3 service. size/M 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.

IoT Topic Rule cannot be created if tag value has @ symbol
2 participants