Skip to content

Commit

Permalink
feat(vault-group): aws secret engine support
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztof-miemiec committed Jul 7, 2020
1 parent 8b465b3 commit dacc140
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/vault-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
* * Key-Value Version 2 (name: `kv2`)
* * Database (name: `db`)
* * RabbitMQ (name: `rabbitmq`)
* * AWS (name: `aws`)
*
*/

Expand Down
21 changes: 21 additions & 0 deletions modules/vault-group/policy-templates/aws-read.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# AWS Secret Engine Policy
# Allows Read Access

# List roles
path "${engine_path}/roles" {
capabilities = ["list"]
}

# Read roles
path "${engine_path}/roles/${group_name}${separator}${environment}${separator}+" {
capabilities = ["read"]
}

# Generate credentials
path "${engine_path}/creds/${group_name}${separator}${environment}${separator}+" {
capabilities = ["read"]
}

path "${engine_path}/sts/${group_name}${separator}${environment}${separator}+" {
capabilities = ["read"]
}
6 changes: 6 additions & 0 deletions modules/vault-group/policy-templates/aws-write.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Database Secret Engine Policy
# Allows Write Access

path "${engine_path}/roles/${group_name}${separator}${environment}${separator}+" {
capabilities = ["create", "delete"]
}

0 comments on commit dacc140

Please sign in to comment.