diff --git a/examples/deploy/terraform/infra/README.md b/examples/deploy/terraform/infra/README.md index 7d8eb0cc..bd6f32a0 100644 --- a/examples/deploy/terraform/infra/README.md +++ b/examples/deploy/terraform/infra/README.md @@ -27,9 +27,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [additional\_node\_groups](#input\_additional\_node\_groups) | Additional EKS managed node groups definition. |
map(object({| `{}` | no | -| [bastion](#input\_bastion) | enabled = Create bastion host.
ami = optional(string)
bootstrap_extra_args = optional(string)
instance_types = list(string)
spot = optional(bool)
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)
volume = object({
size = string
type = string
})
}))
object({| n/a | yes | +| [bastion](#input\_bastion) | enabled = Create bastion host.
enabled = optional(bool)
ami_id = optional(string)
instance_type = optional(string)
authorized_ssh_ip_ranges = optional(list(string))
username = optional(string)
install_binaries = optional(bool)
})
object({| n/a | yes | | [default\_node\_groups](#input\_default\_node\_groups) | EKS managed node groups definition. |
enabled = optional(bool, true)
ami_id = optional(string)
instance_type = optional(string)
authorized_ssh_ip_ranges = optional(list(string))
username = optional(string)
install_binaries = optional(bool)
})
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), ["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 | | [eks](#input\_eks) | service\_ipv4\_cidr = CIDR for EKS cluster kubernetes\_network\_config.
provision_cost_usage_report = optional(bool, false)
})
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 | diff --git a/examples/deploy/terraform/infra/main.tf b/examples/deploy/terraform/infra/main.tf index 814f95b7..02002f9d 100644 --- a/examples/deploy/terraform/infra/main.tf +++ b/examples/deploy/terraform/infra/main.tf @@ -16,6 +16,7 @@ module "infra" { ssh_pvt_key_path = var.ssh_pvt_key_path tags = var.tags ignore_tags = var.ignore_tags + domino_cur = var.domino_cur } diff --git a/examples/deploy/terraform/infra/outputs.tf b/examples/deploy/terraform/infra/outputs.tf index 31877fb5..2abf30fe 100644 --- a/examples/deploy/terraform/infra/outputs.tf +++ b/examples/deploy/terraform/infra/outputs.tf @@ -5,7 +5,7 @@ output "infra" { output "ssh_bastion_command" { description = "Command used in order to ssh to bastion." - value = module.infra.bastion.ssh_bastion_command + value = var.bastion.enabled ? module.infra.bastion.ssh_bastion_command : null } output "domino_config_values" { diff --git a/examples/deploy/terraform/infra/variables.tf b/examples/deploy/terraform/infra/variables.tf index d32c7108..c635a2af 100644 --- a/examples/deploy/terraform/infra/variables.tf +++ b/examples/deploy/terraform/infra/variables.tf @@ -355,7 +355,7 @@ variable "bastion" { EOF type = object({ - enabled = optional(bool) + enabled = optional(bool, true) ami_id = optional(string) instance_type = optional(string) authorized_ssh_ip_ranges = optional(list(string)) @@ -363,3 +363,13 @@ variable "bastion" { install_binaries = optional(bool) }) } + + +variable "domino_cur" { + description = "Determines whether to provision domino cost related infrastructures, ie, long term storage" + type = object({ + provision_cost_usage_report = optional(bool, false) + }) + + default = {} +} diff --git a/examples/tfvars/minimal-wo-bastion.tfvars b/examples/tfvars/minimal-wo-bastion.tfvars index dca73170..a8c2a100 100644 --- a/examples/tfvars/minimal-wo-bastion.tfvars +++ b/examples/tfvars/minimal-wo-bastion.tfvars @@ -12,11 +12,10 @@ default_node_groups = { platform = { "availability_zone_ids" = ["usw2-az1", "usw2-az2"] } - - ## bastion is enabled by default - bastion = { - enabled = false - } } route53_hosted_zone_name = "deploys-delta.domino.tech" + +bastion = { + enabled = false +} diff --git a/examples/tfvars/public-access.tfvars b/examples/tfvars/public-access.tfvars index 9db7e4ab..66c28902 100644 --- a/examples/tfvars/public-access.tfvars +++ b/examples/tfvars/public-access.tfvars @@ -21,3 +21,7 @@ default_node_groups = { } } } + +bastion = { + enabled = false +}
enabled = optional(bool)
key_id = optional(string)
})