Skip to content

Commit b757f4c

Browse files
committed
Added cluster_timezone variable and updated main.tf and examples to support timezone configuration.
1 parent 079dad5 commit b757f4c

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ module "edge-demo-module-template" {
5050
# Overlay CIDR Range
5151
# overlay_cidr_range = "100.64.128.0/18"
5252
53+
54+
# Cluster Timezone
55+
cluster_timezone = "America/New_York"
5356
# Node Pools for Cluster
5457
machine_pools = [
5558
# Control Plane Node Pool
@@ -167,6 +170,9 @@ module "edge-demo-module-no-template" {
167170
# Overlay CIDR Range
168171
# overlay_cidr_range = "100.64.128.0/18"
169172
173+
# Cluster Timezone
174+
cluster_timezone = "America/New_York"
175+
170176
# Node Pools for Cluster
171177
machine_pools = [
172178
# Control Plane Node Pool
@@ -273,7 +279,7 @@ module "edge-demo-module-no-template" {
273279

274280
| Name | Version |
275281
|------|---------|
276-
| <a name="provider_spectrocloud"></a> [spectrocloud](#provider\_spectrocloud) | >= 0.27.0 |
282+
| <a name="provider_spectrocloud"></a> [spectrocloud](#provider\_spectrocloud) | 0.27.2 |
277283

278284
## Modules
279285

@@ -292,16 +298,17 @@ No modules.
292298

293299
| Name | Description | Type | Default | Required |
294300
|------|-------------|------|---------|:--------:|
295-
| <a name="input_cluster_profiles"></a> [cluster\_profiles](#input\_cluster\_profiles) | Values for the profile(s) to be used for cluster creation. For `context` a value of [project tenant system] is expected. | <pre>list(object({<br> name = string<br> tag = optional(string)<br> context = string # project tenant system<br> packs = optional(list(object({<br> name = string<br> tag = string<br> values = optional(string)<br> manifest = optional(list(object({<br> name = string<br> tag = string<br> content = string<br> })))<br> })))<br> }))</pre> | `[]` | no |
301+
| <a name="input_cluster_profiles"></a> [cluster\_profiles](#input\_cluster\_profiles) | Values for the profile(s) to be used for cluster creation. For `context` a value of [project tenant system] is expected. | <pre>list(object({<br/> name = string<br/> tag = optional(string)<br/> context = string # project tenant system<br/> packs = optional(list(object({<br/> name = string<br/> tag = string<br/> values = optional(string)<br/> manifest = optional(list(object({<br/> name = string<br/> tag = string<br/> content = string<br/> })))<br/> })))<br/> }))</pre> | `[]` | no |
296302
| <a name="input_cluster_tags"></a> [cluster\_tags](#input\_cluster\_tags) | Tags to be added to the profile. key:value | `list(string)` | `[]` | no |
297-
| <a name="input_cluster_template"></a> [cluster\_template](#input\_cluster\_template) | Optional cluster template configuration. Provide the template name and context, and optionally cluster profiles with variables. IDs are looked up automatically. | <pre>object({<br> name = string<br> context = optional(string, "project") # project or tenant<br> cluster_profile = optional(list(object({<br> name = string<br> tag = optional(string)<br> context = optional(string, "project") # project, tenant, or system<br> variables = optional(map(string))<br> })))<br> })</pre> | `null` | no |
303+
| <a name="input_cluster_template"></a> [cluster\_template](#input\_cluster\_template) | Optional cluster template configuration. Provide the template name and context, and optionally cluster profiles with variables. IDs are looked up automatically. | <pre>object({<br/> name = string<br/> context = optional(string, "project") # project or tenant<br/> cluster_profile = optional(list(object({<br/> name = string<br/> tag = optional(string)<br/> context = optional(string, "project") # project, tenant, or system<br/> variables = optional(map(string))<br/> })))<br/> })</pre> | `null` | no |
304+
| <a name="input_cluster_timezone"></a> [cluster\_timezone](#input\_cluster\_timezone) | Timezone for the cluster. | `string` | `""` | no |
298305
| <a name="input_cluster_vip"></a> [cluster\_vip](#input\_cluster\_vip) | IP Address for Cluster VIP for HA. Must be unused on on the same layer 2 segment as the node IPs. | `string` | `""` | no |
299-
| <a name="input_location"></a> [location](#input\_location) | Optional - If used Latitude and Longitude represent the coordinates of the location you wish to assign to the cluster. https://www.latlong.net/ is one tool that can be used to find this. | <pre>object({<br> latitude = optional(number)<br> longitude = optional(number)<br> })</pre> | <pre>{<br> "latitude": 0,<br> "longitude": 0<br>}</pre> | no |
300-
| <a name="input_machine_pools"></a> [machine\_pools](#input\_machine\_pools) | Values for the attributes of the Node Pools. 'edge\_host\_tags' is used to lookup the Edge Host already registered with Palette. | <pre>list(object({<br> name = string<br> additional_labels = optional(map(string))<br> control_plane = optional(bool)<br> control_plane_as_worker = optional(bool)<br> taints = optional(list(object({<br> effect = string<br> key = string<br> value = string<br> })))<br> edge_host = list(object({<br> host_uid = string<br> host_name = optional(string)<br> nic_name = optional(string)<br> static_ip = optional(string)<br> subnet_mask = optional(string)<br> default_gateway = optional(string)<br> dns_servers = optional(list(string))<br> two_node_role = optional(string)<br> }))<br> }))</pre> | n/a | yes |
306+
| <a name="input_location"></a> [location](#input\_location) | Optional - If used Latitude and Longitude represent the coordinates of the location you wish to assign to the cluster. https://www.latlong.net/ is one tool that can be used to find this. | <pre>object({<br/> latitude = optional(number)<br/> longitude = optional(number)<br/> })</pre> | <pre>{<br/> "latitude": 0,<br/> "longitude": 0<br/>}</pre> | no |
307+
| <a name="input_machine_pools"></a> [machine\_pools](#input\_machine\_pools) | Values for the attributes of the Node Pools. 'edge\_host\_tags' is used to lookup the Edge Host already registered with Palette. | <pre>list(object({<br/> name = string<br/> additional_labels = optional(map(string))<br/> control_plane = optional(bool)<br/> control_plane_as_worker = optional(bool)<br/> taints = optional(list(object({<br/> effect = string<br/> key = string<br/> value = string<br/> })))<br/> edge_host = list(object({<br/> host_uid = string<br/> host_name = optional(string)<br/> nic_name = optional(string)<br/> static_ip = optional(string)<br/> subnet_mask = optional(string)<br/> default_gateway = optional(string)<br/> dns_servers = optional(list(string))<br/> two_node_role = optional(string)<br/> }))<br/> }))</pre> | n/a | yes |
301308
| <a name="input_name"></a> [name](#input\_name) | Name of the cluster to be created. | `string` | n/a | yes |
302309
| <a name="input_ntp_servers"></a> [ntp\_servers](#input\_ntp\_servers) | n/a | `list(string)` | `[]` | no |
303310
| <a name="input_overlay_cidr_range"></a> [overlay\_cidr\_range](#input\_overlay\_cidr\_range) | CIDR range for the overlay network. | `string` | `""` | no |
304-
| <a name="input_rbac_bindings"></a> [rbac\_bindings](#input\_rbac\_bindings) | RBAC Bindings to be added to the cluster | <pre>list(object({<br> rbac_type = string<br> namespace = optional(string)<br> rbac_role = optional(map(string))<br> subjects = optional(list(object({<br> name = string<br> rbac_type = string<br> namespace = optional(string)<br> })))<br> }))</pre> | `[]` | no |
311+
| <a name="input_rbac_bindings"></a> [rbac\_bindings](#input\_rbac\_bindings) | RBAC Bindings to be added to the cluster | <pre>list(object({<br/> rbac_type = string<br/> namespace = optional(string)<br/> rbac_role = optional(map(string))<br/> subjects = optional(list(object({<br/> name = string<br/> rbac_type = string<br/> namespace = optional(string)<br/> })))<br/> }))</pre> | `[]` | no |
305312
| <a name="input_skip_wait_for_completion"></a> [skip\_wait\_for\_completion](#input\_skip\_wait\_for\_completion) | n/a | `bool` | `true` | no |
306313
| <a name="input_ssh_keys"></a> [ssh\_keys](#input\_ssh\_keys) | n/a | `list(string)` | `[]` | no |
307314

examples/cluster.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ module "edge-demo-module-no-template" {
140140
# Overlay CIDR Range
141141
# overlay_cidr_range = "100.64.128.0/18"
142142

143+
# Cluster Timezone
144+
cluster_timezone = "America/New_York"
145+
143146
# Node Pools for Cluster
144147
machine_pools = [
145148
# Control Plane Node Pool

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,5 @@ resource "spectrocloud_cluster_edge_native" "this" {
132132
error_message = "You must provide either 'cluster_profiles' or 'cluster_template', but not both."
133133
}
134134
}
135-
135+
cluster_timezone = var.cluster_timezone != "" ? var.cluster_timezone : null
136136
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,10 @@ variable "cluster_template" {
132132
})))
133133
})
134134
default = null
135+
}
136+
137+
variable "cluster_timezone" {
138+
type = string
139+
description = "Timezone for the cluster."
140+
default = ""
135141
}

0 commit comments

Comments
 (0)