kubespray/contrib/terraform/openstack/variables.tf

281 lines
5.8 KiB
Terraform
Raw Normal View History

2016-06-06 04:52:20 +08:00
variable "cluster_name" {
default = "example"
}
variable "az_list" {
description = "List of Availability Zones to use for masters in your OpenStack cluster"
type = list(string)
default = ["nova"]
}
variable "az_list_node" {
description = "List of Availability Zones to use for nodes in your OpenStack cluster"
type = list(string)
default = ["nova"]
}
variable "number_of_bastions" {
default = 1
}
2016-06-06 04:52:20 +08:00
variable "number_of_k8s_masters" {
default = 2
}
variable "number_of_k8s_masters_no_etcd" {
default = 2
}
variable "number_of_etcd" {
default = 2
}
variable "number_of_k8s_masters_no_floating_ip" {
default = 2
}
variable "number_of_k8s_masters_no_floating_ip_no_etcd" {
default = 2
}
2016-06-06 04:52:20 +08:00
variable "number_of_k8s_nodes" {
default = 1
}
variable "number_of_k8s_nodes_no_floating_ip" {
default = 1
}
variable "number_of_gfs_nodes_no_floating_ip" {
default = 0
}
variable "bastion_root_volume_size_in_gb" {
default = 0
}
variable "etcd_root_volume_size_in_gb" {
default = 0
}
variable "master_root_volume_size_in_gb" {
default = 0
}
variable "node_root_volume_size_in_gb" {
default = 0
}
variable "gfs_root_volume_size_in_gb" {
default = 0
}
variable "gfs_volume_size_in_gb" {
default = 75
}
variable "master_volume_type" {
default = "Default"
}
2016-06-06 04:52:20 +08:00
variable "public_key_path" {
description = "The path of the ssh pub key"
2018-01-05 19:09:04 +08:00
default = "~/.ssh/id_rsa.pub"
2016-06-06 04:52:20 +08:00
}
variable "image" {
description = "the image to use"
default = ""
2016-06-06 04:52:20 +08:00
}
variable "image_gfs" {
description = "Glance image to use for GlusterFS"
default = ""
}
2016-06-06 04:52:20 +08:00
variable "ssh_user" {
description = "used to fill out tags for ansible inventory"
2018-01-05 19:09:04 +08:00
default = "ubuntu"
2016-06-06 04:52:20 +08:00
}
variable "ssh_user_gfs" {
description = "used to fill out tags for ansible inventory"
2018-01-05 19:09:04 +08:00
default = "ubuntu"
}
variable "flavor_bastion" {
description = "Use 'openstack flavor list' command to see what your OpenStack instance uses for IDs"
2018-01-05 19:09:04 +08:00
default = 3
}
2016-06-06 04:52:20 +08:00
variable "flavor_k8s_master" {
description = "Use 'openstack flavor list' command to see what your OpenStack instance uses for IDs"
2018-01-05 19:09:04 +08:00
default = 3
2016-06-06 04:52:20 +08:00
}
variable "flavor_k8s_node" {
description = "Use 'openstack flavor list' command to see what your OpenStack instance uses for IDs"
2018-01-05 19:09:04 +08:00
default = 3
2016-06-06 04:52:20 +08:00
}
variable "flavor_etcd" {
description = "Use 'openstack flavor list' command to see what your OpenStack instance uses for IDs"
2018-01-05 19:09:04 +08:00
default = 3
}
variable "flavor_gfs_node" {
description = "Use 'openstack flavor list' command to see what your OpenStack instance uses for IDs"
2018-01-05 19:09:04 +08:00
default = 3
}
2016-06-06 04:52:20 +08:00
variable "network_name" {
description = "name of the internal network to use"
2018-01-05 19:09:04 +08:00
default = "internal"
2016-06-06 04:52:20 +08:00
}
variable "network_dns_domain" {
description = "dns_domain for the internal network"
type = string
default = null
}
variable "use_neutron" {
description = "Use neutron"
default = 1
}
2018-06-15 01:31:04 +08:00
variable "subnet_cidr" {
description = "Subnet CIDR block."
type = string
default = "10.0.0.0/24"
2018-06-15 01:31:04 +08:00
}
2018-01-05 19:09:04 +08:00
variable "dns_nameservers" {
description = "An array of DNS name server names used by hosts in this subnet."
Fix terraform0.13 errors (#7077) * [terraform/aws] Fix Terraform >=0.13 warnings Terraform >=0.13 gives the following warning: ``` Warning: Interpolation-only expressions are deprecated ``` The fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings. * [terraform/openstack] Fixes for Terraform >=0.13 Terraform >=0.13 gives the following error: ``` Error: Failed to install providers Could not find required providers, but found possible alternatives: hashicorp/openstack -> terraform-provider-openstack/openstack ``` This patch fixes these errors. This fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings for Terraform 0.13.5 and Terraform 0.14.3. Unfortunately, 0.12.x gives a harmless warning, but with 0.14.3 out the door, I guess we need to move on. * [terraform/packet] Fixes for Terraform >=0.13 This fix was tested as follows: ``` export PACKET_AUTH_TOKEN=blah-blah rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` Errors are gone, but warnings still remain. It is impossible to please all three versions of Terraform. * Add tests for Terraform >=0.13
2020-12-23 21:08:26 +08:00
type = list(string)
2018-01-05 19:09:04 +08:00
default = []
}
variable "k8s_master_fips" {
description = "specific pre-existing floating IPs to use for master nodes"
type = list(string)
default = []
}
2016-06-06 04:52:20 +08:00
variable "floatingip_pool" {
description = "name of the floating ip pool to use"
2018-01-05 19:09:04 +08:00
default = "external"
2016-06-06 04:52:20 +08:00
}
variable "wait_for_floatingip" {
description = "Terraform will poll the instance until the floating IP has been associated."
default = "false"
}
variable "external_net" {
description = "uuid of the external/public network"
}
variable "supplementary_master_groups" {
description = "supplementary kubespray ansible groups for masters, such kube_node"
default = ""
}
variable "supplementary_node_groups" {
description = "supplementary kubespray ansible groups for worker nodes, such as kube_ingress"
default = ""
}
variable "bastion_allowed_remote_ips" {
description = "An array of CIDRs allowed to SSH to hosts"
type = list(string)
default = ["0.0.0.0/0"]
}
variable "master_allowed_remote_ips" {
description = "An array of CIDRs allowed to access API of masters"
type = list(string)
default = ["0.0.0.0/0"]
}
variable "k8s_allowed_remote_ips" {
description = "An array of CIDRs allowed to SSH to hosts"
type = list(string)
default = []
}
variable "k8s_allowed_egress_ips" {
description = "An array of CIDRs allowed for egress traffic"
type = list(string)
default = ["0.0.0.0/0"]
}
variable "master_allowed_ports" {
Fix terraform0.13 errors (#7077) * [terraform/aws] Fix Terraform >=0.13 warnings Terraform >=0.13 gives the following warning: ``` Warning: Interpolation-only expressions are deprecated ``` The fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings. * [terraform/openstack] Fixes for Terraform >=0.13 Terraform >=0.13 gives the following error: ``` Error: Failed to install providers Could not find required providers, but found possible alternatives: hashicorp/openstack -> terraform-provider-openstack/openstack ``` This patch fixes these errors. This fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings for Terraform 0.13.5 and Terraform 0.14.3. Unfortunately, 0.12.x gives a harmless warning, but with 0.14.3 out the door, I guess we need to move on. * [terraform/packet] Fixes for Terraform >=0.13 This fix was tested as follows: ``` export PACKET_AUTH_TOKEN=blah-blah rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` Errors are gone, but warnings still remain. It is impossible to please all three versions of Terraform. * Add tests for Terraform >=0.13
2020-12-23 21:08:26 +08:00
type = list(any)
default = []
}
variable "worker_allowed_ports" {
Fix terraform0.13 errors (#7077) * [terraform/aws] Fix Terraform >=0.13 warnings Terraform >=0.13 gives the following warning: ``` Warning: Interpolation-only expressions are deprecated ``` The fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings. * [terraform/openstack] Fixes for Terraform >=0.13 Terraform >=0.13 gives the following error: ``` Error: Failed to install providers Could not find required providers, but found possible alternatives: hashicorp/openstack -> terraform-provider-openstack/openstack ``` This patch fixes these errors. This fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings for Terraform 0.13.5 and Terraform 0.14.3. Unfortunately, 0.12.x gives a harmless warning, but with 0.14.3 out the door, I guess we need to move on. * [terraform/packet] Fixes for Terraform >=0.13 This fix was tested as follows: ``` export PACKET_AUTH_TOKEN=blah-blah rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` Errors are gone, but warnings still remain. It is impossible to please all three versions of Terraform. * Add tests for Terraform >=0.13
2020-12-23 21:08:26 +08:00
type = list(any)
default = [
{
"protocol" = "tcp"
"port_range_min" = 30000
"port_range_max" = 32767
"remote_ip_prefix" = "0.0.0.0/0"
},
]
}
variable "use_access_ip" {
default = 1
}
variable "use_server_groups" {
default = false
}
variable "router_id" {
description = "uuid of an externally defined router to use"
default = null
}
variable "router_internal_port_id" {
description = "uuid of the port connection our router to our network"
default = null
}
variable "k8s_nodes" {
default = {}
}
variable "extra_sec_groups" {
default = false
}
variable "extra_sec_groups_name" {
default = "custom"
}
variable "image_uuid" {
description = "uuid of image inside openstack to use"
default = ""
}
variable "image_gfs_uuid" {
description = "uuid of image to be used on gluster fs nodes. If empty defaults to image_uuid"
default = ""
}
variable "image_master" {
description = "uuid of image inside openstack to use"
default = ""
}
variable "image_master_uuid" {
description = "uuid of image to be used on master nodes. If empty defaults to image_uuid"
default = ""
}