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

Commit

Permalink
Merge pull request #231 from dsaidgovsg/feat--perms-boundary
Browse files Browse the repository at this point in the history
Add `permissions_boundary` for created IAM role.
  • Loading branch information
brikis98 authored Jan 26, 2021
2 parents 372aae4 + b9715a4 commit a0bc093
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions modules/vault-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ resource "aws_iam_role" "instance_role" {
name_prefix = var.cluster_name
assume_role_policy = data.aws_iam_policy_document.instance_role.json

permissions_boundary = var.iam_permissions_boundary

# aws_iam_instance_profile.instance_profile in this module sets create_before_destroy to true, which means
# everything it depends on, including this resource, must set it as well, or you'll get cyclic dependency errors
# when you try to do a terraform destroy.
Expand Down
8 changes: 7 additions & 1 deletion modules/vault-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,10 @@ variable "dynamo_table_region" {
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"
type = string
default = ""
}
}

variable "iam_permissions_boundary" {
description = "If set, restricts the created IAM role to the given permissions boundary"
type = string
default = null
}

0 comments on commit a0bc093

Please sign in to comment.