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: ISO-friendly tagging #22544

Merged
merged 6 commits into from Jan 12, 2022
Merged

iam: ISO-friendly tagging #22544

merged 6 commits into from Jan 12, 2022

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Jan 12, 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

Closes #18898
Relates #18593
Relates #22532

Output from acceptance testing (us-west-2):

(* 3 pre-existing failures)

% make testacc TESTS='TestAccIAMRoleDataSource_|TestAccIAMRole_' PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMRoleDataSource_|TestAccIAMRole_'  -timeout 180m
--- PASS: TestAccIAMRole_badJSON (6.76s)
--- FAIL: TestAccIAMRole_InlinePolicy_empty (24.54s)
--- PASS: TestAccIAMRole_disappears (30.32s)
--- PASS: TestAccIAMRoleDataSource_basic (35.38s)
--- PASS: TestAccIAMRole_nameGenerated (42.53s)
--- PASS: TestAccIAMRole_policiesForceDetach (43.53s)
--- FAIL: TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack (50.18s)
--- FAIL: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty (54.42s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored (58.48s)
--- PASS: TestAccIAMRole_basic (35.88s)
--- PASS: TestAccIAMRoleDataSource_tags (31.88s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty (62.66s)
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved (63.04s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved (63.44s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack (64.85s)
--- PASS: TestAccIAMRole_tags (65.48s)
--- PASS: TestAccIAMRole_maxSessionDuration (70.51s)
--- PASS: TestAccIAMRole_namePrefix (29.10s)
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored (73.85s)
--- PASS: TestAccIAMRole_InlinePolicy_ignoreOrder (78.97s)
--- PASS: TestAccIAMRole_basicWithDescription (74.54s)
--- PASS: TestAccIAMRole_InlinePolicy_basic (81.90s)
--- PASS: TestAccIAMRole_ManagedPolicy_basic (82.29s)
--- PASS: TestAccIAMRole_testNameChange (48.85s)
--- PASS: TestAccIAMRole_permissionsBoundary (103.02s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/iam	104.590s
% make testacc TESTS='TestAccIAMUserDataSource_|TestAccIAMUser_' PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMUserDataSource_|TestAccIAMUser_'  -timeout 180m
--- PASS: TestAccIAMUser_disappears (21.89s)
--- PASS: TestAccIAMUserDataSource_tags (24.78s)
--- PASS: TestAccIAMUser_ForceDestroy_accessKey (29.05s)
--- PASS: TestAccIAMUser_ForceDestroy_sshKey (29.16s)
--- PASS: TestAccIAMUser_ForceDestroy_signingCertificate (29.17s)
--- PASS: TestAccIAMUser_ForceDestroy_mfaDevice (29.32s)
--- PASS: TestAccIAMUserDataSource_basic (33.02s)
--- PASS: TestAccIAMUser_basic (41.29s)
--- PASS: TestAccIAMUser_tags (41.30s)
--- PASS: TestAccIAMUser_nameChange (41.36s)
--- PASS: TestAccIAMUser_pathChange (42.79s)
--- PASS: TestAccIAMUser_permissionsBoundary (68.50s)
--- PASS: TestAccIAMUser_ForceDestroy_loginProfile (85.52s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	87.366s

Output from acceptance testing (GovCloud):

(* 3 pre-existing failures)

% make testacc TESTS='TestAccIAMRoleDataSource_|TestAccIAMRole_' PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMRoleDataSource_|TestAccIAMRole_'  -timeout 180m
--- PASS: TestAccIAMRole_badJSON (6.76s)
--- FAIL: TestAccIAMRole_InlinePolicy_empty (22.99s)
--- PASS: TestAccIAMRole_disappears (32.64s)
--- PASS: TestAccIAMRoleDataSource_basic (40.13s)
--- PASS: TestAccIAMRole_nameGenerated (40.66s)
--- PASS: TestAccIAMRole_basic (46.05s)
--- PASS: TestAccIAMRole_policiesForceDetach (48.69s)
--- FAIL: TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack (55.93s)
--- FAIL: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty (59.20s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored (63.66s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty (66.74s)
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved (68.63s)
--- PASS: TestAccIAMRole_namePrefix (36.32s)
--- PASS: TestAccIAMRole_tags (69.55s)
--- PASS: TestAccIAMRoleDataSource_tags (31.93s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved (73.12s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack (73.55s)
--- PASS: TestAccIAMRole_maxSessionDuration (73.74s)
--- PASS: TestAccIAMRole_testNameChange (76.04s)
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored (82.27s)
--- PASS: TestAccIAMRole_basicWithDescription (90.10s)
--- PASS: TestAccIAMRole_InlinePolicy_basic (93.27s)
--- PASS: TestAccIAMRole_InlinePolicy_ignoreOrder (67.37s)
--- PASS: TestAccIAMRole_ManagedPolicy_basic (81.44s)
--- PASS: TestAccIAMRole_permissionsBoundary (120.75s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/iam	122.301s
% make testacc TESTS='TestAccIAMUserDataSource_|TestAccIAMUser_' PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMUserDataSource_|TestAccIAMUser_'  -timeout 180m
--- PASS: TestAccIAMUserDataSource_basic (31.52s)
--- PASS: TestAccIAMUserDataSource_tags (31.59s)
--- PASS: TestAccIAMUser_ForceDestroy_loginProfile (37.72s)
--- PASS: TestAccIAMUser_disappears (37.97s)
--- PASS: TestAccIAMUser_ForceDestroy_sshKey (38.03s)
--- PASS: TestAccIAMUser_ForceDestroy_signingCertificate (38.17s)
--- PASS: TestAccIAMUser_ForceDestroy_accessKey (38.31s)
--- PASS: TestAccIAMUser_ForceDestroy_mfaDevice (38.49s)
--- PASS: TestAccIAMUser_nameChange (53.62s)
--- PASS: TestAccIAMUser_tags (53.96s)
--- PASS: TestAccIAMUser_basic (53.99s)
--- PASS: TestAccIAMUser_pathChange (54.18s)
--- PASS: TestAccIAMUser_permissionsBoundary (105.08s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	107.022s

@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. service/iam Issues and PRs that pertain to the iam service. labels Jan 12, 2022
@YakDriver YakDriver mentioned this pull request Jan 12, 2022
27 tasks
@YakDriver YakDriver changed the title iam: ISO-friendly tagging iam/role: ISO-friendly tagging Jan 12, 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 Jan 12, 2022
@YakDriver YakDriver changed the title iam/role: ISO-friendly tagging iam: ISO-friendly tagging Jan 12, 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 TESTARGS='-run=TestAccIAMRoleDataSource_\|TestAccIAMRole_\|TestAccIAMUserDataSource_\|TestAccIAMUser_' PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20  -run=TestAccIAMRoleDataSource_\|TestAccIAMRole_\|TestAccIAMUserDataSource_\|TestAccIAMUser_ -timeout 180m
=== RUN   TestAccIAMRoleDataSource_basic
=== PAUSE TestAccIAMRoleDataSource_basic
=== RUN   TestAccIAMRoleDataSource_tags
=== PAUSE TestAccIAMRoleDataSource_tags
=== RUN   TestAccIAMRole_basic
=== PAUSE TestAccIAMRole_basic
=== RUN   TestAccIAMRole_basicWithDescription
=== PAUSE TestAccIAMRole_basicWithDescription
=== RUN   TestAccIAMRole_nameGenerated
=== PAUSE TestAccIAMRole_nameGenerated
=== RUN   TestAccIAMRole_namePrefix
=== PAUSE TestAccIAMRole_namePrefix
=== RUN   TestAccIAMRole_testNameChange
=== PAUSE TestAccIAMRole_testNameChange
=== RUN   TestAccIAMRole_badJSON
=== PAUSE TestAccIAMRole_badJSON
=== RUN   TestAccIAMRole_disappears
=== PAUSE TestAccIAMRole_disappears
=== RUN   TestAccIAMRole_policiesForceDetach
=== PAUSE TestAccIAMRole_policiesForceDetach
=== RUN   TestAccIAMRole_maxSessionDuration
=== PAUSE TestAccIAMRole_maxSessionDuration
=== RUN   TestAccIAMRole_permissionsBoundary
=== PAUSE TestAccIAMRole_permissionsBoundary
=== RUN   TestAccIAMRole_tags
=== PAUSE TestAccIAMRole_tags
=== RUN   TestAccIAMRole_InlinePolicy_basic
=== PAUSE TestAccIAMRole_InlinePolicy_basic
=== RUN   TestAccIAMRole_InlinePolicy_ignoreOrder
=== PAUSE TestAccIAMRole_InlinePolicy_ignoreOrder
=== RUN   TestAccIAMRole_InlinePolicy_empty
=== PAUSE TestAccIAMRole_InlinePolicy_empty
=== RUN   TestAccIAMRole_ManagedPolicy_basic
=== PAUSE TestAccIAMRole_ManagedPolicy_basic
=== RUN   TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
=== RUN   TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
=== RUN   TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
=== RUN   TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
=== RUN   TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
=== RUN   TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
=== RUN   TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
=== RUN   TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
=== RUN   TestAccIAMUserDataSource_basic
=== PAUSE TestAccIAMUserDataSource_basic
=== RUN   TestAccIAMUserDataSource_tags
=== PAUSE TestAccIAMUserDataSource_tags
=== RUN   TestAccIAMUser_basic
=== PAUSE TestAccIAMUser_basic
=== RUN   TestAccIAMUser_disappears
=== PAUSE TestAccIAMUser_disappears
=== RUN   TestAccIAMUser_ForceDestroy_accessKey
=== PAUSE TestAccIAMUser_ForceDestroy_accessKey
=== RUN   TestAccIAMUser_ForceDestroy_loginProfile
=== PAUSE TestAccIAMUser_ForceDestroy_loginProfile
=== RUN   TestAccIAMUser_ForceDestroy_mfaDevice
=== PAUSE TestAccIAMUser_ForceDestroy_mfaDevice
=== RUN   TestAccIAMUser_ForceDestroy_sshKey
=== PAUSE TestAccIAMUser_ForceDestroy_sshKey
=== RUN   TestAccIAMUser_ForceDestroy_signingCertificate
=== PAUSE TestAccIAMUser_ForceDestroy_signingCertificate
=== RUN   TestAccIAMUser_nameChange
=== PAUSE TestAccIAMUser_nameChange
=== RUN   TestAccIAMUser_pathChange
=== PAUSE TestAccIAMUser_pathChange
=== RUN   TestAccIAMUser_permissionsBoundary
=== PAUSE TestAccIAMUser_permissionsBoundary
=== RUN   TestAccIAMUser_tags
=== PAUSE TestAccIAMUser_tags
=== CONT  TestAccIAMRoleDataSource_basic
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
=== CONT  TestAccIAMUser_ForceDestroy_mfaDevice
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
=== CONT  TestAccIAMUserDataSource_tags
=== CONT  TestAccIAMUser_ForceDestroy_loginProfile
=== CONT  TestAccIAMUser_tags
=== CONT  TestAccIAMUser_permissionsBoundary
=== CONT  TestAccIAMUser_pathChange
=== CONT  TestAccIAMUser_nameChange
=== CONT  TestAccIAMUser_ForceDestroy_signingCertificate
=== CONT  TestAccIAMUser_ForceDestroy_sshKey
=== CONT  TestAccIAMUserDataSource_basic
=== CONT  TestAccIAMUser_ForceDestroy_accessKey
=== CONT  TestAccIAMUser_disappears
=== CONT  TestAccIAMUser_basic
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
=== CONT  TestAccIAMRole_maxSessionDuration
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
--- PASS: TestAccIAMUser_disappears (39.25s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
--- PASS: TestAccIAMUserDataSource_basic (45.25s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
--- PASS: TestAccIAMUserDataSource_tags (46.39s)
=== CONT  TestAccIAMRole_ManagedPolicy_basic
--- PASS: TestAccIAMRoleDataSource_basic (48.25s)
=== CONT  TestAccIAMRole_InlinePolicy_empty
--- PASS: TestAccIAMUser_ForceDestroy_accessKey (48.78s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
--- PASS: TestAccIAMUser_ForceDestroy_signingCertificate (51.61s)
=== CONT  TestAccIAMRole_InlinePolicy_ignoreOrder
--- PASS: TestAccIAMUser_ForceDestroy_loginProfile (52.82s)
=== CONT  TestAccIAMRole_InlinePolicy_basic
--- PASS: TestAccIAMUser_ForceDestroy_mfaDevice (53.23s)
=== CONT  TestAccIAMRole_namePrefix
--- PASS: TestAccIAMUser_ForceDestroy_sshKey (53.52s)
=== CONT  TestAccIAMRole_permissionsBoundary
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
    role_test.go:774: Step 2/2 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # aws_iam_role.test will be updated in-place
          ~ resource "aws_iam_role" "test" {
                id                    = "tf-acc-test-3803235688671085725"
                name                  = "tf-acc-test-3803235688671085725"
                tags                  = {}
                # (9 unchanged attributes hidden)
        
              + inline_policy {}
                # (1 unchanged block hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
=== CONT  TestAccIAMRole_InlinePolicy_empty
    role_test.go:497: Step 1/1 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # aws_iam_role.test will be updated in-place
          ~ resource "aws_iam_role" "test" {
                id                    = "tf-acc-test-6545782902331658310"
                name                  = "tf-acc-test-6545782902331658310"
                # (9 unchanged attributes hidden)
        
              + inline_policy {}
                # (1 unchanged block hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty (72.34s)
=== CONT  TestAccIAMRole_policiesForceDetach
--- FAIL: TestAccIAMRole_InlinePolicy_empty (30.90s)
=== CONT  TestAccIAMRole_tags
--- PASS: TestAccIAMUser_basic (79.15s)
=== CONT  TestAccIAMRole_badJSON
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored (79.24s)
=== CONT  TestAccIAMRole_disappears
--- PASS: TestAccIAMUser_pathChange (85.14s)
=== CONT  TestAccIAMRole_basicWithDescription
--- PASS: TestAccIAMUser_nameChange (86.49s)
=== CONT  TestAccIAMRole_nameGenerated
--- PASS: TestAccIAMUser_tags (86.53s)
=== CONT  TestAccIAMRole_basic
--- PASS: TestAccIAMRole_badJSON (8.80s)
=== CONT  TestAccIAMRoleDataSource_tags
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved (91.73s)
=== CONT  TestAccIAMRole_testNameChange
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved (92.14s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
    role_test.go:599: Step 2/2 error: Check failed: Check 2/2 error: aws_iam_role.test: Attribute 'inline_policy.#' expected "1", got "2"
--- PASS: TestAccIAMRole_maxSessionDuration (101.77s)
--- FAIL: TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack (67.07s)
--- PASS: TestAccIAMRole_namePrefix (59.71s)
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored (122.37s)
--- PASS: TestAccIAMRole_disappears (45.62s)
--- PASS: TestAccIAMRole_policiesForceDetach (63.63s)
--- PASS: TestAccIAMRoleDataSource_tags (54.08s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty (93.35s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack (96.90s)
--- PASS: TestAccIAMRole_basic (64.82s)
--- PASS: TestAccIAMRole_nameGenerated (64.97s)
--- PASS: TestAccIAMRole_tags (104.41s)
--- PASS: TestAccIAMRole_InlinePolicy_ignoreOrder (136.15s)
--- PASS: TestAccIAMRole_ManagedPolicy_basic (142.66s)
--- PASS: TestAccIAMRole_testNameChange (101.54s)
--- PASS: TestAccIAMRole_InlinePolicy_basic (140.47s)
--- PASS: TestAccIAMUser_permissionsBoundary (196.73s)
--- PASS: TestAccIAMRole_basicWithDescription (125.57s)
--- PASS: TestAccIAMRole_permissionsBoundary (173.84s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/iam	230.973s
FAIL
make: *** [testacc] Error 1

Failures are unrelated to this change.
See:

@YakDriver YakDriver merged commit 4896b83 into main Jan 12, 2022
@YakDriver YakDriver deleted the f-iso-tagging-iam branch January 12, 2022 21:04
@github-actions github-actions bot added this to the v3.72.0 milestone Jan 12, 2022
@github-actions
Copy link

This functionality has been released in v3.72.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 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/iam Issues and PRs that pertain to the iam service. size/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-iso-b delta: Cannot tag IAM users or role
2 participants