diff --git a/modules/iam-group-with-policies/README.md b/modules/iam-group-with-policies/README.md index f50a2052..86cbb79c 100644 --- a/modules/iam-group-with-policies/README.md +++ b/modules/iam-group-with-policies/README.md @@ -44,7 +44,7 @@ No modules. | [create\_group](#input\_create\_group) | Whether to create IAM group | `bool` | `true` | no | | [custom\_group\_policies](#input\_custom\_group\_policies) | List of maps of inline IAM policies to attach to IAM group. Should have `name` and `policy` keys in each element. | `list(map(string))` | `[]` | no | | [custom\_group\_policy\_arns](#input\_custom\_group\_policy\_arns) | List of IAM policies ARNs to attach to IAM group | `list(string)` | `[]` | no | -| [enable\_mfa\_enforcment](#input\_enable\_mfa\_enforcment) | Determines whether permissions are added to the policy which requires the groups IAM users to use MFA | `bool` | `true` | no | +| [enable\_mfa\_enforcement](#input\_enable\_mfa\_enforcement) | Determines whether permissions are added to the policy which requires the groups IAM users to use MFA | `bool` | `true` | no | | [group\_users](#input\_group\_users) | List of IAM users to have in an IAM group which can assume the role | `list(string)` | `[]` | no | | [iam\_self\_management\_policy\_name\_prefix](#input\_iam\_self\_management\_policy\_name\_prefix) | Name prefix for IAM policy to create with IAM self-management permissions | `string` | `"IAMSelfManagement-"` | no | | [name](#input\_name) | Name of IAM group | `string` | `""` | no | diff --git a/modules/iam-group-with-policies/policies.tf b/modules/iam-group-with-policies/policies.tf index c3763b8e..1440ce3f 100644 --- a/modules/iam-group-with-policies/policies.tf +++ b/modules/iam-group-with-policies/policies.tf @@ -146,7 +146,7 @@ data "aws_iam_policy_document" "iam_self_management" { } dynamic "statement" { - for_each = var.enable_mfa_enforcment ? [1] : [] + for_each = var.enable_mfa_enforcement ? [1] : [] content { sid = "DenyAllExceptListedIfNoMFA" diff --git a/modules/iam-group-with-policies/variables.tf b/modules/iam-group-with-policies/variables.tf index 0e4eb3de..59bf729d 100644 --- a/modules/iam-group-with-policies/variables.tf +++ b/modules/iam-group-with-policies/variables.tf @@ -34,7 +34,7 @@ variable "custom_group_policies" { default = [] } -variable "enable_mfa_enforcment" { +variable "enable_mfa_enforcement" { description = "Determines whether permissions are added to the policy which requires the groups IAM users to use MFA" type = bool default = true diff --git a/wrappers/iam-group-with-policies/main.tf b/wrappers/iam-group-with-policies/main.tf index 589c9926..bb7b38cd 100644 --- a/wrappers/iam-group-with-policies/main.tf +++ b/wrappers/iam-group-with-policies/main.tf @@ -9,7 +9,7 @@ module "wrapper" { group_users = try(each.value.group_users, var.defaults.group_users, []) custom_group_policy_arns = try(each.value.custom_group_policy_arns, var.defaults.custom_group_policy_arns, []) custom_group_policies = try(each.value.custom_group_policies, var.defaults.custom_group_policies, []) - enable_mfa_enforcment = try(each.value.enable_mfa_enforcment, var.defaults.enable_mfa_enforcment, true) + enable_mfa_enforcement = try(each.value.enable_mfa_enforcement, var.defaults.enable_mfa_enforcement, true) attach_iam_self_management_policy = try(each.value.attach_iam_self_management_policy, var.defaults.attach_iam_self_management_policy, true) iam_self_management_policy_name_prefix = try(each.value.iam_self_management_policy_name_prefix, var.defaults.iam_self_management_policy_name_prefix, "IAMSelfManagement-") aws_account_id = try(each.value.aws_account_id, var.defaults.aws_account_id, "")