Create Kubernetes clusters on any of the supported cloud environments: Azure, AWS, GCP, IBM Cloud
Make sure the .terraform
directory has been initialized
terraform init
A cloud provider must be specified:
terraform apply -var 'cloud_provider=aws'
Or a list of providers:
terraform apply -var 'cloud_providers=["azure", "aws"]'
Make sure to also set the corresponding credentials
Provider | Variable | Description |
---|---|---|
"azure" |
azure_subscription_id |
Azure Subscription ID |
"azure" |
azure_sp_path |
Azure Service Principal JSON file path |
"aws" |
aws_profile |
AWS profile name as set in the shared configuration and credentials files |
"aws" |
aws_config_path |
AWS shared configuration file path |
"aws" |
aws_creds_path |
AWS shared credentials file path |
"gcp" |
gcp_adc_path |
GCP Application Default Credentials JSON file path |
"ibm-openshift" |
ibmc_key_path |
IBM Cloud API Key JSON file path |
CPU Architecture can be set to either "x86"
or "arm64"
terraform apply -var 'cloud_provider=aws' -var 'cpu_arch=arm64'
Note: The "ibm-openshift"
provider does not support ARM architecture. If set, any IBM OpenShift clusters will be destroyed
The number of VMs running as Kubernetes nodes can be specified as
terraform apply -var 'cloud_provider=aws' -var 'node_count=2'
Resurface can be deployed with cert-manager, or by itself
terraform apply -var 'cloud_provider=aws' -var 'helm_tls_enabled=true'
Both multinode and iceberg modes can be enabled/disabled
terraform apply -var 'cloud_provider=aws' -var 'helm_multinode_enabled=true' -var 'helm_iceberg_enabled=true'
Helm release installation can be skipped entirely (only create Kubernetes clusters)
terraform apply -var 'cloud_provider=aws' -var 'skip_helm=true'
For more variables, please take a look at the reference
-
aks
: AKS cluster and minimum required infrastructureazurerm_resource_group
: Azure Resource Groupazurerm_kubernetes_cluster
: AKS clusterazurerm_kubernetes_cluster_node_pool
: AKS node poollocal_file
: AKS cluster kubeconfig file
-
eks
: EKS cluster and minimum required infrastructureaws_iam_role
: EKS Cluster Role, EKS Node Roleaws_iam_role_policy_attachment
: Policies for each roleaws_vpc
: AWS VPCaws_subnet
: 3 public AWS Subnetsaws_internet_gateway
: AWS Internet Gatewayaws_route_table
: AWS Route Tableaws_route_table_association
: Associate Subnets with Internet Gatewayaws_eks_cluster
: AWS EKS clusteraws_eks_node_group
: AWS EKS node groupaws_eks_addon
: VPC CNI, Core DNS, EBS CSIlocal_file
: EKS cluster kubeconfig file
-
gke
: GKE cluster and minimum required infrastructuregoogle_compute_network
: GCP VPCgoogle_compute_subnetwork
: GCP Subnetgoogle_container_cluster
: GKE clustergoogle_container_node_pool
: GKE node pool
-
ibm-oc
: IBM OpenShift cluster and minimum required infrastructureibm_is_vpc
: IBM Cloud VPCibm_is_public_gateway
:IBM Cloud Public Gatewayibm_is_subnet
: IBM Cloud Subnetibm_resource_instance
: IBM Cloud COS instanceibm_container_vpc_cluster
: IBM OpenShift Cluster
-
helm
: helm releaseshelm_release
: Resurface, Cert-manager
Variable | Description | Type | Default value | Required |
---|---|---|---|---|
cloud_provider |
Cloud provider to deploy Kubernetes cluster | string |
"" |
No |
cloud_providers |
List of cloud providers to deploy Kubernetes clusters | list(string) |
[] |
No |
cpu_arch |
CPU architecture for node pool VMs | string |
"x86" |
No |
node_count |
Number of Kubernetes nodes | number |
1 |
No |
Variable | Description | Type | Default value | Required |
---|---|---|---|---|
azure_subscription_id |
Azure Subscription ID | string |
Yes | |
azure_sp_path |
Azure Service Principal JSON file path | string |
Yes | |
aws_profile |
AWS profile name as set in the shared configuration and credentials files | string |
"default" |
No |
aws_config_path |
AWS shared configuration file path | string |
Yes | |
aws_creds_path |
AWS shared credentials file path | string |
Yes | |
gcp_adc_path |
GCP Application Default Credentials JSON file path | string |
Yes | |
ibmc_key_path |
IBM Cloud API Key JSON file path | string |
Yes |
Variable | Description | Type | Default value | Required |
---|---|---|---|---|
azure_resource_group |
Azure resource group | string |
Yes | |
gcp_project_id |
GCP Project ID | string |
Yes | |
ibmc_resource_group |
IBM Cloud resource group | string |
Yes |
Variable | Description | Type | Default value | Required |
---|---|---|---|---|
azure_region |
Azure region | string |
"East US 2" |
No |
azure_use_existing_rg |
Set to true to use existing Resource Group | bool |
false |
No |
aws_region |
AWS region | string |
"us-east-1" |
No |
aws_zones |
AWS availability zones | list(string) |
["us-east-1a", "us-east-1b", "us-east-1c"] |
No |
gcp_region |
GCP region | string |
"us-central1" |
No |
gcp_zone |
GCP zone | string |
"us-central1-a" |
No |
ibmc_region |
IBM Cloud region | string |
"us-south" |
No |
ibmc_zone |
IBM Cloud zone | string |
"us-south-1" |
No |
Variable | Description | Type | Default value | Required |
---|---|---|---|---|
aks_kubeconfig_dir |
Path for the local AKS cluster kubeconfig | string |
"." |
No |
eks_kubeconfig_dir |
Path for the local EKS cluster kubeconfig | string |
"." |
No |
gke_kubeconfig_dir |
Path for the local GKE cluster kubeconfig | string |
"." |
No |
ibm_openshift_kubeconfig_dir |
Path for the local IBM OpenShift cluster kubeconfig | string |
"." |
No |
Variable | Description | Type | Default value | Required |
---|---|---|---|---|
helm_use_local_chart |
Set to true if using a helm local chart | bool |
false |
No |
helm_local_chart_path |
Helm local chart directory path | string |
"." |
No |
helm_timeout |
Time in seconds to wait for any individual kubernetes operation (like jobs or hooks) | number |
300 |
No |
skip_helm |
Set to true to skip all helm installs | bool |
false |
No |
helm_multinode_enabled |
Set to true to enable multinode mode | bool |
false |
No |
helm_multinode_worker_count |
Number of worker nodes | number |
1 |
No |
helm_iceberg_enabled |
Set to true to enable iceberg mode | bool |
false |
No |
helm_tls_enabled |
Set to true to install cert-manager chart | bool |
false |
No |
helm_tls_autoissue_email |
Let's encrypt notifications will be sent to this address | string |
"[email protected]" |
No |
helm_auth_enabled |
Set to true to enable basic auth | bool |
false |
No |
helm_cert_manager_chart_version |
Cert-manager chart version | string |
"v1.14.5" |
No |
helm_resurface_chart_version |
Resurface chart version | string |
"" |
No |
helm_resurface_app_version |
Resurface chart version | string |
"" |
No |
Variable | Description | Type | Default value | Required |
---|---|---|---|---|
helm_tls_host_azure |
Host included in the TLS certificate for the Resurface AKS service | string |
"" |
No |
helm_tls_host_aws |
Host included in the TLS certificate for the Resurface EKS service | string |
"" |
No |
helm_tls_host_gcp |
Host included in the TLS certificate for the Resurface GKE service | string |
"" |
No |
Variable | Description | Type | Default value | Required |
---|---|---|---|---|
prefix |
Prefix to use with all resources | string |
"qa-" |
No |