Skip to content

Commit

Permalink
bring ssm policy inline with s3/secrets such that listing is always f…
Browse files Browse the repository at this point in the history
…or all, but reading can be limited by resources (arns)
  • Loading branch information
wr0ngway committed Mar 16, 2021
1 parent b6502a2 commit e09a162
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module "grant-cloudtruth-access" {
| s3\_resources | The s3 resources to explicitly grant access to, defaults to all, and listing<br>all buckets is always allowed (for bucket chooser in UI) even if access<br>isn't granted here | `list(string)` | <pre>[<br> "*"<br>]</pre> | no |
| services\_enabled | The AWS services to grant cloudtruth access to, allowed values are s3, ssm | `list(string)` | n/a | yes |
| ssm\_policy | A custom policy to use for ssm instead of the one this module would define | `string` | `""` | no |
| ssm\_resources | The ssm resources to explicitly grant access to, defaults to all | `list(string)` | <pre>[<br> "*"<br>]</pre> | no |
| ssm\_resources | The ssm resources to explicitly grant access to, defaults to all, and listing<br>all is always allowed (for chooser in UI) even if access<br>isn't granted here | `list(string)` | <pre>[<br> "*"<br>]</pre> | no |
| secrets\_policy | A custom policy to use for secrets manager instead of the one this module would define | `string` | `""` | no |
| secrets\_resources | The secrets manager resources to explicitly grant access to, defaults to all, and listing<br>all is always allowed (for chooser in UI) even if access<br>isn't granted here | `list(string)` | <pre>[<br> "*"<br>]</pre> | no |

Expand Down
10 changes: 9 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,18 @@ data "aws_iam_policy_document" "s3" {
//
data "aws_iam_policy_document" "ssm" {

statement {
sid = "ParameterList"
actions = [
"ssm:DescribeParameters"
]
effect = "Allow"
resources = ["*"]
}

statement {
sid = "ParameterAccess"
actions = [
"ssm:DescribeParameters",
"ssm:GetParameter",
"ssm:GetParameters",
"ssm:GetParametersByPath"
Expand Down

0 comments on commit e09a162

Please sign in to comment.