-
Notifications
You must be signed in to change notification settings - Fork 4.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
Change credential_types output to credential_type #5975
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should it also be wrapped with square brackets if the length is over 1? I ask because of this example in the issue:
"credential_types": ["assumed_role"]
.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.
Note too, that the role_arns is an array type as well and should just be role_arn. I'd also assume that when you set role_arn that it conflicts with policy_arn and policy.
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.
@tyrannosaurus-becks The brackets are just the way it's being displayed. They're caused by the fact that it's coming back as an array even though the input is (now) a single string. The only reason it would be multiple values at this point is legacy roles, so this is a way to still allow legacy roles to display possibly more than one type while making the output the same type as the input.
@jasonmcintosh
I'd also assume that when you set role_arn that it conflicts with policy_arn and policy.
-- can you explain?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.
so if you set role_arn, that should be a conflicts with policy_document values. As I believe you don't want to try and modify a role.... just trying to think of the combinations and how they interact on this.
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.
@jasonmcintosh I'm not really following. Why should
role_arns
berole_arn
? The logic allows for multiple values.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.
@jefferai Not saying role_arns should be role_arn - saying role_arns should conflict with policy_arn and policy - as you can't have both a role_arn you're explicitly providing as well as a dynamically generated account.
Will see if this solves one of my headaches using terraform resource vault_generic_secret to create various vault roles. Still need to get the vault provider in terraform to work with this as well. https://github.com/terraform-providers/terraform-provider-vault/blob/master/vault/resource_aws_secret_backend_role.go . currently doesn't support role_arns :(
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.
Hey @jasonmcintosh, agree that role_arns and policy_arns don't make sense together. The role creation code, I believe, prohibits creating roles with both values.
role_arns and policy_document are compatible -- the latter will scope down the the permissions granted to a role being assumed.
Is there something I'm missing in what you're saying?