I followed the guide at https://www.hashicorp.com/resources/best-practices-using-hashicorp-terraform-with-hashicorp-vault.
It's good, but when I use Terraform to get dynamically created AWS creds from Vault I get a 403 error.
I've solved the problem, but I don't quite understand why I need to add the additional capability (especially since it wasn't in the guide) and what problematic side-effects it may have.
Non-working policy:
path "aws/creds/dev-role" {
capabilities=["read"]
}
Working policy:
path "aws/creds/dev-role" {
capabilities=["read"]
}
path "auth/token/create" {
capabilities=["update"]
}
The expected result is that when I run "terraform plan" it gives me a list of things it's going to do.
The error I get when I don't include the "update" capability is:
provider.vault: failed to create limited child token: Error making API request.
RL: POST https://:8200/v1/auth/token/create Code: 403. Errors:
1 error occurred:
permission denied