-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
r/iam_instance_profile - add tagging support to instance profile + sweeper #17962
Conversation
Verified acceptance tests: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSIAMInstanceProfile_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSIAMInstanceProfile_ -timeout 120m
=== RUN TestAccAWSIAMInstanceProfile_basic
=== PAUSE TestAccAWSIAMInstanceProfile_basic
=== RUN TestAccAWSIAMInstanceProfile_withoutRole
=== PAUSE TestAccAWSIAMInstanceProfile_withoutRole
=== RUN TestAccAWSIAMInstanceProfile_tags
=== PAUSE TestAccAWSIAMInstanceProfile_tags
=== RUN TestAccAWSIAMInstanceProfile_namePrefix
=== PAUSE TestAccAWSIAMInstanceProfile_namePrefix
=== RUN TestAccAWSIAMInstanceProfile_disappears
=== PAUSE TestAccAWSIAMInstanceProfile_disappears
=== RUN TestAccAWSIAMInstanceProfile_disappears_role
=== PAUSE TestAccAWSIAMInstanceProfile_disappears_role
=== CONT TestAccAWSIAMInstanceProfile_basic
=== CONT TestAccAWSIAMInstanceProfile_disappears
=== CONT TestAccAWSIAMInstanceProfile_disappears_role
=== CONT TestAccAWSIAMInstanceProfile_tags
=== CONT TestAccAWSIAMInstanceProfile_namePrefix
=== CONT TestAccAWSIAMInstanceProfile_withoutRole
--- PASS: TestAccAWSIAMInstanceProfile_disappears (22.11s)
--- PASS: TestAccAWSIAMInstanceProfile_withoutRole (22.58s)
--- PASS: TestAccAWSIAMInstanceProfile_disappears_role (22.69s)
--- PASS: TestAccAWSIAMInstanceProfile_basic (25.18s)
--- PASS: TestAccAWSIAMInstanceProfile_namePrefix (26.87s)
--- PASS: TestAccAWSIAMInstanceProfile_tags (41.52s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 41.641s |
Running the sweeper: $ TEST=./aws SWEEP=us-west-2 SWEEPARGS=-sweep-run=aws_iam_instance_profile make sweep
WARNING: This will destroy infrastructure. Use only in development accounts.
go test ./aws -v -sweep=us-west-2 -sweep-run=aws_iam_instance_profile -timeout 60m
2021/03/06 16:39:38 [DEBUG] Running Sweepers for region (us-west-2):
2021/03/06 16:39:38 [DEBUG] Running Sweeper (aws_iam_instance_profile) in region (us-west-2)
2021/03/06 16:39:38 [INFO] AWS Auth provider used: "EnvProvider"
2021/03/06 16:39:38 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/03/06 16:39:38 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/03/06 16:39:39 [ERROR] error deleting IAM Instance Profile (kit-assumable-role): deleting IAM instance profile kit-assumable-role: DeleteConflict: Cannot delete entity, must remove roles from instance profile first.
status code: 409, request id: ef65b42d-54c2-4085-8e2f-82ebec2f9d12
2021/03/06 16:39:39 [ERROR] Error running Sweeper (aws_iam_instance_profile) in region (us-west-2): 1 error occurred:
* error deleting IAM Instance Profile (kit-assumable-role): deleting IAM instance profile kit-assumable-role: DeleteConflict: Cannot delete entity, must remove roles from instance profile first.
status code: 409, request id: ef65b42d-54c2-4085-8e2f-82ebec2f9d12
FAIL github.com/terraform-providers/terraform-provider-aws/aws 1.241s
FAIL
GNUmakefile:20: recipe for target 'sweep' failed
make: *** [sweep] Error 1 I think you'll need to add |
Thanks! added sweeper dep. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you, @DrFaust92 🚀
Output from acceptance testing in AWS Commercial:
--- PASS: TestAccAWSIAMInstanceProfile_withoutRole (24.71s)
--- PASS: TestAccAWSIAMInstanceProfile_disappears_role (25.87s)
--- PASS: TestAccAWSIAMInstanceProfile_disappears (26.09s)
--- PASS: TestAccAWSIAMInstanceProfile_namePrefix (28.30s)
--- PASS: TestAccAWSIAMInstanceProfile_basic (31.35s)
--- PASS: TestAccAWSIAMInstanceProfile_tags (44.67s)
Output from acceptance testing in AWS GovCloud (US):
--- PASS: TestAccAWSIAMInstanceProfile_withoutRole (32.70s)
--- PASS: TestAccAWSIAMInstanceProfile_disappears_role (34.17s)
--- PASS: TestAccAWSIAMInstanceProfile_disappears (34.40s)
--- PASS: TestAccAWSIAMInstanceProfile_basic (39.09s)
--- PASS: TestAccAWSIAMInstanceProfile_namePrefix (41.02s)
--- PASS: TestAccAWSIAMInstanceProfile_tags (69.02s)
This has been released in version 3.34.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 for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Relates #17594
Output from acceptance testing: