Terraform Provider

For ingesting clusters or creating net new infrastructure, our terraform provider is usually the most natural surface for integrating Plural with your existing processes or adopting a full IaC based infrastructure management approach from the ground up.

Our provider is available on the Terraform Registry's Plural Provider page. It can also be used from Pulumi — see Using from Pulumi.

You can see snippets throughout our getting started guides, but some common usecases are as follows:

Configuring the Provider

terraform
terraform {
  required_providers {
    plural = {
      source = "pluralsh/plural"
      version = "0.2.32"
    }
  }
}

provider "plural" {
  # if you use Plural Stacks, authentication is auto-configured using temporary credentials
}

Ingesting a new Cluster

Used for ingesting new or existing kubernetes clusters into Plural.

terraform
# ensure kubernetes auth is configured for the plural provider
provider "plural" {
    kubernetes = {
        # kubernetes auth configuration
    }
}

resource "plural_cluster" "example" {
  name   = "my-cluster"
  handle = "my-cluster"
  metadata = jsonencode({
    iam = {
        load_balancer = module.addons.gitops_metadata.aws_load_balancer_controller_iam_role_arn # demonstrative module references for setting up IAM
        cluster_autoscaler = module.addons.gitops_metadata.cluster_autoscaler_iam_role_arn
    }
  })
}

Call a pr automation