-
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
aws_iam_role name_prefix size #20785
aws_iam_role name_prefix size #20785
Conversation
For hashicorp mantainers: We can either adopt solution 1 or 2. Just let me know and I can change the values of it based on whatever you think is best, right now the PR has both solutions so it need to be changed. |
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.
Welcome @caiodelgadonew 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
@breathingdust , what do you think about it? Can we change to 64 characters or should we just add the description of the character limit? |
@caiodelgadonew Thanks for working on this. |
…rs according to aws documentation
Hello @ewbankkit , I've just set the modifications expected, could you please verify it to merge? |
Acceptance test output: % make testacc TESTARGS='-run=TestAccAWSIAMRole_basic\|TestAccAWSIAMRole_Name' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSIAMRole_basic\|TestAccAWSIAMRole_Name -timeout 180m === RUN TestAccAWSIAMRole_basic === PAUSE TestAccAWSIAMRole_basic === RUN TestAccAWSIAMRole_basicWithDescription === PAUSE TestAccAWSIAMRole_basicWithDescription === RUN TestAccAWSIAMRole_NameGenerated === PAUSE TestAccAWSIAMRole_NameGenerated === RUN TestAccAWSIAMRole_NamePrefix === PAUSE TestAccAWSIAMRole_NamePrefix === CONT TestAccAWSIAMRole_basic === CONT TestAccAWSIAMRole_NamePrefix === CONT TestAccAWSIAMRole_NameGenerated === CONT TestAccAWSIAMRole_basicWithDescription --- PASS: TestAccAWSIAMRole_basic (15.42s) --- PASS: TestAccAWSIAMRole_NamePrefix (34.60s) --- PASS: TestAccAWSIAMRole_basicWithDescription (48.39s) --- PASS: TestAccAWSIAMRole_NameGenerated (95.65s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 98.853s
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.
LGTM 🚀.
Commercial
% make testacc TESTARGS='-run=TestAccAWSIAMRole_\|TestAccAWSDataSourceIAMSessionContext_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSIAMRole_\|TestAccAWSDataSourceIAMSessionContext_ -timeout 180m
=== RUN TestAccAWSDataSourceIAMSessionContext_basic
=== PAUSE TestAccAWSDataSourceIAMSessionContext_basic
=== RUN TestAccAWSDataSourceIAMSessionContext_withPath
=== PAUSE TestAccAWSDataSourceIAMSessionContext_withPath
=== RUN TestAccAWSDataSourceIAMSessionContext_notAssumedRole
=== PAUSE TestAccAWSDataSourceIAMSessionContext_notAssumedRole
=== RUN TestAccAWSDataSourceIAMSessionContext_notAssumedRoleWithPath
=== PAUSE TestAccAWSDataSourceIAMSessionContext_notAssumedRoleWithPath
=== RUN TestAccAWSDataSourceIAMSessionContext_notAssumedRoleUser
=== PAUSE TestAccAWSDataSourceIAMSessionContext_notAssumedRoleUser
=== RUN TestAccAWSIAMRole_basic
=== PAUSE TestAccAWSIAMRole_basic
=== RUN TestAccAWSIAMRole_basicWithDescription
=== PAUSE TestAccAWSIAMRole_basicWithDescription
=== RUN TestAccAWSIAMRole_NameGenerated
=== PAUSE TestAccAWSIAMRole_NameGenerated
=== RUN TestAccAWSIAMRole_NamePrefix
=== PAUSE TestAccAWSIAMRole_NamePrefix
=== RUN TestAccAWSIAMRole_testNameChange
=== PAUSE TestAccAWSIAMRole_testNameChange
=== RUN TestAccAWSIAMRole_badJSON
=== PAUSE TestAccAWSIAMRole_badJSON
=== RUN TestAccAWSIAMRole_disappears
=== PAUSE TestAccAWSIAMRole_disappears
=== RUN TestAccAWSIAMRole_force_detach_policies
=== PAUSE TestAccAWSIAMRole_force_detach_policies
=== RUN TestAccAWSIAMRole_MaxSessionDuration
=== PAUSE TestAccAWSIAMRole_MaxSessionDuration
=== RUN TestAccAWSIAMRole_PermissionsBoundary
=== PAUSE TestAccAWSIAMRole_PermissionsBoundary
=== RUN TestAccAWSIAMRole_tags
=== PAUSE TestAccAWSIAMRole_tags
=== RUN TestAccAWSIAMRole_policyBasicInline
=== PAUSE TestAccAWSIAMRole_policyBasicInline
=== RUN TestAccAWSIAMRole_policyBasicInlineEmpty
=== PAUSE TestAccAWSIAMRole_policyBasicInlineEmpty
=== RUN TestAccAWSIAMRole_policyBasicManaged
=== PAUSE TestAccAWSIAMRole_policyBasicManaged
=== RUN TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_managedNonEmpty
=== PAUSE TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_managedNonEmpty
=== RUN TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_inlineNonEmpty
=== PAUSE TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_inlineNonEmpty
=== RUN TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedNonEmpty
=== PAUSE TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedNonEmpty
=== RUN TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineNonEmpty
=== PAUSE TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineNonEmpty
=== RUN TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_inlineNonExistent
=== PAUSE TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_inlineNonExistent
=== RUN TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_managedNonExistent
=== PAUSE TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_managedNonExistent
=== RUN TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineEmpty
=== PAUSE TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineEmpty
=== RUN TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedEmpty
=== PAUSE TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedEmpty
=== CONT TestAccAWSDataSourceIAMSessionContext_basic
=== CONT TestAccAWSIAMRole_PermissionsBoundary
=== CONT TestAccAWSIAMRole_NameGenerated
=== CONT TestAccAWSIAMRole_basicWithDescription
=== CONT TestAccAWSDataSourceIAMSessionContext_notAssumedRoleUser
=== CONT TestAccAWSDataSourceIAMSessionContext_notAssumedRole
=== CONT TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedNonEmpty
=== CONT TestAccAWSIAMRole_policyBasicInlineEmpty
=== CONT TestAccAWSIAMRole_policyBasicInline
=== CONT TestAccAWSIAMRole_tags
=== CONT TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedEmpty
=== CONT TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineEmpty
=== CONT TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_managedNonExistent
=== CONT TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_inlineNonExistent
=== CONT TestAccAWSIAMRole_policyBasicManaged
=== CONT TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_inlineNonEmpty
=== CONT TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineNonEmpty
=== CONT TestAccAWSIAMRole_disappears
=== CONT TestAccAWSDataSourceIAMSessionContext_notAssumedRoleWithPath
=== CONT TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_managedNonEmpty
--- PASS: TestAccAWSDataSourceIAMSessionContext_notAssumedRoleUser (28.70s)
=== CONT TestAccAWSIAMRole_MaxSessionDuration
--- PASS: TestAccAWSDataSourceIAMSessionContext_notAssumedRoleWithPath (31.85s)
=== CONT TestAccAWSIAMRole_badJSON
--- PASS: TestAccAWSIAMRole_disappears (34.54s)
=== CONT TestAccAWSIAMRole_testNameChange
--- PASS: TestAccAWSIAMRole_policyBasicInlineEmpty (35.79s)
=== CONT TestAccAWSIAMRole_NamePrefix
--- PASS: TestAccAWSIAMRole_badJSON (6.54s)
=== CONT TestAccAWSDataSourceIAMSessionContext_withPath
--- PASS: TestAccAWSDataSourceIAMSessionContext_basic (38.80s)
=== CONT TestAccAWSIAMRole_force_detach_policies
--- PASS: TestAccAWSDataSourceIAMSessionContext_notAssumedRole (38.81s)
=== CONT TestAccAWSIAMRole_basic
--- PASS: TestAccAWSIAMRole_NameGenerated (45.44s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_managedNonExistent (61.31s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineEmpty (68.60s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_inlineNonEmpty (69.57s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedEmpty (70.44s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineNonEmpty (70.88s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedNonEmpty (71.39s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_managedNonEmpty (72.68s)
--- PASS: TestAccAWSIAMRole_tags (74.00s)
--- PASS: TestAccAWSIAMRole_NamePrefix (38.57s)
--- PASS: TestAccAWSDataSourceIAMSessionContext_withPath (36.03s)
--- PASS: TestAccAWSIAMRole_basic (35.82s)
--- PASS: TestAccAWSIAMRole_force_detach_policies (38.18s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_inlineNonExistent (81.10s)
--- PASS: TestAccAWSIAMRole_basicWithDescription (86.73s)
--- PASS: TestAccAWSIAMRole_policyBasicManaged (88.46s)
--- PASS: TestAccAWSIAMRole_policyBasicInline (89.03s)
--- PASS: TestAccAWSIAMRole_testNameChange (54.89s)
--- PASS: TestAccAWSIAMRole_MaxSessionDuration (61.48s)
--- PASS: TestAccAWSIAMRole_PermissionsBoundary (105.29s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 108.464s
GovCloud
% make testacc TESTARGS='-run=TestAccAWSIAMRole_\|TestAccAWSDataSourceIAMSessionContext_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSIAMRole_\|TestAccAWSDataSourceIAMSessionContext_ -timeout 180m
=== RUN TestAccAWSDataSourceIAMSessionContext_basic
=== PAUSE TestAccAWSDataSourceIAMSessionContext_basic
=== RUN TestAccAWSDataSourceIAMSessionContext_withPath
=== PAUSE TestAccAWSDataSourceIAMSessionContext_withPath
=== RUN TestAccAWSDataSourceIAMSessionContext_notAssumedRole
=== PAUSE TestAccAWSDataSourceIAMSessionContext_notAssumedRole
=== RUN TestAccAWSDataSourceIAMSessionContext_notAssumedRoleWithPath
=== PAUSE TestAccAWSDataSourceIAMSessionContext_notAssumedRoleWithPath
=== RUN TestAccAWSDataSourceIAMSessionContext_notAssumedRoleUser
=== PAUSE TestAccAWSDataSourceIAMSessionContext_notAssumedRoleUser
=== RUN TestAccAWSIAMRole_basic
=== PAUSE TestAccAWSIAMRole_basic
=== RUN TestAccAWSIAMRole_basicWithDescription
=== PAUSE TestAccAWSIAMRole_basicWithDescription
=== RUN TestAccAWSIAMRole_NameGenerated
=== PAUSE TestAccAWSIAMRole_NameGenerated
=== RUN TestAccAWSIAMRole_NamePrefix
=== PAUSE TestAccAWSIAMRole_NamePrefix
=== RUN TestAccAWSIAMRole_testNameChange
=== PAUSE TestAccAWSIAMRole_testNameChange
=== RUN TestAccAWSIAMRole_badJSON
=== PAUSE TestAccAWSIAMRole_badJSON
=== RUN TestAccAWSIAMRole_disappears
=== PAUSE TestAccAWSIAMRole_disappears
=== RUN TestAccAWSIAMRole_force_detach_policies
=== PAUSE TestAccAWSIAMRole_force_detach_policies
=== RUN TestAccAWSIAMRole_MaxSessionDuration
=== PAUSE TestAccAWSIAMRole_MaxSessionDuration
=== RUN TestAccAWSIAMRole_PermissionsBoundary
=== PAUSE TestAccAWSIAMRole_PermissionsBoundary
=== RUN TestAccAWSIAMRole_tags
=== PAUSE TestAccAWSIAMRole_tags
=== RUN TestAccAWSIAMRole_policyBasicInline
=== PAUSE TestAccAWSIAMRole_policyBasicInline
=== RUN TestAccAWSIAMRole_policyBasicInlineEmpty
=== PAUSE TestAccAWSIAMRole_policyBasicInlineEmpty
=== RUN TestAccAWSIAMRole_policyBasicManaged
=== PAUSE TestAccAWSIAMRole_policyBasicManaged
=== RUN TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_managedNonEmpty
=== PAUSE TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_managedNonEmpty
=== RUN TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_inlineNonEmpty
=== PAUSE TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_inlineNonEmpty
=== RUN TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedNonEmpty
=== PAUSE TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedNonEmpty
=== RUN TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineNonEmpty
=== PAUSE TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineNonEmpty
=== RUN TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_inlineNonExistent
=== PAUSE TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_inlineNonExistent
=== RUN TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_managedNonExistent
=== PAUSE TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_managedNonExistent
=== RUN TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineEmpty
=== PAUSE TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineEmpty
=== RUN TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedEmpty
=== PAUSE TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedEmpty
=== CONT TestAccAWSDataSourceIAMSessionContext_basic
=== CONT TestAccAWSIAMRole_PermissionsBoundary
=== CONT TestAccAWSIAMRole_policyBasicManaged
=== CONT TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_inlineNonEmpty
=== CONT TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_managedNonExistent
=== CONT TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedEmpty
=== CONT TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineEmpty
=== CONT TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_inlineNonExistent
=== CONT TestAccAWSIAMRole_policyBasicInline
=== CONT TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedNonEmpty
=== CONT TestAccAWSIAMRole_tags
=== CONT TestAccAWSIAMRole_NameGenerated
=== CONT TestAccAWSIAMRole_MaxSessionDuration
=== CONT TestAccAWSIAMRole_force_detach_policies
=== CONT TestAccAWSIAMRole_disappears
=== CONT TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineNonEmpty
=== CONT TestAccAWSIAMRole_badJSON
=== CONT TestAccAWSIAMRole_testNameChange
=== CONT TestAccAWSDataSourceIAMSessionContext_notAssumedRoleUser
=== CONT TestAccAWSIAMRole_policyBasicInlineEmpty
--- PASS: TestAccAWSIAMRole_badJSON (9.94s)
=== CONT TestAccAWSIAMRole_NamePrefix
--- PASS: TestAccAWSDataSourceIAMSessionContext_notAssumedRoleUser (28.70s)
=== CONT TestAccAWSIAMRole_basicWithDescription
--- PASS: TestAccAWSIAMRole_disappears (35.27s)
=== CONT TestAccAWSDataSourceIAMSessionContext_notAssumedRole
--- PASS: TestAccAWSIAMRole_policyBasicInlineEmpty (43.57s)
=== CONT TestAccAWSIAMRole_basic
--- PASS: TestAccAWSDataSourceIAMSessionContext_basic (43.88s)
=== CONT TestAccAWSDataSourceIAMSessionContext_notAssumedRoleWithPath
--- PASS: TestAccAWSIAMRole_NameGenerated (48.44s)
=== CONT TestAccAWSDataSourceIAMSessionContext_withPath
--- PASS: TestAccAWSIAMRole_NamePrefix (39.97s)
=== CONT TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_managedNonEmpty
--- PASS: TestAccAWSIAMRole_force_detach_policies (54.26s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_managedNonExistent (61.96s)
--- PASS: TestAccAWSDataSourceIAMSessionContext_notAssumedRole (32.92s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineEmpty (74.61s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedEmpty (75.18s)
--- PASS: TestAccAWSIAMRole_tags (76.02s)
--- PASS: TestAccAWSDataSourceIAMSessionContext_notAssumedRoleWithPath (32.31s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_inlineNonEmpty (76.70s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_inlineNonEmpty (77.17s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandAdditionRemoved_managedNonEmpty (78.53s)
--- PASS: TestAccAWSIAMRole_MaxSessionDuration (80.01s)
--- PASS: TestAccAWSDataSourceIAMSessionContext_withPath (32.31s)
--- PASS: TestAccAWSIAMRole_basic (37.82s)
--- PASS: TestAccAWSIAMRole_testNameChange (82.19s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandAdditionIgnored_inlineNonExistent (86.72s)
--- PASS: TestAccAWSIAMRole_policyBasicInline (99.18s)
--- PASS: TestAccAWSIAMRole_policyBasicManaged (99.43s)
--- PASS: TestAccAWSIAMRole_policyOutOfBandRemovalAddedBack_managedNonEmpty (51.05s)
--- PASS: TestAccAWSIAMRole_basicWithDescription (72.86s)
--- PASS: TestAccAWSIAMRole_PermissionsBoundary (118.23s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 121.414s
@caiodelgadonew Thanks for the contribution 🎉 👏. |
This functionality has been released in v3.59.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! |
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. |
Community Note
This PR aims to increase the
name_prefix
size ofaws_iam_role
to 64 characters as described as a maximum of the documentationRight now we have 26 characters being randomly generated for
name_prefix
that gives us just 6 characters to work.There's 2 possible solutions:
name_prefix
to 64 characters.