Skip to content

Commit 0426fed

Browse files
committed
oke variables shifted
Signed-off-by: junior <junior@users.noreply.github.com>
1 parent 45090b4 commit 0426fed

File tree

1 file changed

+79
-54
lines changed

1 file changed

+79
-54
lines changed

modules/oke/variables.tf

Lines changed: 79 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,28 @@ variable "cluster_endpoint_visibility" {
6666
}
6767

6868
## OKE Encryption details
69-
variable "use_encryption_from_oci_vault" {
70-
default = false
71-
description = "By default, Oracle manages the keys that encrypts Kubernetes Secrets at Rest in Etcd, but you can choose a key from a vault that you have access to, if you want greater control over the key's lifecycle and how it's used"
72-
}
73-
variable "create_new_encryption_key" {
74-
default = false
75-
description = "Creates new vault and key on OCI Vault/Key Management/KMS and assign to boot volume of the worker nodes"
69+
variable "oci_vault_key_id_oke_secrets" {
70+
default = null
71+
description = "OCI Vault OCID to encrypt OKE secrets. If not provided, the secrets will be encrypted with the default key"
7672
}
77-
variable "existent_encryption_key_id" {
78-
default = ""
79-
description = "Use an existent master encryption key to encrypt boot volume and object storage bucket. NOTE: If the key resides in a different compartment or in a different tenancy, make sure you have the proper policies to access, or the provision of the worker nodes will fail"
73+
variable "oci_vault_key_id_oke_image_policy" {
74+
default = null
75+
description = "OCI Vault OCID for the Image Policy"
8076
}
77+
78+
# variable "use_encryption_from_oci_vault" {
79+
# default = false
80+
# description = "By default, Oracle manages the keys that encrypts Kubernetes Secrets at Rest in Etcd, but you can choose a key from a vault that you have access to, if you want greater control over the key's lifecycle and how it's used"
81+
# description = "If true, the Kubernetes cluster will use Customer Managed Keys (CMK) to encrypt Kubernetes secrets. If false, the Kubernetes cluster will use Oracle Managed Keys (OMK) to encrypt Kubernetes secrets"
82+
# }
83+
# variable "create_new_encryption_key" {
84+
# default = false
85+
# description = "Creates new vault and key on OCI Vault/Key Management/KMS and assign to boot volume of the worker nodes"
86+
# }
87+
# variable "existent_encryption_key_id" {
88+
# default = ""
89+
# description = "Use an existent master encryption key to encrypt boot volume and object storage bucket. NOTE: If the key resides in a different compartment or in a different tenancy, make sure you have the proper policies to access, or the provision of the worker nodes will fail"
90+
# }
8191
variable "create_vault_policies_for_group" {
8292
default = false
8393
description = "Creates policies to allow the user applying the stack to manage vault and keys. If you are on the Administrators group or already have the policies for a compartment, this policy is not needed. If you do not have access to allow the policy, ask your administrator to include it for you"
@@ -105,51 +115,56 @@ variable "cluster_autoscaler_enabled" {
105115
# description = "Nodepool Id of the existent OKE to use with Cluster Autoscaler"
106116
# }
107117

108-
## OKE Node Pool Details
109-
variable "node_pool_name" {
110-
default = "pool1"
111-
description = "Name of the node pool"
112-
}
113118
variable "k8s_version" {
114119
default = "Latest"
115120
description = "Kubernetes version installed on your Control Plane"
116121
}
117-
variable "num_pool_workers" {
118-
default = 3
119-
description = "The number of worker nodes in the node pool. If select Cluster Autoscaler, will assume the minimum number of nodes configured"
120-
}
121-
variable "node_pool_shape" {
122-
default = "VM.Standard.E4.Flex"
123-
description = "A shape is a template that determines the number of OCPUs, amount of memory, and other resources allocated to a newly created instance for the Worker Node"
124-
}
125122

126-
variable "node_pool_node_shape_config_ocpus" {
127-
default = "1" # Only used if flex shape is selected
128-
description = "You can customize the number of OCPUs to a flexible shape"
129-
}
130-
variable "node_pool_node_shape_config_memory_in_gbs" {
131-
default = "16" # Only used if flex shape is selected
132-
description = "You can customize the amount of memory allocated to a flexible shape"
133-
}
134-
variable "node_pool_boot_volume_size_in_gbs" {
135-
default = "50"
136-
description = "Specify a custom boot volume size (in GB)"
137-
}
138-
variable "image_operating_system" {
139-
default = "Oracle Linux"
140-
description = "The OS/image installed on all nodes in the node pool."
141-
}
142-
variable "image_operating_system_version" {
143-
default = "8"
144-
description = "The OS/image version installed on all nodes in the node pool."
145-
}
146-
variable "generate_public_ssh_key" {
147-
default = true
148-
}
149-
variable "public_ssh_key" {
150-
default = ""
151-
description = "In order to access your private nodes with a public SSH key you will need to set up a bastion host (a.k.a. jump box). If using public nodes, bastion is not needed. Left blank to not import keys."
152-
}
123+
## OKE Node Pool Details
124+
# variable "node_pool_name" {
125+
# default = "pool1"
126+
# description = "Name of the node pool"
127+
# }
128+
# variable "k8s_version" {
129+
# default = "Latest"
130+
# description = "Kubernetes version installed on your Control Plane"
131+
# }
132+
# variable "num_pool_workers" {
133+
# default = 3
134+
# description = "The number of worker nodes in the node pool. If select Cluster Autoscaler, will assume the minimum number of nodes configured"
135+
# }
136+
# variable "node_pool_shape" {
137+
# default = "VM.Standard.E4.Flex"
138+
# description = "A shape is a template that determines the number of OCPUs, amount of memory, and other resources allocated to a newly created instance for the Worker Node"
139+
# }
140+
141+
# variable "node_pool_node_shape_config_ocpus" {
142+
# default = "1" # Only used if flex shape is selected
143+
# description = "You can customize the number of OCPUs to a flexible shape"
144+
# }
145+
# variable "node_pool_node_shape_config_memory_in_gbs" {
146+
# default = "16" # Only used if flex shape is selected
147+
# description = "You can customize the amount of memory allocated to a flexible shape"
148+
# }
149+
# variable "node_pool_boot_volume_size_in_gbs" {
150+
# default = "50"
151+
# description = "Specify a custom boot volume size (in GB)"
152+
# }
153+
# variable "image_operating_system" {
154+
# default = "Oracle Linux"
155+
# description = "The OS/image installed on all nodes in the node pool."
156+
# }
157+
# variable "image_operating_system_version" {
158+
# default = "8"
159+
# description = "The OS/image version installed on all nodes in the node pool."
160+
# }
161+
# variable "generate_public_ssh_key" {
162+
# default = true
163+
# }
164+
# variable "public_ssh_key" {
165+
# default = ""
166+
# description = "In order to access your private nodes with a public SSH key you will need to set up a bastion host (a.k.a. jump box). If using public nodes, bastion is not needed. Left blank to not import keys."
167+
# }
153168

154169
# OCI Provider
155170
variable "tenancy_ocid" {}
@@ -207,11 +222,21 @@ locals {
207222
app_name_for_db = regex("[[:alnum:]]{1,10}", var.app_name)
208223
}
209224

225+
# OKE Compartment
226+
locals {
227+
oke_compartment_ocid = var.compartment_ocid
228+
}
229+
230+
# Deployment Details
231+
variable "app_details" {
232+
description = "App Details"
233+
}
234+
210235
# Deployment Tags
211236
locals {
212237
freeform_deployment_tags = {
213-
"DeploymentID" = "${random_string.deploy_id.result}",
214-
"AppName" = "${var.app_name}",
215-
"Environment" = "${var.app_deployment_environment}",
216-
"DeploymentType" = "${var.app_deployment_type}" }
238+
"DeploymentID" = "${var.app_details.app_deployment_id}",
239+
"AppName" = "${var.app_details.app_name}",
240+
"Environment" = "${var.app_details.app_deployment_environment}",
241+
"DeploymentType" = "${var.app_details.app_deployment_type}" }
217242
}

0 commit comments

Comments
 (0)