Skip to content

Latest commit

 

History

History
93 lines (77 loc) · 11.3 KB

File metadata and controls

93 lines (77 loc) · 11.3 KB

IaaS Cluster Deployment

This Terraform code is explained in the Deploy a Cluster tutorial.

This Terraform code has three 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

You can enable as many of the providers as you want. You just need to ensure all provider's required values are specified.

To get started, open up the file terraform.tfvars. Toggle the provider variable mentioned in the table and start providing values for the respective cloud provider. Make sure you specify a value to your cloud provider variables and replace all values containing the string REPLACE ME.

Requirements

Name Version
terraform >= 1.5
spectrocloud >= 0.13.1
tls 4.0.4

Providers

Name Version
spectrocloud 0.13.2
tls 4.0.4

Modules

No modules.

Resources

Name Type
spectrocloud_cluster_aws.aws-cluster resource
spectrocloud_cluster_azure.azure-cluster resource
spectrocloud_cluster_gcp.gcp-cluster resource
spectrocloud_cluster_profile.aws-profile resource
spectrocloud_cluster_profile.azure-profile resource
spectrocloud_cluster_profile.gcp-profile resource
tls_private_key.tutorial_ssh_key resource
spectrocloud_cloudaccount_aws.account data source
spectrocloud_cloudaccount_azure.account data source
spectrocloud_cloudaccount_gcp.account data source
spectrocloud_pack.aws_cni data source
spectrocloud_pack.aws_csi data source
spectrocloud_pack.aws_k8s data source
spectrocloud_pack.aws_ubuntu data source
spectrocloud_pack.azure_cni data source
spectrocloud_pack.azure_csi data source
spectrocloud_pack.azure_k8s data source
spectrocloud_pack.azure_ubuntu data source
spectrocloud_pack.gcp_cni data source
spectrocloud_pack.gcp_csi data source
spectrocloud_pack.gcp_k8s data source
spectrocloud_pack.gcp_ubuntu data source
spectrocloud_registry.public_registry data source

Inputs

Name Description Type Default Required
aws-cloud-account-name The name of your AWS account as assigned in Palette string "" no
aws-key-pair-name The name of the AWS key pair to use for SSH access to the cluster. Refer to EC2 Key Pairs to learn more. string "" no
aws-region AWS region string "us-east-1" no
aws_control_plane_nodes AWS control plane nodes configuration.
object({
count = string
control_plane = bool
instance_type = string
disk_size_gb = string
availability_zones = list(string)
})
{
"availability_zones": [
"us-east-1a"
],
"control_plane": true,
"count": "1",
"disk_size_gb": "60",
"instance_type": "m4.2xlarge"
}
no
aws_worker_nodes AWS worker nodes configuration.
object({
count = string
control_plane = bool
instance_type = string
disk_size_gb = string
availability_zones = list(string)
})
{
"availability_zones": [
"us-east-1a"
],
"control_plane": false,
"count": "1",
"disk_size_gb": "60",
"instance_type": "m4.2xlarge"
}
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({
count = string
control_plane = bool
instance_type = string
disk_size_gb = string
azs = list(string)
is_system_node_pool = bool
})
{
"azs": [
"1"
],
"control_plane": true,
"count": "1",
"disk_size_gb": "60",
"instance_type": "Standard_A8_v2",
"is_system_node_pool": false
}
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({
count = string
control_plane = bool
instance_type = string
disk_size_gb = string
azs = list(string)
is_system_node_pool = bool
})
{
"azs": [
"1"
],
"control_plane": false,
"count": "1",
"disk_size_gb": "60",
"instance_type": "Standard_A8_v2",
"is_system_node_pool": false
}
no
deploy-aws A flag for enabling a deployment on AWS bool n/a yes
deploy-azure A flag for enabling a deployment on Azure bool n/a yes
deploy-gcp A flag for enabling a deployment on GCP bool 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({
count = string
control_plane = bool
instance_type = string
disk_size_gb = string
availability_zones = list(string)
})
{
"availability_zones": [
"us-central1-a"
],
"control_plane": true,
"count": "1",
"disk_size_gb": "60",
"instance_type": "n1-standard-4"
}
no
gcp_project_name The name of your GCP project string "" no
gcp_worker_nodes GCP worker nodes configuration.
object({
count = string
control_plane = bool
instance_type = string
disk_size_gb = string
availability_zones = list(string)
})
{
"availability_zones": [
"us-central1-a"
],
"control_plane": false,
"count": "1",
"disk_size_gb": "60",
"instance_type": "n1-standard-4"
}
no
tags The default tags to apply to Palette resources list(string)
[
"spectro-cloud-education",
"app:hello-universe",
"repository:spectrocloud:tutorials",
"terraform_managed:true",
"tutorial:iaas-cluster-deployment-tf"
]
no

Outputs

Name Description
Advisory n/a