Files
nomad/e2e/terraform/variables.tf
Tim Gross 020fa6f8ba E2E with HCP Consul/Vault (#12267)
Use HCP Consul and HCP Vault for the Consul and Vault clusters used in E2E testing. This has the following benefits:

* Without the need to support mTLS bootstrapping for Consul and Vault, we can simplify the mTLS configuration by leaning on Terraform instead of janky bash shell scripting.
* Vault bootstrapping is no longer required, so we can eliminate even more janky shell scripting
* Our E2E exercises HCP, which is important to us as an organization
* With the reduction in configurability, we can simplify the Terraform configuration and drop the complicated `provision.sh`/`provision.ps1` scripts we were using previously. We can template Nomad configuration files and upload them with the `file` provisioner.
* Packer builds for Linux and Windows become much simpler.

tl;dr way less janky shell scripting!
2022-03-18 09:27:28 -04:00

124 lines
3.4 KiB
HCL

variable "name" {
description = "Used to name various infrastructure components"
default = "nomad-e2e"
}
variable "region" {
description = "The AWS region to deploy to."
default = "us-east-1"
}
variable "availability_zone" {
description = "The AWS availability zone to deploy to."
default = "us-east-1b"
}
variable "instance_type" {
description = "The AWS instance type to use for both clients and servers."
default = "t2.medium"
}
variable "server_count" {
description = "The number of servers to provision."
default = "3"
}
variable "client_count_ubuntu_bionic_amd64" {
description = "The number of Ubuntu clients to provision."
default = "4"
}
variable "client_count_windows_2016_amd64" {
description = "The number of windows 2016 clients to provision."
default = "1"
}
variable "aws_assume_role_arn" {
description = "The AWS IAM role to assume (not used by human users)"
default = ""
}
variable "aws_assume_role_session_name" {
description = "The AWS IAM session name to assume (not used by human users)"
default = ""
}
variable "aws_assume_role_external_id" {
description = "The AWS IAM external ID to assume (not used by human users)"
default = ""
}
variable "profile" {
description = "A default Nomad/Consul/Vault configuration profile"
type = string
default = ""
}
variable "restrict_ingress_cidrblock" {
description = "Restrict ingress traffic to cluster to invoker ip address"
type = bool
default = true
}
# ----------------------------------------
# The specific version of Nomad deployed will default to whichever one of
# nomad_sha, nomad_version, or nomad_local_binary is set
variable "nomad_local_binary" {
description = "The path to a local binary to provision"
default = ""
}
variable "nomad_license" {
type = string
description = "If nomad_license is set, deploy a license to override the temporary license"
default = ""
}
variable "volumes" {
type = bool
description = "Include external EFS volumes (for CSI)"
default = true
}
variable "hcp_consul_cluster_id" {
description = "The ID of the HCP Consul cluster"
type = string
default = "nomad-e2e-shared-hcp-consul"
}
variable "hcp_vault_cluster_id" {
description = "The ID of the HCP Vault cluster"
type = string
default = "nomad-e2e-shared-hcp-vault"
}
variable "hcp_vault_namespace" {
description = "The namespace where the HCP Vault cluster policy works"
type = string
default = "admin"
}
# ----------------------------------------
# If you want to deploy multiple versions you can use these variables to
# provide a list of builds to override the values of nomad_sha, nomad_version,
# or nomad_local_binary. Most of the time you can ignore these variables!
variable "nomad_local_binary_server" {
description = "A list of nomad local binary paths to deploy to servers, to override nomad_local_binary"
type = list(string)
default = []
}
variable "nomad_local_binary_client_ubuntu_bionic_amd64" {
description = "A list of nomad local binary paths to deploy to Ubuntu Bionic clients, to override nomad_local_binary"
type = list(string)
default = []
}
variable "nomad_local_binary_client_windows_2016_amd64" {
description = "A list of nomad local binary paths to deploy to Windows 2016 clients, to override nomad_local_binary"
type = list(string)
default = []
}