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

iam: Improve ISO tag handling #23283

Merged
merged 13 commits into from
Feb 18, 2022
Merged

iam: Improve ISO tag handling #23283

merged 13 commits into from
Feb 18, 2022

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Feb 18, 2022

Community Note

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

Relates #22532
Closes #23286

Output from acceptance testing:

% make testacc TESTS=TestAccIAMInstanceProfile_ PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMInstanceProfile_'  -timeout 180m
--- PASS: TestAccIAMInstanceProfile_Disappears_role (22.21s)
--- PASS: TestAccIAMInstanceProfile_disappears (22.49s)
--- PASS: TestAccIAMInstanceProfile_withoutRole (24.29s)
--- PASS: TestAccIAMInstanceProfile_basic (24.89s)
--- PASS: TestAccIAMInstanceProfile_namePrefix (24.90s)
--- PASS: TestAccIAMInstanceProfile_tags (46.92s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	48.541s
% make testacc TESTS=TestAccIAMOpenIDConnectProvider_ PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMOpenIDConnectProvider_'  -timeout 180m
--- PASS: TestAccIAMOpenIDConnectProvider_disappears (12.61s)
--- PASS: TestAccIAMOpenIDConnectProvider_basic (27.61s)
--- PASS: TestAccIAMOpenIDConnectProvider_tags (37.40s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	39.338s
% make testacc TESTS=TestAccIAMPolicy_ PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMPolicy_'  -timeout 180m
--- PASS: TestAccIAMPolicy_disappears (14.01s)
--- PASS: TestAccIAMPolicy_namePrefix (18.04s)
--- PASS: TestAccIAMPolicy_basic (18.04s)
--- PASS: TestAccIAMPolicy_description (18.08s)
--- PASS: TestAccIAMPolicy_path (18.09s)
--- PASS: TestAccIAMPolicy_policy (27.58s)
--- PASS: TestAccIAMPolicy_tags (36.86s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	38.506s
% make testacc TESTS=TestAccIAMSAMLProvider PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMSAMLProvider'  -timeout 180m
--- PASS: TestAccIAMSAMLProvider_disappears (13.93s)
--- PASS: TestAccIAMSAMLProvider_basic (29.92s)
--- PASS: TestAccIAMSAMLProvider_tags (40.84s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	42.488s
% make testacc TESTS=TestAccIAMServerCertificate PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMServerCertificate'  -timeout 180m
--- PASS: TestAccIAMServerCertificateDataSource_matchNamePrefix (4.66s)
--- PASS: TestAccIAMServerCertificate_disappears (17.80s)
--- PASS: TestAccIAMServerCertificate_Name_prefix (20.35s)
--- PASS: TestAccIAMServerCertificateDataSource_basic (20.68s)
--- PASS: TestAccIAMServerCertificateDataSource_path (20.77s)
--- PASS: TestAccIAMServerCertificate_path (22.88s)
--- PASS: TestAccIAMServerCertificate_basic (22.93s)
--- PASS: TestAccIAMServerCertificate_file (32.95s)
--- PASS: TestAccIAMServerCertificate_tags (46.10s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	48.800s
% make testacc TESTS=TestAccIAMServiceLinkedRole PKG=iam     
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMServiceLinkedRole'  -timeout 180m
--- PASS: TestAccIAMServiceLinkedRole_disappears (25.11s)
--- PASS: TestAccIAMServiceLinkedRole_basic (30.96s)
--- PASS: TestAccIAMServiceLinkedRole_CustomSuffix_diffSuppressFunc (30.98s)
--- PASS: TestAccIAMServiceLinkedRole_customSuffix (31.02s)
--- PASS: TestAccIAMServiceLinkedRole_description (43.59s)
--- PASS: TestAccIAMServiceLinkedRole_tags (53.67s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	55.516s
% make testacc TESTS=TestAccIAMVirtualMFADevice_ PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMVirtualMFADevice_'  -timeout 180m
--- PASS: TestAccIAMVirtualMFADevice_disappears (13.35s)
--- PASS: TestAccIAMVirtualMFADevice_basic (17.62s)
--- PASS: TestAccIAMVirtualMFADevice_tags (40.08s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	42.001s

@github-actions github-actions bot added service/iam Issues and PRs that pertain to the iam service. size/S Managed by automation to categorize the size of a PR. and removed service/iam Issues and PRs that pertain to the iam service. labels Feb 18, 2022
@github-actions github-actions bot added the service/iam Issues and PRs that pertain to the iam service. label Feb 18, 2022
@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 Feb 18, 2022
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label Feb 18, 2022
@github-actions github-actions bot added size/L 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 Feb 18, 2022
@github-actions github-actions bot added provider Pertains to the provider itself, rather than any interaction with AWS. sweeper Pertains to changes to or issues with the sweeper. labels Feb 18, 2022
@gdavison gdavison added this to the v4.2.0 milestone Feb 18, 2022
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Feb 18, 2022
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 TESTS=TestAccIAMInstanceProfile_ PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMInstanceProfile_'  -timeout 180m
=== RUN   TestAccIAMInstanceProfile_basic
=== PAUSE TestAccIAMInstanceProfile_basic
=== RUN   TestAccIAMInstanceProfile_withoutRole
=== PAUSE TestAccIAMInstanceProfile_withoutRole
=== RUN   TestAccIAMInstanceProfile_tags
=== PAUSE TestAccIAMInstanceProfile_tags
=== RUN   TestAccIAMInstanceProfile_namePrefix
=== PAUSE TestAccIAMInstanceProfile_namePrefix
=== RUN   TestAccIAMInstanceProfile_disappears
=== PAUSE TestAccIAMInstanceProfile_disappears
=== RUN   TestAccIAMInstanceProfile_Disappears_role
=== PAUSE TestAccIAMInstanceProfile_Disappears_role
=== CONT  TestAccIAMInstanceProfile_basic
=== CONT  TestAccIAMInstanceProfile_namePrefix
=== CONT  TestAccIAMInstanceProfile_Disappears_role
=== CONT  TestAccIAMInstanceProfile_disappears
=== CONT  TestAccIAMInstanceProfile_withoutRole
=== CONT  TestAccIAMInstanceProfile_tags
--- PASS: TestAccIAMInstanceProfile_disappears (30.48s)
--- PASS: TestAccIAMInstanceProfile_withoutRole (30.49s)
--- PASS: TestAccIAMInstanceProfile_Disappears_role (30.56s)
--- PASS: TestAccIAMInstanceProfile_namePrefix (34.03s)
--- PASS: TestAccIAMInstanceProfile_basic (34.16s)
--- PASS: TestAccIAMInstanceProfile_tags (61.70s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	69.006s

Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

I've found a number of spots where the warning message and error message don't correspond when adding tags after creation

internal/service/iam/instance_profile.go Outdated Show resolved Hide resolved
internal/service/iam/saml_provider.go Outdated Show resolved Hide resolved
internal/service/iam/service_linked_role.go Outdated Show resolved Hide resolved
internal/service/iam/service_linked_role.go Outdated Show resolved Hide resolved
internal/service/iam/virtual_mfa_device.go Outdated Show resolved Hide resolved
@YakDriver YakDriver merged commit b669c0d into main Feb 18, 2022
@YakDriver YakDriver deleted the b-iso-tagging-iam-profile branch February 18, 2022 22:44
@github-actions
Copy link

This functionality has been released in v4.2.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 May 14, 2022
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/iam Issues and PRs that pertain to the iam service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. 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.

IAM: Errors from tags in ISO regions
3 participants