dahendel / rancher-cluster-terraform

Terraform to create rancher cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rancher RKE Cluster

This module is built from the Rancher On-Boarding Guide It Builds clusters in AWS and enables the cloud_provider aws in the rke config

See EXAMPLES for terragrunt and terraform tfvars examples

Providers

Name Version
aws n/a
local n/a
rancher2 n/a
tls n/a

Inputs

Name Description Type Default Required
cluster_name Rancher Cluster Name any n/a yes
rancher_token Rancher API Token any n/a yes
rancher_url Rancher management URL any n/a yes
vpc_id VPC ID to deploy cluster to string n/a yes
admin_group_id Admin Group ID string "" no
ami_image_name AMI Image for the node templates string "ubuntu-minimal/images/*/ubuntu-bionic-18.04-*" no
app_certificates Map of Maps to create application tls certificates.

Key: Certificate secret name ex. awx-cert

Values:
- org: Organization Name (required)
- cn: Common Name (required)
- dns_names: List of DNS Names (required)
- validity_period: Integer validity period in hours (optional) (default: 4800)
- project: Valid project from projects map (required)

Example:
  app_certificates = {
awx-cert = {
org = My Org
project = DevOps
cn = awx.example.us
validity_period = 4800
dns_names = [
awx.example.us,
]
}
}
map {} no
catalogs Map of Maps to add Catalogs

Key: Catalog Name awx

Values:
- url: Catalog git compatible URL (required)
- branch: Git branch (optional)
- scope: Global, Cluster, Project scope (optional) (default: global)
- project: Project to add the catalog to (optional/required with scope=project)
- username: Username to use when cloning helm repository (optional)
- password: Password for helm repo user (optional)

Example:
  catalogs = {
awx = {
url = "20m"
}
}
map {} no
cloud_credential_id Cloud Crecdential from rancher-ha module string "" no
controlplane_instance_type Control Plane instance type based on master and master components recomendations: https://kubernetes.io/docs/setup/best-practices/cluster-large/#size-of-master-and-master-components string "m3.large" no
controlplane_tags Control plane node tags map(string) {} no
controlplane_volume_size Control Plane volume size string "50" no
default_apps Map of Maps to deploy default applications to new cluster.

Key: Name of the app from app catalog ex. filebeat.

Values:
- namespace: Valid namespace name from namespace map (required)
- project: Valid project from projects map (required)
- values: Filepath to values.yml (optional)
- answers: Map of answers for template (optional)

Example:
  default_apps = {
filebeat {
namespace = filebeat
project = DevOps
values = files/filebeat.values.yml
}
}
map {} no
env Rancher K8s Cluster Environment Tag string "" no
etcd_instance_type Etcd instance type, default based on etcd hardware configurations: https://etcd.io/docs/v3.4.0/op-guide/hardware/ string "m4.large" no
etcd_tags ETCD node tags map(string) {} no
etcd_volume_size ETCD node volume size string "50" no
extra_ssh_keys Extra SSH keys to pass to cloud-init file list(string) [] no
instance_profile AWS Instance profile to use for node templates string "Rancher-AWS-Cluster" no
instance_ssh_user SSH User string "ubuntu" no
projects Map of Maps to create projects

Key: Project Name ex. DevOps

Values:
- cpu: CPU resource limit (optional)
- memory: Memory resource limit (optional)
- storage: Storage resource limit (optional)
- read_only_groups: List of read only groups (optional)
- owner_groups: List of read only groups (optional)
- namespaces: Map of maps Key is namespace name and nested map contains namespace limits

Example:
  projects = {
DevOps = {
cpu = "20m"
memory = "100mi"
storage = "1gi"
read_only_groups = ["ping_group://Rancher Read Only"]
member_groups = ["ping_group://Rancher Project Members"]
namespaces = {
vault = {
cpu = "20m"
memory = "100mi"
storage = "1gi"
}
awx = {
cpu = "20m"
memory = "100mi"
storage = "1gi"
}
}
}
}
map {} no
rancher_insecure Rancher skip tls vazlidation bool true no
region AWS Region string "us-east-1" no
worker_instance_type AMI Instance type for worker nodes string "t3.large" no
worker_tags Tags for worker nodes map(string) {} no
worker_volume_size Worker node volume size string "50" no

Outputs

Name Description
certs n/a
cp_templates n/a
etcd_templates n/a
namespaces n/a
projects n/a
worker_templates n/a

About

Terraform to create rancher cluster


Languages

Language:HCL 100.0%