Skip to content
This repository has been archived by the owner on Jan 30, 2021. It is now read-only.

Commit

Permalink
Add ssm:GetParametersByPath (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
aknysh authored Apr 30, 2018
1 parent 18920b7 commit 2dee48b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module "chamber_user" {
| `force_destroy` | `false` | Destroy even if it has non-Terraform-managed IAM access keys, login profiles or MFA devices | No |
| `path` | `/` | Path in which to create the user | No |
| `enabled` | `true` | Set to `false` to prevent the module from creating any resources | No |
| `ssm_actions` | `["ssm:DescribeParameters","ssm:GetParameters"]` | Actions to allow in the policy | No |
| `ssm_actions` | `["ssm:GetParametersByPath", "ssm:GetParameters"]` | Actions to allow in the policy | No |
| `ssm_resources` | `["*"]` | Resources to apply the actions specified in the policy | No |


Expand Down
18 changes: 10 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
data "aws_iam_policy_document" "default" {
statement {
actions = ["${var.ssm_actions}"]
actions = ["ssm:DescribeParameters"]
resources = ["*"]
effect = "Allow"
}

statement {
actions = ["${var.ssm_actions}"]
resources = ["${var.ssm_resources}"]
effect = "Allow"
}

statement {
actions = [
"kms:Decrypt",
]

resources = [
"${var.kms_key_arn}",
]
actions = ["kms:Decrypt"]
resources = ["${var.kms_key_arn}"]
effect = "Allow"
}
}

Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ variable "kms_key_arn" {

variable "ssm_actions" {
type = "list"
default = ["ssm:DescribeParameters", "ssm:GetParameters"]
default = ["ssm:GetParametersByPath", "ssm:GetParameters"]
description = "Actions to allow in the policy"
}

Expand Down

0 comments on commit 2dee48b

Please sign in to comment.