-
Notifications
You must be signed in to change notification settings - Fork 549
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
Add user_path and permissions_boundary_arn arguments to aws_secret_backend_role #781
Add user_path and permissions_boundary_arn arguments to aws_secret_backend_role #781
Conversation
Please merge this! I'd love to have this too! |
resource "vault_aws_secret_backend_role" "readonly" {
backend = vault_aws_secret_backend.aws.path
name = "readonly"
credential_type = "iam_user"
policy_arns = [
"arn:aws:iam::aws:policy/ReadOnlyAccess"
]
provisioner "local-exec" {
command = "vault write -address=${var.vault_endpoint} -namespace=${var.vault_namespace} ${vault_aws_secret_backend.aws.path}/roles/readonly user_path=\"/vault-users/${local.vault_namespace_with_dashes}/\" permissions_boundary_arn=\"arn:aws:iam::${data.aws_caller_identity.current.account_id}:policy/policy-boundaries-name\""
}
} Using a provisioner can be a workaround! Just make sure the environment contains Vault in the $PATH that has got a version that supports the new parameters. |
Worked a treat, thank you! 👍 |
Is this likely to make it to the top of the pile for merging? |
824ac62
to
f73a785
Compare
I think I was supposed to sign the CLA when I first submitted this PR but failed to do so. A helpful bot has alerted me to the situation. I've signed it and rebased to address the conflicts. Sorry about the delay on my end. |
Could I ask again when this is likely to be reviewed and merged? |
@jasonodonnell This PR seems to have been forgotten. Is there anything I can do to help get it back on track? |
f73a785
to
4e25264
Compare
Hi @bakeemawaytoys , We'd like to take another look at this PR. If you still have interest, would you mind rebasing it off of main. If not we would be happy to take it over. Thanks, Ben |
Sure thing. I should have some time to rebase it this weekend. |
4e25264
to
7aa86f3
Compare
… and permissions_boundary_arn arguments. Updated the resource's tests to account for the new arguments. Consolidated some duplicate code in the tests into functions. Removed the tests' dependency on AWS credentials because Vault doesn't interact with AWS during CRUD operations on a backend role. It will now be easier to run the tests on the aws_secret_backend_role resource. Split two large multiline strings into smaller strings to make it easier modify them. (hashicorp#781)
7aa86f3
to
357e5d6
Compare
Some of my changes to the test file made for a tricky rebase, but I think it is all set. |
@bakeemawaytoys thanks! |
Hi @bakeemawaytoys, it looks like this PR has broken some of the acceptance tests (see below for an example). Please let us know if you need an assist here. Thanks, Ben
|
… and permissions_boundary_arn arguments. Updated the resource's tests to account for the new arguments. Consolidated some duplicate code in the tests into functions. Removed the tests' dependency on AWS credentials because Vault doesn't interact with AWS during CRUD operations on a backend role. It will now be easier to run the tests on the aws_secret_backend_role resource. Split two large multiline strings into smaller strings to make it easier modify them. (hashicorp#781)
357e5d6
to
1445718
Compare
… and permissions_boundary_arn arguments. Updated the resource's tests to account for the new arguments. Consolidated some duplicate code in the tests into functions. Removed the tests' dependency on AWS credentials because Vault doesn't interact with AWS during CRUD operations on a backend role. It will now be easier to run the tests on the aws_secret_backend_role resource. Split two large multiline strings into smaller strings to make it easier modify them. (hashicorp#781)
1445718
to
00660c0
Compare
@benashz I fixed the failing tests and a few others that revealed themselves after I fixed the initial issue. Sorry for not catching that myself. |
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 good. I only have a few comments/suggestions that need to be addressed before approval.
… and permissions_boundary_arn arguments. Updated the resource's tests to account for the new arguments. Consolidated some duplicate code in the tests into functions. Removed the tests' dependency on AWS credentials because Vault doesn't interact with AWS during CRUD operations on a backend role. It will now be easier to run the tests on the aws_secret_backend_role resource. Split two large multiline strings into smaller strings to make it easier modify them. (hashicorp#781)
00660c0
to
d5ab5fd
Compare
… and permissions_boundary_arn arguments. Updated the resource's tests to account for the new arguments. Consolidated some duplicate code in the tests into functions. Removed the tests' dependency on AWS credentials because Vault doesn't interact with AWS during CRUD operations on a backend role. It will now be easier to run the tests on the aws_secret_backend_role resource. Split two large multiline strings into smaller strings to make it easier modify them. (hashicorp#781)
d5ab5fd
to
796db2a
Compare
… and permissions_boundary_arn arguments. Updated the resource's tests to account for the new arguments. Consolidated some duplicate code in the tests into functions. Removed the tests' dependency on AWS credentials because Vault doesn't interact with AWS during CRUD operations on a backend role. It will now be easier to run the tests on the aws_secret_backend_role resource. Split two large multiline strings into smaller strings to make it easier modify them. (hashicorp#781)
796db2a
to
4e3717f
Compare
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!
Thanks again for your contribution to HashiCorp!
…secret_backend_role (hashicorp#781)
I modified the aws_secret_backend_role resource to accept the user_path and permissions_boundary_arn arguments. I updated the resource's tests to account for the new arguments and consolidated some duplicate code in the tests into functions. I also removed the tests' dependency on AWS credentials because Vault doesn't interact with AWS during CRUD operations on the backend role. It will now be easier to run the tests on the aws_secret_backend_role resource.
Community Note
Closes #716, #769
Release note for CHANGELOG:
Output from acceptance testing: