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

fix: Set role_arn data type to String in aws_iot_ca_certificate #35234

Conversation

acwwat
Copy link
Contributor

@acwwat acwwat commented Jan 11, 2024

Description

This PR is to fix the data type of the role_arn attribute (change from Bool to String) for the aws_iot_ca_certificate resource, so that it can actually be set.

Relations

Closes #35079

References

Sample provisioning template was copied from Template example for just-in-time provisioning (JITP) in the AWS documentation.

Output from Acceptance Testing

Note: TestAccIoTCACertificate_registrationConfig is the new test case.

$ make testacc TESTS=TestAccIoTCACertificate_ PKG=iot
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iot/... -v -count 1 -parallel 20 -run='TestAccIoTCACertificate_'  -timeout 360m
=== RUN   TestAccIoTCACertificate_basic
=== PAUSE TestAccIoTCACertificate_basic
=== RUN   TestAccIoTCACertificate_disappears
=== PAUSE TestAccIoTCACertificate_disappears
=== RUN   TestAccIoTCACertificate_tags
=== PAUSE TestAccIoTCACertificate_tags
=== RUN   TestAccIoTCACertificate_defaultMode
=== PAUSE TestAccIoTCACertificate_defaultMode
=== RUN   TestAccIoTCACertificate_registrationConfig
=== PAUSE TestAccIoTCACertificate_registrationConfig
=== CONT  TestAccIoTCACertificate_basic
=== CONT  TestAccIoTCACertificate_defaultMode
=== CONT  TestAccIoTCACertificate_registrationConfig
=== CONT  TestAccIoTCACertificate_tags
=== CONT  TestAccIoTCACertificate_disappears
--- PASS: TestAccIoTCACertificate_basic (53.72s)
--- PASS: TestAccIoTCACertificate_disappears (56.28s)
--- PASS: TestAccIoTCACertificate_defaultMode (81.96s)
--- PASS: TestAccIoTCACertificate_registrationConfig (88.16s)
--- PASS: TestAccIoTCACertificate_tags (98.93s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/iot        99.292s
$ 

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/iot Issues and PRs that pertain to the iot service. labels Jan 11, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 11, 2024
@acwwat acwwat force-pushed the b-aws_iot_ca_certificate-fix_role_arn_data_type branch from 7fec982 to c5afa1b Compare January 11, 2024 01:37
@acwwat acwwat changed the title [WIP] fix: Set role_arn data type to String in aws_iot_ca_certificate fix: Set role_arn data type to String in aws_iot_ca_certificate Jan 11, 2024
@acwwat acwwat changed the title fix: Set role_arn data type to String in aws_iot_ca_certificate fix: Set role_arn data type to String in aws_iot_ca_certificate Jan 11, 2024
@acwwat acwwat force-pushed the b-aws_iot_ca_certificate-fix_role_arn_data_type branch 2 times, most recently from bd86249 to 46df850 Compare January 11, 2024 02:16
@acwwat acwwat force-pushed the b-aws_iot_ca_certificate-fix_role_arn_data_type branch from 46df850 to b530e35 Compare January 11, 2024 04:09
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 11, 2024
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=TestAccIoTCACertificate_' PKG=iot ACCTEST_PARALLELISM=2 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iot/... -v -count 1 -parallel 2  -run=TestAccIoTCACertificate_ -timeout 360m
=== RUN   TestAccIoTCACertificate_basic
=== PAUSE TestAccIoTCACertificate_basic
=== RUN   TestAccIoTCACertificate_disappears
=== PAUSE TestAccIoTCACertificate_disappears
=== RUN   TestAccIoTCACertificate_tags
=== PAUSE TestAccIoTCACertificate_tags
=== RUN   TestAccIoTCACertificate_defaultMode
=== PAUSE TestAccIoTCACertificate_defaultMode
=== RUN   TestAccIoTCACertificate_registrationConfig
=== PAUSE TestAccIoTCACertificate_registrationConfig
=== CONT  TestAccIoTCACertificate_basic
=== CONT  TestAccIoTCACertificate_defaultMode
--- PASS: TestAccIoTCACertificate_basic (16.21s)
=== CONT  TestAccIoTCACertificate_registrationConfig
--- PASS: TestAccIoTCACertificate_defaultMode (34.35s)
=== CONT  TestAccIoTCACertificate_tags
--- PASS: TestAccIoTCACertificate_registrationConfig (30.33s)
=== CONT  TestAccIoTCACertificate_disappears
--- PASS: TestAccIoTCACertificate_disappears (17.34s)
--- PASS: TestAccIoTCACertificate_tags (41.00s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iot	81.790s

@ewbankkit
Copy link
Contributor

@acwwat Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit e8ee3c9 into hashicorp:main Jan 12, 2024
36 checks passed
@github-actions github-actions bot added this to the v5.33.0 milestone Jan 12, 2024
@acwwat
Copy link
Contributor Author

acwwat commented Jan 12, 2024

Thanks for the update, good to see that there is a way to handle the IAM eventual consistency at the source :)

Copy link

This functionality has been released in v5.32.1 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!

@acwwat acwwat deleted the b-aws_iot_ca_certificate-fix_role_arn_data_type branch January 13, 2024 22:35
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 Feb 13, 2024
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. service/iot Issues and PRs that pertain to the iot service. size/L 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.

[Bug]: aws_iot_ca_certificate registration_config role_arn type mismatch
6 participants