-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvariables.tf
101 lines (86 loc) · 2.88 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
variable "name" {
default = "free-k8s"
description = "The name to be used for the OKE cluster and compartment during creation."
type = string
}
# OCI Provider parameters
variable "home_region" {
# List of regions: https://docs.cloud.oracle.com/iaas/Content/General/Concepts/regions.htm#ServiceAvailabilityAcrossRegions
description = "The tenancy's home region. Required to perform identity operations."
type = string
}
variable "region" {
# List of regions: https://docs.cloud.oracle.com/iaas/Content/General/Concepts/regions.htm#ServiceAvailabilityAcrossRegions
description = "The OCI region where OKE resources will be created."
type = string
}
variable "tenancy_id" {
description = "The tenancy id of the OCI Cloud Account in which to create the resources."
type = string
}
variable "label_prefix" {
default = "none"
description = "A string that will be prepended to all resources."
type = string
}
# SSH keys
variable "ssh_private_key" {
default = ""
description = "The contents of the private ssh key file, optionally base64-encoded."
sensitive = true
type = string
}
variable "ssh_private_key_path" {
default = "none"
description = "The path to ssh private key."
type = string
}
variable "ssh_public_key" {
default = ""
description = "The contents of the ssh public key."
type = string
}
variable "ssh_public_key_path" {
default = "none"
description = "The path to ssh public key."
type = string
}
# Kubernetes cluster
variable "kubernetes_version" {
default = "v1.24.1"
description = "The version of kubernetes to use when provisioning OKE or to upgrade an existing OKE cluster to."
type = string
}
variable "control_plane_type" {
default = "public"
description = "Whether to allow public or private access to the control plane endpoint"
type = string
validation {
condition = contains(["public", "private"], var.control_plane_type)
error_message = "Accepted values are public, or private."
}
}
variable "control_plane_allowed_cidrs" {
default = []
description = "The list of CIDR blocks from which the control plane can be accessed."
type = list(string)
}
variable "node_pool_size" {
type = number
description = "The size of the node pool. Valid values are 1, 2, or 4."
validation {
condition = contains([1, 2, 4], var.node_pool_size)
error_message = "Accepted values for node_pool_size are 1, 2, or 4."
}
}
variable "node_pool_os_version" {
default = "7.9"
description = "The version of operating system to use for the worker nodes."
type = string
}
# Bastion service
variable "bastion_service_access" {
default = ["0.0.0.0/0"]
description = "A list of CIDR blocks to which ssh access to the bastion service must be restricted."
type = list(string)
}