This folder contains the demo code for the Getting Started Cluster Management with Terraform tutorials.
The Terraform code has four main toggle variables that you can use to deploy to one of the following cloud providers.
Variable | Provider | Description | Default |
---|---|---|---|
deploy-aws |
AWS | Enable to deploy a cluster to AWS. | false |
deploy-azure |
GCP | Enable to deploy a cluster to Azure. | false |
deploy-gcp |
Azure | Enable to deploy a cluster to GCP. | false |
deploy-vmware |
VMware vSphere | Enable to deploy a cluster to VMware vSphere. | false |
You can enable as many providers as you want, just make sure to specify all required values for each provider.
To get started, open the terraform.tfvars file. Toggle the provider variable as specified in the table and provide values to your cloud provider variables, replacing all instances of the string REPLACE ME
.
Name | Version |
---|---|
terraform | >= 1.9 |
local | 2.4.1 |
spectrocloud | >= 0.20.6 |
tls | 4.0.4 |
vsphere | >= 2.6.1 |
Name | Version |
---|---|
local | 2.4.1 |
spectrocloud | 0.20.6 |
tls | 4.0.4 |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
app_namespace | The namespace in which the application will be deployed. | string |
n/a | yes |
app_port | The cluster port number on which the service will listen for incoming traffic. | number |
n/a | yes |
auth_token | The base64 encoded auth token for the API connection. | string |
n/a | yes |
aws-cloud-account-name | The name of your AWS account as assigned in Palette. | string |
n/a | yes |
aws-key-pair-name | The name of the AWS key pair to use for SSH access to the cluster. | string |
n/a | yes |
aws-region | AWS region | string |
"us-east-1" |
no |
aws_control_plane_nodes | AWS control plane nodes configuration. | object({ |
{ |
no |
aws_worker_nodes | AWS worker nodes configuration. | object({ |
{ |
no |
azure-cloud-account-name | The name of your Azure account as assigned in Palette. | string |
"" |
no |
azure-region | Azure region. | string |
"eastus" |
no |
azure-use-azs | A flag for configuring whether to use Azure Availability Zones. Check if your Azure region supports availability zones by reviewing the Azure Regions and Availability Zones resource. | bool |
n/a | yes |
azure_control_plane_nodes | Azure control plane nodes configuration. | object({ |
{ |
no |
azure_resource_group | Azure resource group. | string |
"" |
no |
azure_subscription_id | Azure subscription ID. | string |
"" |
no |
azure_worker_nodes | Azure worker nodes configuration. | object({ |
{ |
no |
datacenter_name | The name of the datacenter in vSphere. | string |
n/a | yes |
datastore_name | The name of the vSphere datastore. | string |
n/a | yes |
db_password | The base64 encoded database password to connect to the API database. | string |
n/a | yes |
deploy-aws | A flag for enabling a deployment on AWS. | bool |
n/a | yes |
deploy-aws-kubecost | A flag for enabling a deployment on AWS with Kubecost. | bool |
n/a | yes |
deploy-azure | A flag for enabling a deployment on Azure. | bool |
n/a | yes |
deploy-azure-kubecost | A flag for enabling a deployment on Azure with Kubecost. | bool |
n/a | yes |
deploy-gcp | A flag for enabling a deployment on GCP. | bool |
n/a | yes |
deploy-gcp-kubecost | A flag for enabling a deployment on GCP with Kubecost. | bool |
n/a | yes |
deploy-vmware | A flag for enabling a deployment on VMware. | bool |
n/a | yes |
deploy-vmware-kubecost | A flag for enabling a deployment on VMware with Kubecost. | bool |
n/a | yes |
deploy-vmware-static | A flag for enabling a deployment on VMware using static IP placement. | bool |
n/a | yes |
folder_name | The name of the folder in vSphere. | string |
n/a | yes |
gcp-cloud-account-name | The name of your GCP account as assigned in Palette. | string |
"" |
no |
gcp-region | GCP region | string |
"us-central1" |
no |
gcp_control_plane_nodes | GCP control plane nodes configuration. | object({ |
{ |
no |
gcp_project_name | The name of your GCP project. | string |
"" |
no |
gcp_worker_nodes | GCP worker nodes configuration. | object({ |
{ |
no |
ip_range_end | The last IP address of your PCG IP pool range. | string |
n/a | yes |
ip_range_start | The first IP address of your PCG IP pool range. | string |
n/a | yes |
metallb_ip | The IP address range for your MetalLB load balancer. | string |
n/a | yes |
nameserver_addr | A comma-separated list of DNS nameserver IP addresses of your network. | set(string) |
n/a | yes |
network_gateway | The IP address of the vSphere network gateway. | string |
n/a | yes |
network_name | The name of the vSphere network. | string |
n/a | yes |
network_prefix | The prefix of your vSphere network. Valid values are network CIDR subnet masks from the range 0-32. Example: 18. | number |
n/a | yes |
palette-project | The name of your project in Palette. | string |
n/a | yes |
pcg_name | The name of the PCG that will be used to deploy the cluster. | string |
n/a | yes |
replicas_number | The number of pods to be created. | number |
n/a | yes |
resource_pool_name | The name of the vSphere resource pool. | string |
n/a | yes |
search_domain | The name of network search domain. | string |
n/a | yes |
ssh_key | The path to the public key that will be added to the cluster nodes. If not provided, a new key pair will be generated. | string |
n/a | yes |
ssh_key_private | The path to the private key that will be used to access the cluster nodes. If not provided, a new key pair will be generated. | string |
n/a | yes |
tags | The default tags to apply to Palette resources. | list(string) |
[ |
no |
vsphere_cluster | The name of your vSphere cluster. | string |
n/a | yes |
Name | Description |
---|---|
Advisory | n/a |
ssh_connection_command | Command to use the generated private SSH key to access the nodes. |
ssh_connection_command_user | Command to use the user's private SSH key to access the nodes. |
ssh_key_location | Location of the generated private SSH key file. |
ssh_public_key_location | Location of the generated public SSH key file. |