Skip to content

insight-w3f/terraform-polkadot-azure-k8s-cluster

Repository files navigation

terraform-polkadot-azure-k8s-cluster

open-issues open-pr build-status

Features

This module...

Terraform Versions

For Terraform v0.12.0+

Usage

module "this" {
    source = "github.com/insight-w3f/terraform-polkadot-azure-k8s-cluster"

}

To use with the Terraform Helm provider, you will need to specify the following:

provider "helm" {
  kubernetes {
    host                   = module.cluster.endpoint
    username               = module.cluster.username
    password               = module.cluster.password
    client_certificate     = base64decode(module.cluster.cluster_client_certificate)
    client_key             = base64decode(module.cluster.cluster_client_key)
    cluster_ca_certificate = base64decode(module.cluster.cluster_ca_cert)
    load_config_file       = false
  }
}

Examples

Known Issues

No issue is creating limit on this module.

Requirements

No requirements.

Providers

Name Version
azurerm n/a

Inputs

Name Description Type Default Required
azure_resource_group_name Name of Azure Resource Group string n/a yes
cluster_autoscale Do you want the cluster's worker pool to autoscale? bool false no
cluster_autoscale_max_workers Maximum number of workers in worker pool number 1 no
cluster_autoscale_min_workers Minimum number of workers in worker pool number 1 no
cluster_name Name of the k8s cluster string "cluster" no
environment The environment string "" no
k8s_azure_service_principal_id ID for the service principal for the k8s cluster. This should NOT be the same as your deployment SP string n/a yes
k8s_azure_service_principal_secret Secret for the service principal for the k8s cluster. This should NOT be the same as your deployment SP string n/a yes
k8s_version Version of k8s to use - override to use a version other than latest string null no
namespace The namespace to deploy into string "" no
network_name The network name, ie kusama / mainnet string "" no
num_workers Number of workers for worker pool number 1 no
owner Owner of the infrastructure string "" no
stage The stage of the deployment string "" no
vpc_id Name of the public VPC for the ASG nodes string "" no
worker_instance_type Instance type for workers string "Standard_D2_v2" no

Outputs

Name Description
cluster_ca_cert The base64 encoded public certificate for the cluster's certificate authority
cluster_client_certificate The base64 encoded public certificate used by clients to access the cluster
cluster_client_key The base64 encoded private key used by clients to access the cluster
endpoint The base URL of the API server on the Kubernetes master node
id A unique ID that can be used to identify and reference a Kubernetes cluster
kube_config The full contents of the Kubernetes cluster's kubeconfig file
password The cluster password
resource_group Name of the resource group where cluster resources are
scale_set n/a
username The cluster username

Testing

This module has been packaged with terratest tests

To run them:

  1. Install Go
  2. Run make test-init from the root of this repo
  3. Run make test again from root

Authors

Module managed by Richard Mah

Credits

License

Apache 2 Licensed. See LICENSE for full details.