Update dynamic-secrets.html.md (#5530)

1. Using the current tutorial will return a warning after creating the role "my-role:
```bash
WARNING! The following warnings were returned from Vault:

  * Detected use of legacy role or policy parameter. Please upgrade to use the
  new parameters.
```

To fix this we need to update the command and the query. Correct entries can be found in documentation for the [AWS Engine](https://www.vaultproject.io/docs/secrets/aws/index.html).

2. `vault revoke` to `vault lease revoke`. The command bellow is updated, but the text above it was not.
This commit is contained in:
Gabriel Martinez 2018-10-17 15:35:15 +01:00 committed by Chris Hoffman
parent ac13e4e554
commit 14bcd13cef

View file

@ -77,14 +77,9 @@ is okay - just use this one for now.
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1426528957000",
"Effect": "Allow",
"Action": [
"ec2:*"
],
"Resource": [
"*"
]
"Action": "ec2:*",
"Resource": "*"
}
]
}
@ -94,19 +89,16 @@ As mentioned above, we need to map this policy document to a named role. To do
that, write to `aws/roles/:name`:
```text
$ vault write aws/roles/my-role policy=-<<EOF
$ vault write aws/roles/my-role \
credential_type=iam_user \
policy_document=-<<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1426528957000",
"Effect": "Allow",
"Action": [
"ec2:*"
],
"Resource": [
"*"
]
"Action": "ec2:*",
"Resource": "*"
}
]
}
@ -153,7 +145,7 @@ Vault will automatically revoke this credential after 768 hours (see
`lease_duration` in the output), but perhaps we want to revoke it early. Once
the secret is revoked, the access keys are no longer valid.
To revoke the secret, use `vault revoke` with the lease ID that was outputted
To revoke the secret, use `vault lease revoke` with the lease ID that was outputted
from `vault read` when you ran it:
```text