From 88e37edd3988078a2bfba9e1fc604397ab7b6a88 Mon Sep 17 00:00:00 2001
From: Steven Davidovitz <13248+steved@users.noreply.github.com>
Date: Tue, 8 Oct 2024 12:57:26 -0700
Subject: [PATCH] fix invalid type for identity providers config (#278)
* add a test for identity providers config
* update support for identity providers
* update trivy false-positive ignore rules
---
.trivyignore | 2 +
examples/deploy/terraform/cluster/README.md | 2 +-
.../deploy/terraform/cluster/variables.tf | 2 +-
examples/deploy/terraform/infra/README.md | 2 +-
examples/deploy/terraform/infra/variables.tf | 2 +-
examples/tfvars/fips-on.tfvars | 11 +++---
examples/tfvars/identity-providers.tfvars | 39 +++++++++++++++++++
examples/tfvars/minimal-with-bastion.tfvars | 8 ++--
examples/tfvars/private-link.tfvars | 8 ++--
examples/tfvars/public-access.tfvars | 10 ++---
modules/eks/README.md | 2 +-
modules/eks/variables.tf | 2 +-
modules/infra/README.md | 2 +-
modules/infra/variables.tf | 2 +-
tests/plan/terraform/README.md | 2 +-
tests/plan/terraform/variables.tf | 2 +-
16 files changed, 69 insertions(+), 29 deletions(-)
create mode 100644 examples/tfvars/identity-providers.tfvars
diff --git a/.trivyignore b/.trivyignore
index 0ae7259e..d62d459e 100644
--- a/.trivyignore
+++ b/.trivyignore
@@ -9,3 +9,5 @@ AVD-AWS-0088
AVD-AWS-0091
AVD-AWS-0093
AVD-AWS-0132
+AVD-AWS-0096
+AVD-AWS-0039
diff --git a/examples/deploy/terraform/cluster/README.md b/examples/deploy/terraform/cluster/README.md
index 6b06a3f9..4197b74f 100644
--- a/examples/deploy/terraform/cluster/README.md
+++ b/examples/deploy/terraform/cluster/README.md
@@ -37,7 +37,7 @@
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
-| [eks](#input\_eks) | service\_ipv4\_cidr = CIDR for EKS cluster kubernetes\_network\_config.
creation\_role\_name = Name of the role to import.
k8s\_version = EKS cluster k8s version.
kubeconfig = {
extra\_args = Optional extra args when generating kubeconfig.
path = Fully qualified path name to write the kubeconfig file.
}
public\_access = {
enabled = Enable EKS API public endpoint.
cidrs = List of CIDR ranges permitted for accessing the EKS public endpoint.
}
Custom role maps for aws auth configmap
custom\_role\_maps = {
rolearn = string
username = string
groups = list(string)
}
master\_role\_names = IAM role names to be added as masters in eks.
cluster\_addons = EKS cluster addons. vpc-cni is installed separately.
vpc\_cni = Configuration for AWS VPC CNI
ssm\_log\_group\_name = CloudWatch log group to send the SSM session logs to.
identity\_providers = Configuration for IDP(Identity Provider).
} |
object({| `{}` | no | +| [eks](#input\_eks) | service\_ipv4\_cidr = CIDR for EKS cluster kubernetes\_network\_config.
service_ipv4_cidr = optional(string)
creation_role_name = optional(string, null)
k8s_version = optional(string)
kubeconfig = optional(object({
extra_args = optional(string)
path = optional(string)
}), {})
public_access = optional(object({
enabled = optional(bool)
cidrs = optional(list(string))
}), {})
custom_role_maps = optional(list(object({
rolearn = string
username = string
groups = list(string)
})))
master_role_names = optional(list(string))
cluster_addons = optional(list(string))
ssm_log_group_name = optional(string)
vpc_cni = optional(object({
prefix_delegation = optional(bool)
annotate_pod_ip = optional(bool)
}))
identity_providers = optional(list(object({
client_id = string
groups_claim = optional(string)
groups_prefix = optional(string)
identity_provider_config_name = string
issuer_url = optional(string)
required_claims = optional(string)
username_claim = optional(string)
username_prefix = optional(string)
})))
})
object({| `{}` | no | | [external\_deployments\_operator](#input\_external\_deployments\_operator) | Config to create IRSA role for the external deployments operator. |
service_ipv4_cidr = optional(string)
creation_role_name = optional(string, null)
k8s_version = optional(string)
kubeconfig = optional(object({
extra_args = optional(string)
path = optional(string)
}), {})
public_access = optional(object({
enabled = optional(bool)
cidrs = optional(list(string))
}), {})
custom_role_maps = optional(list(object({
rolearn = string
username = string
groups = list(string)
})))
master_role_names = optional(list(string))
cluster_addons = optional(list(string))
ssm_log_group_name = optional(string)
vpc_cni = optional(object({
prefix_delegation = optional(bool)
annotate_pod_ip = optional(bool)
}))
identity_providers = optional(list(object({
client_id = string
groups_claim = optional(string)
groups_prefix = optional(string)
identity_provider_config_name = string
issuer_url = optional(string)
required_claims = optional(map(string))
username_claim = optional(string)
username_prefix = optional(string)
})))
})
object({| `{}` | no | | [irsa\_external\_dns](#input\_irsa\_external\_dns) | Mappings for custom IRSA configurations. |
enabled = optional(bool, false)
namespace = optional(string, "domino-compute")
operator_service_account_name = optional(string, "pham-juno-operator")
operator_role_suffix = optional(string, "external-deployments-operator")
repository_suffix = optional(string, "external-deployments")
bucket_suffix = optional(string, "external-deployments")
enable_assume_any_external_role = optional(bool, true)
enable_in_account_deployments = optional(bool, true)
})
object({| `{}` | no | | [irsa\_policies](#input\_irsa\_policies) | Mappings for custom IRSA configurations. |
enabled = optional(bool, false)
hosted_zone_name = optional(string, null)
namespace = optional(string, null)
serviceaccount_name = optional(string, null)
rm_role_policy = optional(object({
remove = optional(bool, false)
detach_from_role = optional(bool, false)
policy_name = optional(string, "")
}), {})
})
list(object({| `[]` | no | diff --git a/examples/deploy/terraform/cluster/variables.tf b/examples/deploy/terraform/cluster/variables.tf index c2d4eb5b..1309deef 100644 --- a/examples/deploy/terraform/cluster/variables.tf +++ b/examples/deploy/terraform/cluster/variables.tf @@ -57,7 +57,7 @@ variable "eks" { groups_prefix = optional(string) identity_provider_config_name = string issuer_url = optional(string) - required_claims = optional(string) + required_claims = optional(map(string)) username_claim = optional(string) username_prefix = optional(string) }))) diff --git a/examples/deploy/terraform/infra/README.md b/examples/deploy/terraform/infra/README.md index ea3685d0..b7f7bd6a 100644 --- a/examples/deploy/terraform/infra/README.md +++ b/examples/deploy/terraform/infra/README.md @@ -31,7 +31,7 @@ No resources. | [default\_node\_groups](#input\_default\_node\_groups) | EKS managed node groups definition. |
name = string
namespace = string
serviceaccount_name = string
policy = string #json
}))
object(| n/a | yes | | [deploy\_id](#input\_deploy\_id) | Domino Deployment ID. | `string` | n/a | yes | | [domino\_cur](#input\_domino\_cur) | Determines whether to provision domino cost related infrastructures, ie, long term storage |
{
compute = object(
{
ami = optional(string, null)
bootstrap_extra_args = optional(string, "")
instance_types = optional(list(string), ["m6i.2xlarge"])
spot = optional(bool, false)
min_per_az = optional(number, 0)
max_per_az = optional(number, 10)
max_unavailable_percentage = optional(number, 50)
max_unavailable = optional(number, null)
desired_per_az = optional(number, 0)
availability_zone_ids = list(string)
labels = optional(map(string), {
"dominodatalab.com/node-pool" = "default"
})
taints = optional(list(object({
key = string
value = optional(string)
effect = string
})), [])
tags = optional(map(string), {})
gpu = optional(bool, null)
volume = optional(object({
size = optional(number, 1000)
type = optional(string, "gp3")
}), {
size = 1000
type = "gp3"
}
)
}),
platform = object(
{
ami = optional(string, null)
bootstrap_extra_args = optional(string, "")
instance_types = optional(list(string), ["m7i-flex.2xlarge"])
spot = optional(bool, false)
min_per_az = optional(number, 1)
max_per_az = optional(number, 10)
max_unavailable_percentage = optional(number, null)
max_unavailable = optional(number, 1)
desired_per_az = optional(number, 1)
availability_zone_ids = list(string)
labels = optional(map(string), {
"dominodatalab.com/node-pool" = "platform"
})
taints = optional(list(object({
key = string
value = optional(string)
effect = string
})), [])
tags = optional(map(string), {})
gpu = optional(bool, null)
volume = optional(object({
size = optional(number, 100)
type = optional(string, "gp3")
}), {
size = 100
type = "gp3"
}
)
}),
gpu = object(
{
ami = optional(string, null)
bootstrap_extra_args = optional(string, "")
instance_types = optional(list(string), ["g5.2xlarge"])
spot = optional(bool, false)
min_per_az = optional(number, 0)
max_per_az = optional(number, 10)
max_unavailable_percentage = optional(number, 50)
max_unavailable = optional(number, null)
desired_per_az = optional(number, 0)
availability_zone_ids = list(string)
labels = optional(map(string), {
"dominodatalab.com/node-pool" = "default-gpu"
"nvidia.com/gpu" = true
})
taints = optional(list(object({
key = string
value = optional(string)
effect = string
})), [{
key = "nvidia.com/gpu"
value = "true"
effect = "NO_SCHEDULE"
}
])
tags = optional(map(string))
gpu = optional(bool)
volume = optional(object({
size = optional(number)
type = optional(string)
}))
})
})
object({| `{}` | no | -| [eks](#input\_eks) | service\_ipv4\_cidr = CIDR for EKS cluster kubernetes\_network\_config.
provision_cost_usage_report = optional(bool, false)
})
object({| `{}` | no | +| [eks](#input\_eks) | service\_ipv4\_cidr = CIDR for EKS cluster kubernetes\_network\_config.
service_ipv4_cidr = optional(string)
creation_role_name = optional(string, null)
k8s_version = optional(string)
nodes_master = optional(bool, false)
kubeconfig = optional(object({
extra_args = optional(string)
path = optional(string)
}), {})
public_access = optional(object({
enabled = optional(bool)
cidrs = optional(list(string))
}), {})
custom_role_maps = optional(list(object({
rolearn = string
username = string
groups = list(string)
})))
master_role_names = optional(list(string))
cluster_addons = optional(list(string))
ssm_log_group_name = optional(string)
vpc_cni = optional(object({
prefix_delegation = optional(bool)
annotate_pod_ip = optional(bool)
}))
identity_providers = optional(list(object({
client_id = string
groups_claim = optional(string)
groups_prefix = optional(string)
identity_provider_config_name = string
issuer_url = optional(string)
required_claims = optional(string)
username_claim = optional(string)
username_prefix = optional(string)
})))
})
object({| `{}` | no | | [ignore\_tags](#input\_ignore\_tags) | Tag keys to be ignored by the aws provider. | `list(string)` | `[]` | no | | [kms](#input\_kms) | enabled = Toggle,if set use either the specified KMS key\_id or a Domino-generated one.
service_ipv4_cidr = optional(string)
creation_role_name = optional(string, null)
k8s_version = optional(string)
nodes_master = optional(bool, false)
kubeconfig = optional(object({
extra_args = optional(string)
path = optional(string)
}), {})
public_access = optional(object({
enabled = optional(bool)
cidrs = optional(list(string))
}), {})
custom_role_maps = optional(list(object({
rolearn = string
username = string
groups = list(string)
})))
master_role_names = optional(list(string))
cluster_addons = optional(list(string))
ssm_log_group_name = optional(string)
vpc_cni = optional(object({
prefix_delegation = optional(bool)
annotate_pod_ip = optional(bool)
}))
identity_providers = optional(list(object({
client_id = string
groups_claim = optional(string)
groups_prefix = optional(string)
identity_provider_config_name = string
issuer_url = optional(string)
required_claims = optional(map(string))
username_claim = optional(string)
username_prefix = optional(string)
})))
})
object({| n/a | yes | | [network](#input\_network) | vpc = {
enabled = optional(bool)
key_id = optional(string)
})
object({| `{}` | no | diff --git a/examples/deploy/terraform/infra/variables.tf b/examples/deploy/terraform/infra/variables.tf index 0016c63a..59ad5949 100644 --- a/examples/deploy/terraform/infra/variables.tf +++ b/examples/deploy/terraform/infra/variables.tf @@ -318,7 +318,7 @@ variable "eks" { groups_prefix = optional(string) identity_provider_config_name = string issuer_url = optional(string) - required_claims = optional(string) + required_claims = optional(map(string)) username_claim = optional(string) username_prefix = optional(string) }))) diff --git a/examples/tfvars/fips-on.tfvars b/examples/tfvars/fips-on.tfvars index bd237345..5dc6c6fc 100644 --- a/examples/tfvars/fips-on.tfvars +++ b/examples/tfvars/fips-on.tfvars @@ -12,13 +12,12 @@ default_node_groups = { platform = { "availability_zone_ids" = ["usw2-az1", "usw2-az2"] } +} - eks = { - public_access = { - enabled = true - cidrs = ["108.214.49.0/24"] # Replace this with the desired CIDR range - - } +eks = { + public_access = { + enabled = true + cidrs = ["108.214.49.0/24"] # Replace this with the desired CIDR range } } diff --git a/examples/tfvars/identity-providers.tfvars b/examples/tfvars/identity-providers.tfvars new file mode 100644 index 00000000..28fc28e9 --- /dev/null +++ b/examples/tfvars/identity-providers.tfvars @@ -0,0 +1,39 @@ +deploy_id = "plantest0015" +region = "us-west-2" +ssh_pvt_key_path = "domino.pem" + +default_node_groups = { + compute = { + availability_zone_ids = ["usw2-az1", "usw2-az2"] + } + gpu = { + availability_zone_ids = ["usw2-az1", "usw2-az2"] + } + platform = { + availability_zone_ids = ["usw2-az1", "usw2-az2"] + } +} + +eks = { + identity_providers = [{ + client_id = "fake-client-id" + groups_claim = "groups" + groups_prefix = "group:" + identity_provider_config_name = "idp" + issuer_url = "https://example.com" + username_claim = "email" + username_prefix = "user:" + required_claims = { + key = "value" + } + }] + + public_access = { + enabled = true + cidrs = ["108.214.49.0/24"] # Replace this with the desired CIDR range + } +} + +bastion = { + enabled = false +} diff --git a/examples/tfvars/minimal-with-bastion.tfvars b/examples/tfvars/minimal-with-bastion.tfvars index d3b89ed4..ab21a543 100644 --- a/examples/tfvars/minimal-with-bastion.tfvars +++ b/examples/tfvars/minimal-with-bastion.tfvars @@ -12,9 +12,9 @@ default_node_groups = { platform = { "availability_zone_ids" = ["usw2-az1", "usw2-az2"] } +} - ## bastion is enabled by default - bastion = { - enabled = true - } +## bastion is enabled by default +bastion = { + enabled = true } diff --git a/examples/tfvars/private-link.tfvars b/examples/tfvars/private-link.tfvars index 36e7bb01..6877b617 100644 --- a/examples/tfvars/private-link.tfvars +++ b/examples/tfvars/private-link.tfvars @@ -12,11 +12,11 @@ default_node_groups = { platform = { "availability_zone_ids" = ["usw2-az1", "usw2-az2"] } +} - ## bastion is enabled by default - bastion = { - enabled = true - } +## bastion is enabled by default +bastion = { + enabled = true } enable_private_link = true diff --git a/examples/tfvars/public-access.tfvars b/examples/tfvars/public-access.tfvars index 66c28902..5cd03c2d 100644 --- a/examples/tfvars/public-access.tfvars +++ b/examples/tfvars/public-access.tfvars @@ -12,13 +12,13 @@ default_node_groups = { platform = { "availability_zone_ids" = ["usw2-az1", "usw2-az2"] } +} - eks = { - public_access = { - enabled = true - cidrs = ["108.214.49.0/24"] # Replace this with the desired CIDR range +eks = { + public_access = { + enabled = true + cidrs = ["108.214.49.0/24"] # Replace this with the desired CIDR range - } } } diff --git a/modules/eks/README.md b/modules/eks/README.md index 71a28df1..c64e5a8f 100644 --- a/modules/eks/README.md +++ b/modules/eks/README.md @@ -73,7 +73,7 @@ | [create\_eks\_role\_arn](#input\_create\_eks\_role\_arn) | Role arn to assume during the EKS cluster creation. | `string` | n/a | yes | | [deploy\_id](#input\_deploy\_id) | Domino Deployment ID | `string` | n/a | yes | | [efs\_security\_group](#input\_efs\_security\_group) | Security Group ID for EFS | `string` | `null` | no | -| [eks](#input\_eks) | service\_ipv4\_cidr = CIDR for EKS cluster kubernetes\_network\_config.
vpc = optional(object({
id = optional(string, null)
subnets = optional(object({
private = optional(list(string), [])
public = optional(list(string), [])
pod = optional(list(string), [])
}), {})
}), {})
network_bits = optional(object({
public = optional(number, 27)
private = optional(number, 19)
pod = optional(number, 19)
}
), {})
cidrs = optional(object({
vpc = optional(string, "10.0.0.0/16")
pod = optional(string, "100.64.0.0/16")
}), {})
use_pod_cidr = optional(bool, true)
})
object({| `{}` | no | +| [eks](#input\_eks) | service\_ipv4\_cidr = CIDR for EKS cluster kubernetes\_network\_config.
service_ipv4_cidr = optional(string, "172.20.0.0/16")
creation_role_name = optional(string, null)
k8s_version = optional(string, "1.27")
nodes_master = optional(bool, false)
kubeconfig = optional(object({
extra_args = optional(string, "")
path = optional(string, null)
}), {})
public_access = optional(object({
enabled = optional(bool, false)
cidrs = optional(list(string), [])
}), {})
custom_role_maps = optional(list(object({
rolearn = string
username = string
groups = list(string)
})), [])
master_role_names = optional(list(string), [])
cluster_addons = optional(list(string), ["kube-proxy", "coredns", "vpc-cni"])
ssm_log_group_name = optional(string, "session-manager")
vpc_cni = optional(object({
prefix_delegation = optional(bool, false)
annotate_pod_ip = optional(bool, true)
}))
identity_providers = optional(list(object({
client_id = string
groups_claim = optional(string, null)
groups_prefix = optional(string, null)
identity_provider_config_name = string
issuer_url = optional(string, null)
required_claims = optional(string, null)
username_claim = optional(string, null)
username_prefix = optional(string, null)
})), []),
})
object({| `{}` | no | | [ignore\_tags](#input\_ignore\_tags) | Tag keys to be ignored by the aws provider. | `list(string)` | `[]` | no | | [kms\_info](#input\_kms\_info) | key\_id = KMS key id.
service_ipv4_cidr = optional(string, "172.20.0.0/16")
creation_role_name = optional(string, null)
k8s_version = optional(string, "1.27")
nodes_master = optional(bool, false)
kubeconfig = optional(object({
extra_args = optional(string, "")
path = optional(string, null)
}), {})
public_access = optional(object({
enabled = optional(bool, false)
cidrs = optional(list(string), [])
}), {})
custom_role_maps = optional(list(object({
rolearn = string
username = string
groups = list(string)
})), [])
master_role_names = optional(list(string), [])
cluster_addons = optional(list(string), ["kube-proxy", "coredns", "vpc-cni"])
ssm_log_group_name = optional(string, "session-manager")
vpc_cni = optional(object({
prefix_delegation = optional(bool, false)
annotate_pod_ip = optional(bool, true)
}))
identity_providers = optional(list(object({
client_id = string
groups_claim = optional(string, null)
groups_prefix = optional(string, null)
identity_provider_config_name = string
issuer_url = optional(string, null)
required_claims = optional(map(string), null)
username_claim = optional(string, null)
username_prefix = optional(string, null)
})), []),
})
object({| n/a | yes | | [netapp](#input\_netapp) | Configuration for NETAPP |
key_id = string
key_arn = string
enabled = bool
})
object({| `null` | no | diff --git a/modules/eks/variables.tf b/modules/eks/variables.tf index 93bb9010..92902e03 100644 --- a/modules/eks/variables.tf +++ b/modules/eks/variables.tf @@ -178,7 +178,7 @@ variable "eks" { groups_prefix = optional(string, null) identity_provider_config_name = string issuer_url = optional(string, null) - required_claims = optional(string, null) + required_claims = optional(map(string), null) username_claim = optional(string, null) username_prefix = optional(string, null) })), []), diff --git a/modules/infra/README.md b/modules/infra/README.md index 72cf60b2..ba43a3d8 100644 --- a/modules/infra/README.md +++ b/modules/infra/README.md @@ -58,7 +58,7 @@ | [default\_node\_groups](#input\_default\_node\_groups) | EKS managed node groups definition. |
astra_trident_operator_role = optional(string, null)
svm = optional(object({
id = optional(string, null)
management_ip = optional(string, null)
nfs_ip = optional(string, null)
}), null)
filesystem = optional(object({
id = optional(string, null)
security_group_id = optional(string, null)
}), null)
})
object(| n/a | yes | | [deploy\_id](#input\_deploy\_id) | Domino Deployment ID. | `string` | `"domino-eks"` | no | | [domino\_cur](#input\_domino\_cur) | Determines whether to provision domino cost related infrastructures, ie, long term storage |
{
compute = object(
{
ami = optional(string, null)
bootstrap_extra_args = optional(string, "")
instance_types = optional(list(string), ["m6i.2xlarge"])
spot = optional(bool, false)
min_per_az = optional(number, 0)
max_per_az = optional(number, 10)
max_unavailable_percentage = optional(number, 50)
max_unavailable = optional(number, null)
desired_per_az = optional(number, 0)
availability_zone_ids = list(string)
labels = optional(map(string), {
"dominodatalab.com/node-pool" = "default"
})
taints = optional(list(object({
key = string
value = optional(string)
effect = string
})), [])
tags = optional(map(string), {})
gpu = optional(bool, null)
volume = optional(object({
size = optional(number, 1000)
type = optional(string, "gp3")
iops = optional(number)
throughput = optional(number, 500)
}), {
size = 1000
type = "gp3"
iops = null
throughput = 500
}
)
}),
platform = object(
{
ami = optional(string, null)
bootstrap_extra_args = optional(string, "")
instance_types = optional(list(string), ["m7i-flex.2xlarge"])
spot = optional(bool, false)
min_per_az = optional(number, 1)
max_per_az = optional(number, 10)
max_unavailable_percentage = optional(number, null)
max_unavailable = optional(number, 1)
desired_per_az = optional(number, 1)
availability_zone_ids = list(string)
labels = optional(map(string), {
"dominodatalab.com/node-pool" = "platform"
})
taints = optional(list(object({
key = string
value = optional(string)
effect = string
})), [])
tags = optional(map(string), {})
gpu = optional(bool, null)
volume = optional(object({
size = optional(number, 100)
type = optional(string, "gp3")
}), {
size = 100
type = "gp3"
}
)
}),
gpu = object(
{
ami = optional(string, null)
bootstrap_extra_args = optional(string, "")
instance_types = optional(list(string), ["g5.2xlarge"])
spot = optional(bool, false)
min_per_az = optional(number, 0)
max_per_az = optional(number, 10)
max_unavailable_percentage = optional(number, 50)
max_unavailable = optional(number, null)
desired_per_az = optional(number, 0)
availability_zone_ids = list(string)
labels = optional(map(string), {
"dominodatalab.com/node-pool" = "default-gpu"
"nvidia.com/gpu" = true
})
taints = optional(list(object({
key = string
value = optional(string)
effect = string
})), [{
key = "nvidia.com/gpu"
value = "true"
effect = "NO_SCHEDULE"
}
])
tags = optional(map(string), {})
gpu = optional(bool, null)
volume = optional(object({
size = optional(number, 1000)
type = optional(string, "gp3")
}), {
size = 1000
type = "gp3"
}
)
})
})
object({| `{}` | no | -| [eks](#input\_eks) | creation\_role\_name = Name of the role to import.
provision_cost_usage_report = optional(bool, false)
})
object({| `{}` | no | +| [eks](#input\_eks) | creation\_role\_name = Name of the role to import.
creation_role_name = optional(string, null)
k8s_version = optional(string, "1.27")
nodes_master = optional(bool, false)
kubeconfig = optional(object({
extra_args = optional(string, "")
path = optional(string, null)
}), {})
public_access = optional(object({
enabled = optional(bool, false)
cidrs = optional(list(string), [])
}), {})
custom_role_maps = optional(list(object({
rolearn = string
username = string
groups = list(string)
})), [])
master_role_names = optional(list(string), [])
cluster_addons = optional(list(string), ["kube-proxy", "coredns", "vpc-cni"])
ssm_log_group_name = optional(string, "session-manager")
vpc_cni = optional(object({
prefix_delegation = optional(bool)
annotate_pod_ip = optional(bool)
}))
identity_providers = optional(list(object({
client_id = string
groups_claim = optional(string, null)
groups_prefix = optional(string, null)
identity_provider_config_name = string
issuer_url = optional(string, null)
required_claims = optional(string, null)
username_claim = optional(string, null)
username_prefix = optional(string, null)
})), [])
})
object({| `{}` | no | | [ignore\_tags](#input\_ignore\_tags) | Tag keys to be ignored by the aws provider. | `list(string)` | `[]` | no | | [kms](#input\_kms) | enabled = "Toggle, if set use either the specified KMS key\_id or a Domino-generated one"
creation_role_name = optional(string, null)
k8s_version = optional(string, "1.27")
nodes_master = optional(bool, false)
kubeconfig = optional(object({
extra_args = optional(string, "")
path = optional(string, null)
}), {})
public_access = optional(object({
enabled = optional(bool, false)
cidrs = optional(list(string), [])
}), {})
custom_role_maps = optional(list(object({
rolearn = string
username = string
groups = list(string)
})), [])
master_role_names = optional(list(string), [])
cluster_addons = optional(list(string), ["kube-proxy", "coredns", "vpc-cni"])
ssm_log_group_name = optional(string, "session-manager")
vpc_cni = optional(object({
prefix_delegation = optional(bool)
annotate_pod_ip = optional(bool)
}))
identity_providers = optional(list(object({
client_id = string
groups_claim = optional(string, null)
groups_prefix = optional(string, null)
identity_provider_config_name = string
issuer_url = optional(string, null)
required_claims = optional(map(string), null)
username_claim = optional(string, null)
username_prefix = optional(string, null)
})), [])
})
object({| `{}` | no | | [network](#input\_network) | vpc = {
enabled = optional(bool, true)
key_id = optional(string, null)
additional_policies = optional(list(string), [])
})
object({| `{}` | no | diff --git a/modules/infra/variables.tf b/modules/infra/variables.tf index 7c590ad0..21a658e9 100644 --- a/modules/infra/variables.tf +++ b/modules/infra/variables.tf @@ -104,7 +104,7 @@ variable "eks" { groups_prefix = optional(string, null) identity_provider_config_name = string issuer_url = optional(string, null) - required_claims = optional(string, null) + required_claims = optional(map(string), null) username_claim = optional(string, null) username_prefix = optional(string, null) })), []) diff --git a/tests/plan/terraform/README.md b/tests/plan/terraform/README.md index 35531cd5..4021814f 100644 --- a/tests/plan/terraform/README.md +++ b/tests/plan/terraform/README.md @@ -43,7 +43,7 @@ | [default\_node\_groups](#input\_default\_node\_groups) | EKS managed node groups definition. |
vpc = optional(object({
id = optional(string, null)
subnets = optional(object({
private = optional(list(string), [])
public = optional(list(string), [])
pod = optional(list(string), [])
}), {})
}), {})
network_bits = optional(object({
public = optional(number, 27)
private = optional(number, 19)
pod = optional(number, 19)
}
), {})
cidrs = optional(object({
vpc = optional(string, "10.0.0.0/16")
pod = optional(string, "100.64.0.0/16")
}), {})
use_pod_cidr = optional(bool, true)
})
object(| n/a | yes | | [deploy\_id](#input\_deploy\_id) | Domino Deployment ID. | `string` | `"domino-eks"` | no | | [domino\_cur](#input\_domino\_cur) | Determines whether to provision domino cost related infrastructures, ie, long term storage |
{
compute = object(
{
ami = optional(string, null)
bootstrap_extra_args = optional(string, "")
instance_types = optional(list(string), ["m6i.2xlarge"])
spot = optional(bool, false)
min_per_az = optional(number, 0)
max_per_az = optional(number, 10)
max_unavailable_percentage = optional(number, 50)
max_unavailable = optional(number, null)
desired_per_az = optional(number, 0)
availability_zone_ids = list(string)
labels = optional(map(string), {
"dominodatalab.com/node-pool" = "default"
})
taints = optional(list(object({
key = string
value = optional(string)
effect = string
})), [])
tags = optional(map(string), {})
gpu = optional(bool, null)
volume = optional(object({
size = optional(number, 1000)
type = optional(string, "gp3")
}), {
size = 1000
type = "gp3"
}
)
}),
platform = object(
{
ami = optional(string, null)
bootstrap_extra_args = optional(string, "")
instance_types = optional(list(string), ["m7i-flex.2xlarge"])
spot = optional(bool, false)
min_per_az = optional(number, 1)
max_per_az = optional(number, 10)
max_unavailable_percentage = optional(number, null)
max_unavailable = optional(number, 1)
desired_per_az = optional(number, 1)
availability_zone_ids = list(string)
labels = optional(map(string), {
"dominodatalab.com/node-pool" = "platform"
})
taints = optional(list(object({
key = string
value = optional(string)
effect = string
})), [])
tags = optional(map(string), {})
gpu = optional(bool, null)
volume = optional(object({
size = optional(number, 100)
type = optional(string, "gp3")
}), {
size = 100
type = "gp3"
}
)
}),
gpu = object(
{
ami = optional(string, null)
bootstrap_extra_args = optional(string, "")
instance_types = optional(list(string), ["g5.2xlarge"])
spot = optional(bool, false)
min_per_az = optional(number, 0)
max_per_az = optional(number, 10)
max_unavailable_percentage = optional(number, 50)
max_unavailable = optional(number, null)
desired_per_az = optional(number, 0)
availability_zone_ids = list(string)
labels = optional(map(string), {
"dominodatalab.com/node-pool" = "default-gpu"
"nvidia.com/gpu" = true
})
taints = optional(list(object({
key = string
value = optional(string)
effect = string
})), [{
key = "nvidia.com/gpu"
value = "true"
effect = "NO_SCHEDULE"
}
])
tags = optional(map(string), {})
gpu = optional(bool, null)
volume = optional(object({
size = optional(number, 1000)
type = optional(string, "gp3")
}), {
size = 1000
type = "gp3"
}
)
})
})
object({| `{}` | no | -| [eks](#input\_eks) | k8s\_version = EKS cluster k8s version.
provision_cost_usage_report = optional(bool, false)
})
object({| `{}` | no | +| [eks](#input\_eks) | k8s\_version = EKS cluster k8s version.
k8s_version = optional(string, "1.27")
nodes_master = optional(bool, false)
kubeconfig = optional(object({
extra_args = optional(string, "")
path = optional(string, null)
}), {})
public_access = optional(object({
enabled = optional(bool, false)
cidrs = optional(list(string), [])
}), {})
custom_role_maps = optional(list(object({
rolearn = string
username = string
groups = list(string)
})), [])
master_role_names = optional(list(string), [])
cluster_addons = optional(list(string), ["kube-proxy", "coredns"])
ssm_log_group_name = optional(string, "session-manager")
vpc_cni = optional(object({
prefix_delegation = optional(bool)
annotate_pod_ip = optional(bool)
}))
identity_providers = optional(list(object({
client_id = string
groups_claim = optional(string, null)
groups_prefix = optional(string, null)
identity_provider_config_name = string
issuer_url = optional(string, null)
required_claims = optional(string, null)
username_claim = optional(string, null)
username_prefix = optional(string, null)
})), [])
})
object({| `{}` | no | | [enable\_private\_link](#input\_enable\_private\_link) | Enable Private Link connections | `bool` | `false` | no | | [external\_deployments\_operator](#input\_external\_deployments\_operator) | Config to create IRSA role for the external deployments operator. |
k8s_version = optional(string, "1.27")
nodes_master = optional(bool, false)
kubeconfig = optional(object({
extra_args = optional(string, "")
path = optional(string, null)
}), {})
public_access = optional(object({
enabled = optional(bool, false)
cidrs = optional(list(string), [])
}), {})
custom_role_maps = optional(list(object({
rolearn = string
username = string
groups = list(string)
})), [])
master_role_names = optional(list(string), [])
cluster_addons = optional(list(string), ["kube-proxy", "coredns"])
ssm_log_group_name = optional(string, "session-manager")
vpc_cni = optional(object({
prefix_delegation = optional(bool)
annotate_pod_ip = optional(bool)
}))
identity_providers = optional(list(object({
client_id = string
groups_claim = optional(string, null)
groups_prefix = optional(string, null)
identity_provider_config_name = string
issuer_url = optional(string, null)
required_claims = optional(map(string), null)
username_claim = optional(string, null)
username_prefix = optional(string, null)
})), [])
})
object({| `{}` | no | | [ignore\_tags](#input\_ignore\_tags) | Tag keys to be ignored by the aws provider. | `list(string)` | `[]` | no | diff --git a/tests/plan/terraform/variables.tf b/tests/plan/terraform/variables.tf index cdec672c..7071a509 100644 --- a/tests/plan/terraform/variables.tf +++ b/tests/plan/terraform/variables.tf @@ -112,7 +112,7 @@ variable "eks" { groups_prefix = optional(string, null) identity_provider_config_name = string issuer_url = optional(string, null) - required_claims = optional(string, null) + required_claims = optional(map(string), null) username_claim = optional(string, null) username_prefix = optional(string, null) })), [])
enabled = optional(bool, false)
namespace = optional(string, "domino-compute")
operator_service_account_name = optional(string, "pham-juno-operator")
operator_role_suffix = optional(string, "external-deployments-operator")
repository_suffix = optional(string, "external-deployments")
bucket_suffix = optional(string, "external-deployments")
enable_assume_any_external_role = optional(bool, true)
enable_in_account_deployments = optional(bool, true)
})