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 #87 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 10c2382 + 4685185 commit ee3eb0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/nomad-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,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
5 changes: 5 additions & 0 deletions modules/nomad-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,8 @@ variable "protect_from_scale_in" {
default = false
}

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 ee3eb0f

Please sign in to comment.