From 8bfb1b9ac3ce59d27f5fc0dadeecb683d05105ed Mon Sep 17 00:00:00 2001 From: miguelhar <98769216+miguelhar@users.noreply.github.com> Date: Mon, 22 Jan 2024 17:22:23 -0500 Subject: [PATCH] ignore duration tag (#201) --- examples/deploy/terraform/cluster/main.tf | 10 +++++++++- examples/deploy/terraform/infra/README.md | 1 + examples/deploy/terraform/infra/main.tf | 5 +++++ examples/deploy/terraform/infra/variables.tf | 6 ++++++ examples/deploy/terraform/nodes/main.tf | 1 + modules/eks/README.md | 1 + modules/eks/variables.tf | 6 ++++++ modules/eks/versions.tf | 6 ++++++ modules/iam-bootstrap/README.md | 1 + modules/iam-bootstrap/variables.tf | 6 ++++++ modules/iam-bootstrap/versions.tf | 3 +++ modules/infra/README.md | 2 ++ modules/infra/main.tf | 3 +++ modules/infra/outputs.tf | 5 +++++ modules/infra/variables.tf | 6 ++++++ modules/infra/versions.tf | 3 +++ modules/nodes/README.md | 1 + modules/nodes/variables.tf | 6 ++++++ modules/nodes/versions.tf | 3 +++ tests/deploy/infra-ci.tfvars.tftpl | 2 ++ tests/deploy/single-node/README.md | 1 + tests/deploy/single-node/variables.tf | 7 +++++++ tests/deploy/single-node/versions.tf | 3 +++ tests/plan/create-kms-key/README.md | 1 + tests/plan/create-kms-key/variables.tf | 6 ++++++ tests/plan/create-kms-key/versions.tf | 6 ++++++ tests/plan/terraform/README.md | 1 + tests/plan/terraform/variables.tf | 6 ++++++ tests/plan/terraform/versions.tf | 3 +++ 29 files changed, 110 insertions(+), 1 deletion(-) diff --git a/examples/deploy/terraform/cluster/main.tf b/examples/deploy/terraform/cluster/main.tf index e86e0146..cb35f2a0 100644 --- a/examples/deploy/terraform/cluster/main.tf +++ b/examples/deploy/terraform/cluster/main.tf @@ -25,7 +25,9 @@ module "eks" { bastion_info = local.infra.bastion create_eks_role_arn = local.infra.create_eks_role_arn tags = local.infra.tags + ignore_tags = local.infra.ignore_tags } + data "aws_caller_identity" "global" { provider = aws.global } @@ -67,11 +69,17 @@ module "irsa_policies" { # by specifying the profile belonging to the account pertaining to the hosted zone. provider "aws" { alias = "global" - # profile = << profile with credentials to account where the hosted zone resides>> + # profile = "global" + ignore_tags { + keys = local.infra.ignore_tags + } } provider "aws" { region = local.infra.region + ignore_tags { + keys = local.infra.ignore_tags + } } terraform { required_version = ">= 1.4.0" diff --git a/examples/deploy/terraform/infra/README.md b/examples/deploy/terraform/infra/README.md index 840aa8bc..7d8eb0cc 100644 --- a/examples/deploy/terraform/infra/README.md +++ b/examples/deploy/terraform/infra/README.md @@ -31,6 +31,7 @@ No resources. | [default\_node\_groups](#input\_default\_node\_groups) | EKS managed node groups definition. |
object(| n/a | yes | | [deploy\_id](#input\_deploy\_id) | Domino Deployment ID. | `string` | n/a | yes | | [eks](#input\_eks) | service\_ipv4\_cidr = CIDR for EKS cluster kubernetes\_network\_config.
{
compute = object(
{
ami = optional(string, null)
bootstrap_extra_args = optional(string, "")
instance_types = optional(list(string), ["m5.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), ["m5.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.xlarge"])
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 | +| [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(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 | | [region](#input\_region) | AWS region for the deployment | `string` | n/a | yes | diff --git a/examples/deploy/terraform/infra/main.tf b/examples/deploy/terraform/infra/main.tf index 04145498..814f95b7 100644 --- a/examples/deploy/terraform/infra/main.tf +++ b/examples/deploy/terraform/infra/main.tf @@ -15,11 +15,16 @@ module "infra" { route53_hosted_zone_private = var.route53_hosted_zone_private ssh_pvt_key_path = var.ssh_pvt_key_path tags = var.tags + ignore_tags = var.ignore_tags } provider "aws" { region = var.region + + ignore_tags { + keys = var.ignore_tags + } } terraform { diff --git a/examples/deploy/terraform/infra/variables.tf b/examples/deploy/terraform/infra/variables.tf index 83a8d25d..d32c7108 100644 --- a/examples/deploy/terraform/infra/variables.tf +++ b/examples/deploy/terraform/infra/variables.tf @@ -13,6 +13,12 @@ variable "tags" { type = map(string) } +variable "ignore_tags" { + type = list(string) + description = "Tag keys to be ignored by the aws provider." + default = [] +} + variable "network" { description = <
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 | +| [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"])
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({| n/a | yes | | [network\_info](#input\_network\_info) | id = VPC ID.
key_id = string
key_arn = string
enabled = bool
})
object({| n/a | yes | | [node\_iam\_policies](#input\_node\_iam\_policies) | Additional IAM Policy Arns for Nodes | `list(string)` | n/a | yes | diff --git a/modules/eks/variables.tf b/modules/eks/variables.tf index f07dd913..50c18aca 100644 --- a/modules/eks/variables.tf +++ b/modules/eks/variables.tf @@ -208,6 +208,12 @@ variable "tags" { default = {} } +variable "ignore_tags" { + type = list(string) + description = "Tag keys to be ignored by the aws provider." + default = [] +} + variable "privatelink" { description = <
vpc_id = string
subnets = object({
public = list(object({
name = string
subnet_id = string
az = string
az_id = string
}))
private = list(object({
name = string
subnet_id = string
az = string
az_id = string
}))
pod = list(object({
name = string
subnet_id = string
az = string
az_id = string
}))
})
vpc_cidrs = string
})
object({| `{}` | no | | [eks](#input\_eks) | creation\_role\_name = Name of the role to import.
provision_cost_usage_report = optional(bool, false)
})
object({| `{}` | no | | [flyte](#input\_flyte) | enabled = Whether to provision any Flyte related resources |
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"])
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"
enabled = optional(bool, false)
})
object({| `{}` | no | | [network](#input\_network) | vpc = {
enabled = optional(bool, true)
key_id = optional(string, null)
additional_policies = optional(list(string), [])
})
object({| `{}` | no | | [region](#input\_region) | AWS region for the deployment | `string` | n/a | yes | @@ -85,6 +86,7 @@ | [efs\_security\_group](#output\_efs\_security\_group) | Security Group ID for EFS | | [eks](#output\_eks) | EKS variables. | | [hostname](#output\_hostname) | Domino instance URL. | +| [ignore\_tags](#output\_ignore\_tags) | Tags to be ignored by the aws provider | | [kms](#output\_kms) | KMS key details, if enabled. | | [monitoring\_bucket](#output\_monitoring\_bucket) | Monitoring Bucket | | [network](#output\_network) | Network details. | diff --git a/modules/infra/main.tf b/modules/infra/main.tf index d5f94ab2..54563a13 100644 --- a/modules/infra/main.tf +++ b/modules/infra/main.tf @@ -108,4 +108,7 @@ provider "aws" { default_tags { tags = var.tags } + ignore_tags { + keys = var.ignore_tags + } } diff --git a/modules/infra/outputs.tf b/modules/infra/outputs.tf index dd7f610f..a539cab7 100644 --- a/modules/infra/outputs.tf +++ b/modules/infra/outputs.tf @@ -37,6 +37,11 @@ output "deploy_id" { value = var.deploy_id } +output "ignore_tags" { + description = "Tags to be ignored by the aws provider" + value = var.ignore_tags +} + output "region" { description = "Deployment Region." value = var.region diff --git a/modules/infra/variables.tf b/modules/infra/variables.tf index 47473126..4cbdcbb6 100644 --- a/modules/infra/variables.tf +++ b/modules/infra/variables.tf @@ -48,6 +48,12 @@ variable "tags" { default = {} } +variable "ignore_tags" { + type = list(string) + description = "Tag keys to be ignored by the aws provider." + default = [] +} + variable "ssh_pvt_key_path" { type = string description = "SSH private key filepath." diff --git a/modules/infra/versions.tf b/modules/infra/versions.tf index 4e5c45ab..26e0e9c0 100644 --- a/modules/infra/versions.tf +++ b/modules/infra/versions.tf @@ -25,4 +25,7 @@ provider "aws" { default_tags { tags = var.tags } + ignore_tags { + keys = var.ignore_tags + } } diff --git a/modules/nodes/README.md b/modules/nodes/README.md index 84641295..048c5dce 100644 --- a/modules/nodes/README.md +++ b/modules/nodes/README.md @@ -45,6 +45,7 @@ No modules. | [additional\_node\_groups](#input\_additional\_node\_groups) | Additional 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)
})
map(object({| `{}` | no | | [default\_node\_groups](#input\_default\_node\_groups) | EKS managed node groups definition. |
ami = optional(string, null)
bootstrap_extra_args = optional(string, "")
instance_types = list(string)
spot = optional(bool, false)
min_per_az = number
max_per_az = number
max_unavailable_percentage = optional(number, 50)
max_unavailable = optional(number)
desired_per_az = number
availability_zone_ids = list(string)
labels = map(string)
taints = optional(list(object({
key = string
value = optional(string)
effect = string
})), [])
tags = optional(map(string), {})
gpu = optional(bool, null)
volume = object({
size = string
type = string
})
}))
object(| n/a | yes | | [eks\_info](#input\_eks\_info) | cluster = {
{
compute = object(
{
ami = optional(string, null)
bootstrap_extra_args = optional(string, "")
instance_types = optional(list(string), ["m5.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), ["m5.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.xlarge"])
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({| n/a | yes | +| [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.
k8s_pre_setup_sh_file = string
cluster = object({
addons = list(string)
specs = object({
name = string
endpoint = string
kubernetes_network_config = list(map(any))
certificate_authority = list(map(any))
})
version = string
arn = string
security_group_id = string
endpoint = string
roles = list(object({
name = string
arn = string
}))
custom_roles = list(object({
rolearn = string
username = string
groups = list(string)
}))
oidc = object({
arn = string
url = string
})
})
nodes = object({
security_group_id = string
roles = list(object({
name = string
arn = string
}))
})
kubeconfig = object({
path = string
extra_args = string
})
})
object({| n/a | yes | | [network\_info](#input\_network\_info) | id = VPC ID.
key_id = string
key_arn = string
enabled = bool
})
object({| n/a | yes | | [region](#input\_region) | AWS region for the deployment | `string` | n/a | yes | diff --git a/modules/nodes/variables.tf b/modules/nodes/variables.tf index 6b15801b..e2d55776 100644 --- a/modules/nodes/variables.tf +++ b/modules/nodes/variables.tf @@ -286,6 +286,12 @@ variable "tags" { default = {} } +variable "ignore_tags" { + type = list(string) + description = "Tag keys to be ignored by the aws provider." + default = [] +} + variable "region" { type = string description = "AWS region for the deployment" diff --git a/modules/nodes/versions.tf b/modules/nodes/versions.tf index 872e5e4e..9afebe43 100644 --- a/modules/nodes/versions.tf +++ b/modules/nodes/versions.tf @@ -22,4 +22,7 @@ provider "aws" { default_tags { tags = var.tags } + ignore_tags { + keys = var.ignore_tags + } } diff --git a/tests/deploy/infra-ci.tfvars.tftpl b/tests/deploy/infra-ci.tfvars.tftpl index e68bccb1..f2181eb5 100644 --- a/tests/deploy/infra-ci.tfvars.tftpl +++ b/tests/deploy/infra-ci.tfvars.tftpl @@ -67,3 +67,5 @@ tags = { CIRCLE_REPOSITORY_URL = "${CIRCLE_REPOSITORY_URL}" CIRCLE_BUILD_NUM = "${CIRCLE_BUILD_NUM}" } + +ignore_tag_keys = ["my-ignored-tag"] diff --git a/tests/deploy/single-node/README.md b/tests/deploy/single-node/README.md index 6176a3d4..870cce4e 100644 --- a/tests/deploy/single-node/README.md +++ b/tests/deploy/single-node/README.md @@ -32,6 +32,7 @@ | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| +| [ignore\_tags](#input\_ignore\_tags) | Tag keys to be ignored by the aws provider. | `list(string)` | `[]` | no | | [single\_node](#input\_single\_node) | Additional EKS managed node groups definition. |
vpc_id = string
subnets = object({
public = list(object({
name = string
subnet_id = string
az = string
az_id = string
}))
private = optional(list(object({
name = string
subnet_id = string
az = string
az_id = string
})), [])
pod = optional(list(object({
name = string
subnet_id = string
az = string
az_id = string
})), [])
})
})
object({| `{}` | no | ## Outputs diff --git a/tests/deploy/single-node/variables.tf b/tests/deploy/single-node/variables.tf index f7ddff6c..a3a474a7 100644 --- a/tests/deploy/single-node/variables.tf +++ b/tests/deploy/single-node/variables.tf @@ -24,3 +24,10 @@ variable "single_node" { default = {} } + + +variable "ignore_tags" { + type = list(string) + description = "Tag keys to be ignored by the aws provider." + default = [] +} diff --git a/tests/deploy/single-node/versions.tf b/tests/deploy/single-node/versions.tf index 275d0a41..ab72d93d 100644 --- a/tests/deploy/single-node/versions.tf +++ b/tests/deploy/single-node/versions.tf @@ -14,4 +14,7 @@ provider "aws" { default_tags { tags = local.infra.tags } + ignore_tags { + keys = var.ignore_tags + } } diff --git a/tests/plan/create-kms-key/README.md b/tests/plan/create-kms-key/README.md index 8e1fb541..9803720d 100644 --- a/tests/plan/create-kms-key/README.md +++ b/tests/plan/create-kms-key/README.md @@ -33,6 +33,7 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [deploy\_id](#input\_deploy\_id) | Deployment ID. | `string` | `"dominoeks003"` | no | +| [ignore\_tags](#input\_ignore\_tags) | Tag keys to be ignored by the aws provider. | `list(string)` | `[]` | no | | [region](#input\_region) | AWS region for deployment. | `string` | `"us-west-2"` | no | ## Outputs diff --git a/tests/plan/create-kms-key/variables.tf b/tests/plan/create-kms-key/variables.tf index 3a9c918f..e9a8487b 100644 --- a/tests/plan/create-kms-key/variables.tf +++ b/tests/plan/create-kms-key/variables.tf @@ -9,3 +9,9 @@ variable "deploy_id" { type = string default = "dominoeks003" } + +variable "ignore_tags" { + type = list(string) + description = "Tag keys to be ignored by the aws provider." + default = [] +} diff --git a/tests/plan/create-kms-key/versions.tf b/tests/plan/create-kms-key/versions.tf index d9663b77..a056f09c 100644 --- a/tests/plan/create-kms-key/versions.tf +++ b/tests/plan/create-kms-key/versions.tf @@ -10,10 +10,16 @@ terraform { provider "aws" { region = var.region + ignore_tags { + keys = var.ignore_tags + } } provider "aws" { region = "us-east-1" alias = "us-east-1" + ignore_tags { + keys = var.ignore_tags + } } diff --git a/tests/plan/terraform/README.md b/tests/plan/terraform/README.md index cc22f404..de485a16 100644 --- a/tests/plan/terraform/README.md +++ b/tests/plan/terraform/README.md @@ -44,6 +44,7 @@ | [domino\_cur](#input\_domino\_cur) | Determines whether to provision domino cost related infrastructures, ie, long term storage |
name = optional(string, "single-node")
bootstrap_extra_args = optional(string, "")
ami = optional(object({
name_prefix = optional(string, null)
owner = optional(string, null)
}))
instance_type = optional(string, "m5.2xlarge")
authorized_ssh_ip_ranges = optional(list(string), ["0.0.0.0/0"])
labels = optional(map(string))
taints = optional(list(object({
key = string
value = optional(string)
effect = string
})), [])
volume = optional(object({
size = optional(number, 1000)
type = optional(string, "gp3")
}), {})
})
object({| `{}` | no | | [eks](#input\_eks) | k8s\_version = EKS cluster k8s version.
provision_cost_usage_report = optional(bool, false)
})
object({| `{}` | no | | [enable\_private\_link](#input\_enable\_private\_link) | Enable Private Link connections | `bool` | `false` | 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.
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 | | [network](#input\_network) | vpc = {
enabled = optional(bool, true)
key_id = optional(string, null)
additional_policies = optional(list(string), [])
})
object({| `{}` | no | | [region](#input\_region) | AWS region for the deployment | `string` | n/a | yes | diff --git a/tests/plan/terraform/variables.tf b/tests/plan/terraform/variables.tf index b783c6ee..0e0f1640 100644 --- a/tests/plan/terraform/variables.tf +++ b/tests/plan/terraform/variables.tf @@ -42,6 +42,12 @@ variable "tags" { default = {} } +variable "ignore_tags" { + type = list(string) + description = "Tag keys to be ignored by the aws provider." + default = [] +} + variable "ssh_pvt_key_path" { type = string description = "SSH private key filepath." diff --git a/tests/plan/terraform/versions.tf b/tests/plan/terraform/versions.tf index 94b8dc30..ae4c1b0f 100644 --- a/tests/plan/terraform/versions.tf +++ b/tests/plan/terraform/versions.tf @@ -1,5 +1,8 @@ provider "aws" { region = var.region + ignore_tags { + keys = var.ignore_tags + } } terraform {
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)
})