Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit a0bc093

Browse files
authored
Merge pull request #231 from dsaidgovsg/feat--perms-boundary
Add `permissions_boundary` for created IAM role.
2 parents 372aae4 + b9715a4 commit a0bc093

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

modules/vault-cluster/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ resource "aws_iam_role" "instance_role" {
246246
name_prefix = var.cluster_name
247247
assume_role_policy = data.aws_iam_policy_document.instance_role.json
248248

249+
permissions_boundary = var.iam_permissions_boundary
250+
249251
# aws_iam_instance_profile.instance_profile in this module sets create_before_destroy to true, which means
250252
# everything it depends on, including this resource, must set it as well, or you'll get cyclic dependency errors
251253
# when you try to do a terraform destroy.

modules/vault-cluster/variables.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,10 @@ variable "dynamo_table_region" {
235235
description = "Table region used for the instance policy. Uses the current region if not supplied. Global tables should use `*` to allow for a cross region deployment to write to their respective table"
236236
type = string
237237
default = ""
238-
}
238+
}
239+
240+
variable "iam_permissions_boundary" {
241+
description = "If set, restricts the created IAM role to the given permissions boundary"
242+
type = string
243+
default = null
244+
}

0 commit comments

Comments
 (0)