Skip to content

[Enhancement] aws_iot_domain_configuration: support for application protocol and authentication type #42534

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

Merged
merged 10 commits into from
May 13, 2025

Conversation

badmintoncryer
Copy link
Contributor

@badmintoncryer badmintoncryer commented May 8, 2025

Description

Add support for application_protocol and authentication_type for AWS IoT Domain Configuration.

In order to create an update test to modify the authentication_type, it is necessary to set the appropriate application_protocol.

link: https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html

 make testacc TESTS=TestAccIoTDomainConfiguration_update PKG=iot
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.8 test ./internal/service/iot/... -v -count 1 -parallel 20 -run='TestAccIoTDomainConfiguration_update'  -timeout 360m -vet=off
2025/05/08 22:44:35 Initializing Terraform AWS Provider...
=== RUN   TestAccIoTDomainConfiguration_update
=== PAUSE TestAccIoTDomainConfiguration_update
=== CONT  TestAccIoTDomainConfiguration_update
    domain_configuration_test.go:144: Step 1/3 error: Error running apply: exit status 1
        
        Error: creating IoT Domain Configuration (tf-acc-test-4977357272255903369): operation error IoT: CreateDomainConfiguration, https response error StatusCode: 400, RequestID: 2c6e97fb-8cdd-4cb4-8b8b-c39bada93664, InvalidRequestException: The domain must configure a supported ApplicationProtocol when configuring an AuthenticationType. Please refer to <https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html> for supported combinations and try again.
        
          with aws_iot_domain_configuration.test,
          on terraform_plugin_test.tf line 76, in resource "aws_iot_domain_configuration" "test":
          76: resource "aws_iot_domain_configuration" "test" {
        
--- FAIL: TestAccIoTDomainConfiguration_update (87.78s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/iot        94.612s
FAIL
make: *** [testacc] Error 1

Therefore, it was difficult to create an acc test for a PR that only adds authentication_type.
As a result, I have included the addition of two arguments in the same PR.

Relations

Relates #40949

References

API Reference: https://docs.aws.amazon.com/iot/latest/apireference/API_CreateDomainConfiguration.html#iot-CreateDomainConfiguration-request-authenticationType

Output from Acceptance Testing

make testacc TESTS=TestAccIoTDomainConfiguration_update PKG=iot
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.8 test ./internal/service/iot/... -v -count 1 -parallel 20 -run='TestAccIoTDomainConfiguration_update'  -timeout 360m -vet=off
2025/05/08 23:14:25 Initializing Terraform AWS Provider...
=== RUN   TestAccIoTDomainConfiguration_update
=== PAUSE TestAccIoTDomainConfiguration_update
=== CONT  TestAccIoTDomainConfiguration_update
--- PASS: TestAccIoTDomainConfiguration_update (150.44s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/iot        157.512s

@badmintoncryer badmintoncryer requested a review from a team as a code owner May 8, 2025 14:37
Copy link

github-actions bot commented May 8, 2025

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

Copy link

github-actions bot commented May 8, 2025

✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/iot Issues and PRs that pertain to the iot service. size/S Managed by automation to categorize the size of a PR. labels May 8, 2025
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label May 8, 2025
@justinretzolk justinretzolk 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 May 8, 2025
@ewbankkit ewbankkit self-assigned this May 11, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label May 11, 2025
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels May 11, 2025
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 🚀.

% ACM_CERTIFICATE_ROOT_DOMAIN=...  make testacc TESTARGS='-run=TestAccIoTDomainConfiguration_' PKG=iot ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.8 test ./internal/service/iot/... -v -count 1 -parallel 3  -run=TestAccIoTDomainConfiguration_ -timeout 360m -vet=off
2025/05/11 17:39:33 Initializing Terraform AWS Provider...
=== RUN   TestAccIoTDomainConfiguration_basic
=== PAUSE TestAccIoTDomainConfiguration_basic
=== RUN   TestAccIoTDomainConfiguration_disappears
=== PAUSE TestAccIoTDomainConfiguration_disappears
=== RUN   TestAccIoTDomainConfiguration_tags
=== PAUSE TestAccIoTDomainConfiguration_tags
=== RUN   TestAccIoTDomainConfiguration_update
=== PAUSE TestAccIoTDomainConfiguration_update
=== RUN   TestAccIoTDomainConfiguration_awsManaged
    domain_configuration_test.go:188: Environment variable IOT_DOMAIN_CONFIGURATION_TEST_AWS_MANAGED is not set, skipping test
--- SKIP: TestAccIoTDomainConfiguration_awsManaged (0.00s)
=== CONT  TestAccIoTDomainConfiguration_basic
=== CONT  TestAccIoTDomainConfiguration_tags
=== CONT  TestAccIoTDomainConfiguration_disappears
--- PASS: TestAccIoTDomainConfiguration_disappears (84.25s)
=== CONT  TestAccIoTDomainConfiguration_update
--- PASS: TestAccIoTDomainConfiguration_basic (85.29s)
--- PASS: TestAccIoTDomainConfiguration_tags (108.23s)
--- PASS: TestAccIoTDomainConfiguration_update (97.29s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iot	186.361s

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 🚀.

Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ewbankkit
Copy link
Contributor

@badmintoncryer Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit a0e4dfa into hashicorp:main May 13, 2025
46 checks passed
Copy link

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.98.0 milestone May 13, 2025
@badmintoncryer badmintoncryer deleted the f-iot-authentication-type branch May 13, 2025 12:27
Copy link

This functionality has been released in v5.98.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 github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/iot Issues and PRs that pertain to the iot 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.

4 participants