terraform-rancher2-aws/modules/rancher_bootstrap/variables.tf

118 lines
3.6 KiB
HCL

variable "project_domain" {
type = string
description = <<-EOT
The project domain. An fqdn, eg. "test.example.com".
EOT
validation {
condition = can(regex(
"^(?:https?://)?[[:alpha:]](?:[[:alnum:]\\p{Pd}]{1,63}\\.)+[[:alnum:]\\p{Pd}]{1,62}[[:alnum:]](?::[[:digit:]]{1,5})?$",
var.project_domain
))
error_message = "Must be a fully qualified domain name."
}
}
variable "zone_id" {
type = string
description = <<-EOT
The ID of the zone within the domain.
eg. if the domain is "test.example.com", then the zone should be "example.com"
The AWS ID of that zone.
EOT
}
variable "region" {
type = string
description = <<-EOT
The AWS region for cert manager to validate certificates.
EOT
}
variable "email" {
type = string
description = <<-EOT
The email to use when registering an account with Let's Encrypt.
EOT
}
variable "acme_server_url" {
type = string
description = <<-EOT
The ACME server url to use for issuing certs.
EOT
default = "https://acme-v02.api.letsencrypt.org/directory"
}
variable "rancher_version" {
type = string
description = <<-EOT
The version of rancher to install.
EOT
default = "2.11.2"
}
variable "rancher_helm_repo" {
type = string
description = <<-EOT
The Helm repository to retrieve charts from.
EOT
default = "https://releases.rancher.com/server-charts"
}
variable "rancher_helm_channel" {
type = string
description = <<-EOT
The Helm repository channel retrieve charts from.
Can be "latest" or "stable", defaults to "stable".
EOT
default = "stable"
}
variable "cert_manager_version" {
type = string
description = <<-EOT
The version of cert manager to install.
EOT
default = "v1.13.1"
}
variable "externalTLS" {
type = bool
description = <<-EOT
Whether or not to use Cert Manager for Rancher's TLS.
If true, this assumes you have saved the external certificate in the "tls-rancher-ingress" kubernetes secret.
EOT
default = true
}
variable "path" {
type = string
description = <<-EOT
The local file path to stage files for the deployment.
EOT
}
variable "rancher_helm_chart_use_strategy" {
type = string
description = <<-EOT
The strategy to use for Rancher's Helm chart values.
Options include: "default", "merge", or "provide".
Default will tell the module to use our suggested default configuration.
Merge will merge our default suggestions with your supplied configuration, anything you supply will override the default.
Provide will ignore our default suggestions and use the configuration provided in the rancher_helm_chart_values argument.
EOT
default = "default"
validation {
condition = contains(["default", "merge", "provide"], var.rancher_helm_chart_use_strategy)
error_message = "Must be one of 'default', 'merge', or 'provide'."
}
}
variable "rancher_helm_chart_values" {
type = map(any)
description = <<-EOT
A key/value map of Helm arguments to pass to the Rancher helm chart.
This will be ignored if the rancher_helm_chart_use_strategy argument is set to "default".
eg.
{
"hostname" = local.rancher_domain
"replicas" = "1"
"bootstrapPassword" = "admin"
"ingress.enabled" = "true"
"ingress.tls.source" = "secret"
"ingress.tls.secretName" = "tls-rancher-ingress"
"privateCA" = "true"
"agentTLSMode" = "system-store"
}
EOT
default = {}
}