From 73c714bd4c7f464be2a8bdce3b59f4c09f0172fc Mon Sep 17 00:00:00 2001 From: Liam MacPherson Date: Thu, 14 Mar 2024 11:40:06 +0000 Subject: [PATCH] fix: add count for inline policy and mark policies as optional --- modules/aws/permission_sets/README.md | 4 ++-- modules/aws/permission_sets/variables.tf | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/aws/permission_sets/README.md b/modules/aws/permission_sets/README.md index e618b8e..37a8400 100644 --- a/modules/aws/permission_sets/README.md +++ b/modules/aws/permission_sets/README.md @@ -13,8 +13,8 @@ module "permission_sets" { name = description = identity_store_arn = - inline_policies = ARRAY() - managed_policies = ARRAY() + inline_policies = OPTIONAL(ARRAY()) + managed_policies = OPTIONAL(ARRAY()) } ``` diff --git a/modules/aws/permission_sets/variables.tf b/modules/aws/permission_sets/variables.tf index 5b77b9e..66fd83f 100644 --- a/modules/aws/permission_sets/variables.tf +++ b/modules/aws/permission_sets/variables.tf @@ -25,16 +25,16 @@ variable "identity_store_arn" { variable "inline_policies" { description = "The inline policy to attach to the permission set." - type = list(object({ + type = optional(list(object({ sid = optional(string) actions = list(string) resources = list(string) - })) + }))) default = [] } variable "managed_policies" { description = "The inline policy to attach to the permission set." - type = list(string) + type = optional(list(string)) default = [] }