/terraform-provider-flux

Terraform provider for bootstrapping Flux

Primary LanguageGoApache License 2.0Apache-2.0

Terraform Provider Flux

tests report license release

This is the Terraform provider for Flux v2. The provider allows you to install Flux on Kubernetes and configure it to reconcile the cluster state from a Git repository.

Get Started

Below is an example for how to bootstrap a Kubernetes cluster with Flux. Refer to registry.terraform.io for detailed configuration documentation.

provider "flux" {
  kubernetes = {
    config_path = "~/.kube/config"
  }
  git = {
    url  = var.repository_ssh_url
    ssh = {
      username    = "git"
      private_key = var.private_key_pem
    }
  }
}

resource "flux_bootstrap_git" "this" {
  path = "clusters/my-cluster"
}

Guides