From 55f336fdf7fe94bb5b7812eb8ec378888e5f746a Mon Sep 17 00:00:00 2001 From: Michael Rosenfeld Date: Mon, 13 Jul 2026 14:19:00 -0400 Subject: [PATCH] feat(cloudformation): add iam_role_arn variable Allow users to specify an IAM role ARN for CloudFormation stack creation. --- main.tf | 1 + variables.tf | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/main.tf b/main.tf index 8936770..9483336 100644 --- a/main.tf +++ b/main.tf @@ -14,6 +14,7 @@ resource "aws_cloudformation_stack" "default" { # When disable_rollback is false, use the value of var.on_failure on_failure = var.disable_rollback ? null : var.on_failure disable_rollback = var.disable_rollback + iam_role_arn = var.iam_role_arn timeout_in_minutes = var.timeout_in_minutes policy_body = var.policy_body diff --git a/variables.tf b/variables.tf index da970cb..0477fa6 100644 --- a/variables.tf +++ b/variables.tf @@ -28,6 +28,12 @@ variable "on_failure" { description = "Action to be taken if stack creation fails. This must be one of: `DO_NOTHING`, `ROLLBACK`, or `DELETE`" } +variable "iam_role_arn" { + type = string + default = null + description = "The ARN of an IAM role that AWS CloudFormation assumes to create the stack. If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials" +} + variable "timeout_in_minutes" { type = number default = 30