diff --git a/README.md b/README.md index af611c1..f9879b6 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Additionally, with the "VIP" tag, we enable Kubevip for HA. The Edge Host is no ``` module "edge-demo-module" { source = "spectrocloud/edge/spectrocloud" - version = "1.2.1" + version = "1.3.1" # Store Number/Location name = "demo" # add tags to the cluster (optional) list(strings) @@ -46,6 +46,9 @@ module "edge-demo-module" { # Cluster VIP to be used with KubeVIP cluster_vip = "10.100.100.32" + # Overlay CIDR Range + # overlay_cidr_range = "100.64.128.0/18" + # Node Pools for Cluster machine_pools = [ # Control Plane Node Pool @@ -155,15 +158,14 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [binding\_role](#input\_binding\_role) | Role binding type to be created with the cluster. | `map(string)` | `null` | no | -| [binding\_type](#input\_binding\_type) | Role binding type to be created with the cluster. | `string` | `null` | no | | [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. |
list(object({| n/a | yes | | [cluster\_tags](#input\_cluster\_tags) | Tags to be added to the profile. key:value | `list(string)` | `[]` | no | -| [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` | n/a | yes | +| [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 | | [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. |
name = string
tag = optional(string)
context = string # project tenant system
packs = optional(list(object({
name = string
tag = string
values = optional(string)
manifest = optional(list(object({
name = string
tag = string
content = string
})))
})))
}))
object({|
latitude = optional(number)
longitude = optional(number)
})
{| no | | [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. |
"latitude": 0,
"longitude": 0
}
list(object({| n/a | yes | | [name](#input\_name) | Name of the cluster to be created. | `string` | n/a | yes | | [ntp\_servers](#input\_ntp\_servers) | n/a | `list(string)` | `[]` | no | +| [overlay\_cidr\_range](#input\_overlay\_cidr\_range) | CIDR range for the overlay network. | `string` | `""` | no | | [rbac\_bindings](#input\_rbac\_bindings) | RBAC Bindings to be added to the cluster |
name = string
additional_labels = optional(map(string))
control_plane = optional(bool)
control_plane_as_worker = optional(bool)
taints = optional(list(object({
effect = string
key = string
value = string
})))
edge_host = list(object({
host_uid = string
static_ip = optional(string)
}))
}))
list(object({| `[]` | no | | [skip\_wait\_for\_completion](#input\_skip\_wait\_for\_completion) | n/a | `bool` | `true` | no | | [ssh\_keys](#input\_ssh\_keys) | n/a | `list(string)` | `[]` | no | diff --git a/examples/cluster.tf b/examples/cluster.tf index 8a8fbed..0da48e9 100644 --- a/examples/cluster.tf +++ b/examples/cluster.tf @@ -1,6 +1,6 @@ module "edge-demo-module" { source = "spectrocloud/edge/spectrocloud" - version = "1.2.1" + version = "1.3.1" # Store Number/Location name = "demo" # add tags to the cluster (optional) list(strings) @@ -13,9 +13,12 @@ module "edge-demo-module" { "10.10.10.2" ] - # Cluster VIP to be used with KubeVIP + # Cluster VIP to be used with KubeVIP cluster_vip = "10.100.100.32" + # Overlay CIDR Range + # overlay_cidr_range = "100.64.128.0/18" + # Node Pools for Cluster machine_pools = [ # Control Plane Node Pool diff --git a/examples/variables.tf b/examples/variables.tf index 2eeed5a..8f6b2f6 100644 --- a/examples/variables.tf +++ b/examples/variables.tf @@ -1,4 +1,13 @@ # Spectro Cloud -variable "sc_host" {} -variable "sc_api_key" {} -variable "sc_project_name" {} +variable "sc_host" { + description = "Spectro Cloud API Host" + type = string +} +variable "sc_api_key" { + description = "Spectro Cloud API Key" + type = string +} +variable "sc_project_name" { + description = "Spectro Cloud Project Name" + type = string +} diff --git a/main.tf b/main.tf index fe60d0b..a4f8ad3 100644 --- a/main.tf +++ b/main.tf @@ -11,9 +11,10 @@ resource "spectrocloud_cluster_edge_native" "this" { tags = var.cluster_tags skip_completion = var.skip_wait_for_completion cloud_config { - ssh_keys = var.ssh_keys - vip = var.cluster_vip - ntp_servers = var.ntp_servers + ssh_keys = var.ssh_keys + vip = var.cluster_vip + overlay_cidr_range = var.overlay_cidr_range + ntp_servers = var.ntp_servers } location_config { latitude = var.location.latitude diff --git a/variables.tf b/variables.tf index bd6389d..38cdfa7 100644 --- a/variables.tf +++ b/variables.tf @@ -62,6 +62,12 @@ variable "rbac_bindings" { variable "cluster_vip" { type = string description = "IP Address for Cluster VIP for HA. Must be unused on on the same layer 2 segment as the node IPs." + default = "" +} +variable "overlay_cidr_range" { + type = string + description = "CIDR range for the overlay network." + default = "" } variable "ssh_keys" { type = list(string) @@ -87,14 +93,14 @@ variable "location" { description = "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." } -variable "binding_type" { - type = string - description = "Role binding type to be created with the cluster." - default = null -} +# variable "binding_type" { +# type = string +# description = "Role binding type to be created with the cluster." +# default = null +# } -variable "binding_role" { - type = map(string) - description = "Role binding type to be created with the cluster." - default = null -} \ No newline at end of file +# variable "binding_role" { +# type = map(string) +# description = "Role binding type to be created with the cluster." +# default = null +# } \ No newline at end of file
rbac_type = string
namespace = optional(string)
rbac_role = optional(map(string))
subjects = optional(list(object({
name = string
rbac_type = string
namespace = optional(string)
})))
}))