Skip to content

feat: Add path option to IAM roles created under this module #311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Oct 13, 2022
4 changes: 4 additions & 0 deletions examples/github-complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ module "atlantis" {
# Trusted roles
trusted_principals = ["ssm.amazonaws.com"]

# IAM role options
permissions_boundary = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:policy/cloud/developer-boundary-policy"
path = "/delegatedadmin/developer/"

# Atlantis
atlantis_github_user = var.github_user
atlantis_github_user_token = var.github_token
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ resource "aws_iam_role" "ecs_task_execution" {
assume_role_policy = data.aws_iam_policy_document.ecs_tasks.json
max_session_duration = var.max_session_duration
permissions_boundary = var.permissions_boundary
path = var.path

tags = local.tags
}
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ variable "permissions_boundary" {
default = null
}

variable "path" {
description = "If provided, all IAM roles will be created with this path."
type = string
default = "/"
}

variable "policies_arn" {
description = "A list of the ARN of the policies you want to apply"
type = list(string)
Expand Down