terraform-provider-kops

command module
v0.0.0-...-609a6d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2020 License: MIT Imports: 2 Imported by: 0

README

terraform-provider-kops - WIP

Build Status Go Report Card GitHub release

Road to 0.0.1-alpha

  • Implement kops/v1alpha2/Cluster flattening to TF state
  • Implement kops_cluster resource state sync
  • Implement kops/v1alpha2/InstanceGroup flattening to TF state
  • Implement kops_instance_group resource state sync
  • Cover flattening/expanding of state by UTs
  • Fill in spec defaults using cloudup package
  • Deep validate spec using cloudup package
  • Run create cluster cmd

Roadmap

  • Run rolling-update cluster cmd automatically
  • Implement Cluster datasource
  • Implement InstanceGroup datasource
  • Implement Keystore datasource
  • Implement Secretstore datasource
  • Implement SSHSecretstore datasource
  • Add e2e tests

Usage

Provider
provider "kops" {
  state_store = "s3://cluster-example-state-storage"
}
Cluster
resource "kops_cluster" "cluster" {
  metadata {
    name = "cluster.example.com"
  }

  spec {
    cloud_provider      = "aws"
    kubernetes_version  = "1.10.11"

    network_cidr        = "10.0.0.0/16"
    non_masquerade_cidr = "10.0.0.0/16"

    topology {
      dns {
        type = "Public"
      }
    }

    networking {
      name = "kuberouter"
    }

    subnet {
      name = "eu-west-1a"
      cidr = "10.0.10.0/24"
      zone = "eu-west-1a"
      type = "Private"
    }

    subnet {
      name = "eu-west-1b"
      cidr = "10.0.11.0/24"
      zone = "eu-west-1b"
      type = "Private"
    }

    subnet {
      name = "eu-west-1c"
      cidr = "10.0.12.0/24"
      zone = "eu-west-1c"
      type = "Private"
    }

    etcd_cluster {
      name            = "main"
      enable_etcd_tls = "true"
      image           = "k8s.gcr.io/etcd:3.2.14"
      version         = "3.2.14"

      etcd_member {
        name             = "eu-west-1a"
        instance_group   = "master-eu-west-1a"
        encrypted_volume = "true"
      }

      etcd_member {
        name             = "eu-west-1b"
        instance_group   = "master-eu-west-1b"
        encrypted_volume = "true"
      }

      etcd_member {
        name             = "eu-west-1c"
        instance_group   = "master-eu-west-1c"
        encrypted_volume = "true"
      }
    }

    etcd_cluster {
      name            = "event"
      enable_etcd_tls = "true"
      image           = "k8s.gcr.io/etcd:3.2.14"
      version         = "3.2.14"

      etcd_member {
        name             = "eu-west-1a"
        instance_group   = "master-eu-west-1a"
        encrypted_volume = "true"
      }

      etcd_member {
        name             = "eu-west-1b"
        instance_group   = "master-eu-west-1b"
        encrypted_volume = "true"
      }

      etcd_member {
        name             = "eu-west-1c"
        instance_group   = "master-eu-west-1c"
        encrypted_volume = "true"
      }
    }
  }
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL