diff --git a/iam-bootstrap/variables.tf b/iam-bootstrap/variables.tf index 7ac5d1a0..14b0c334 100644 --- a/iam-bootstrap/variables.tf +++ b/iam-bootstrap/variables.tf @@ -13,7 +13,7 @@ variable "region" { description = "AWS region for the deployment" nullable = false validation { - condition = can(regex("(us(-gov)?|ap|ca|cn|eu|sa|me|af)-(central|(north|south)?(east|west)?)-[0-9]", var.region)) + condition = can(regex("(us(-gov)?|ap|ca|cn|eu|sa|me|af|il)-(central|(north|south)?(east|west)?)-[0-9]", var.region)) error_message = "The provided region must follow the format of AWS region names, e.g., us-west-2, us-gov-west-1." } } diff --git a/iam.tf b/iam.tf index e6621627..4341356e 100644 --- a/iam.tf +++ b/iam.tf @@ -75,6 +75,18 @@ data "aws_iam_policy_document" "create_eks_role" { resources = ["arn:${data.aws_partition.current.partition}:iam::${local.aws_account_id}:role/${var.deploy_id}-*"] effect = "Allow" } + + statement { + sid = "EKSDeployerIAMSvcLinkedRole" + actions = [ + "iam:CreateServiceLinkedRole", + "iam:AttachRolePolicy", + "iam:PutRolePolicy" + ] + resources = ["arn:${data.aws_partition.current.partition}:iam::${local.aws_account_id}:role/aws-service-role/*"] + effect = "Allow" + } + } resource "aws_iam_policy" "create_eks_role" { diff --git a/submodules/bastion/variables.tf b/submodules/bastion/variables.tf index 5f67c562..8abf18e9 100644 --- a/submodules/bastion/variables.tf +++ b/submodules/bastion/variables.tf @@ -8,7 +8,7 @@ variable "region" { type = string nullable = false validation { - condition = can(regex("(us(-gov)?|ap|ca|cn|eu|sa|me|af)-(central|(north|south)?(east|west)?)-[0-9]", var.region)) + condition = can(regex("(us(-gov)?|ap|ca|cn|eu|sa|me|af|il)-(central|(north|south)?(east|west)?)-[0-9]", var.region)) error_message = "The provided region must follow the format of AWS region names, e.g., us-west-2, us-gov-west-1." } } diff --git a/submodules/eks/variables.tf b/submodules/eks/variables.tf index ad70285c..050efc45 100644 --- a/submodules/eks/variables.tf +++ b/submodules/eks/variables.tf @@ -13,7 +13,7 @@ variable "region" { description = "AWS region for the deployment" nullable = false validation { - condition = can(regex("(us(-gov)?|ap|ca|cn|eu|sa|me|af)-(central|(north|south)?(east|west)?)-[0-9]", var.region)) + condition = can(regex("(us(-gov)?|ap|ca|cn|eu|sa|me|af|il)-(central|(north|south)?(east|west)?)-[0-9]", var.region)) error_message = "The provided region must follow the format of AWS region names, e.g., us-west-2, us-gov-west-1." } } diff --git a/submodules/network/variables.tf b/submodules/network/variables.tf index 717f4cf0..533af437 100644 --- a/submodules/network/variables.tf +++ b/submodules/network/variables.tf @@ -13,7 +13,7 @@ variable "region" { description = "AWS region for the deployment" nullable = false validation { - condition = can(regex("(us(-gov)?|ap|ca|cn|eu|sa|me|af)-(central|(north|south)?(east|west)?)-[0-9]", var.region)) + condition = can(regex("(us(-gov)?|ap|ca|cn|eu|sa|me|af|il)-(central|(north|south)?(east|west)?)-[0-9]", var.region)) error_message = "The provided region must follow the format of AWS region names, e.g., us-west-2, us-gov-west-1." } } diff --git a/variables.tf b/variables.tf index 36df40e6..3aeabfb4 100644 --- a/variables.tf +++ b/variables.tf @@ -3,7 +3,7 @@ variable "region" { description = "AWS region for the deployment" nullable = false validation { - condition = can(regex("(us(-gov)?|ap|ca|cn|eu|sa|me|af)-(central|(north|south)?(east|west)?)-[0-9]", var.region)) + condition = can(regex("(us(-gov)?|ap|ca|cn|eu|sa|me|af|il)-(central|(north|south)?(east|west)?)-[0-9]", var.region)) error_message = "The provided region must follow the format of AWS region names, e.g., us-west-2, us-gov-west-1." } }