Skip to main content

Prerequisites

Install Terraform (v0.13+).
Add the Control Plane provider to your Terraform configuration. See Terraform Provider for setup instructions.

Install a Template

Use the cpln_catalog_template resource to install a template from the catalog.
1

Choose a Template

Browse the available templates in the Template Catalog and identify the template name and version you want to install.
2

Add a Values File

Create a values.yaml file in your Terraform project directory with the template’s configuration. Refer to the specific template’s documentation for available options.
3

Define the Resource

Add a cpln_catalog_template resource to your Terraform configuration, referencing the values file:
main.tf
resource "cpln_catalog_template" "example" {
  name     = "my-release"
  template = "postgres"
  version  = "1.0.0"
  gvc      = "my-gvc"
  values   = file("${path.module}/values.yaml")
}
Arguments:
  • name — A unique release name for this installation.
  • template — The name of the catalog template (e.g., cockroachdb).
  • version — The template version to install.
  • gvc — The GVC to deploy to. Leave empty if the template creates its own GVC.
  • values — YAML-formatted string to customize the template configuration.
4

Apply

Initialize and apply the configuration:
terraform init
terraform plan
terraform apply
Terraform will provision the required Control Plane resources based on your configuration.

Outputs

After applying, the resource exposes a resources attribute containing a list of all Control Plane resources created by the release. Each entry includes:
  • kind — The resource type (e.g., workload, secret, gvc).
  • name — The resource name.
  • link — The full Control Plane URL for the resource.

Manage a Template

Upgrade

To upgrade a release with new values or a new template version, update the version argument and/or your values.yaml file and re-apply:
terraform plan
terraform apply
Any workloads affected by the change will roll out new deployments. Unchanged items will not be redeployed.

Preview Changes

Use terraform plan to preview the changes that will be applied before upgrading:
terraform plan

Uninstall a Template

Remove the cpln_catalog_template resource from your configuration and apply:
terraform plan
terraform apply
Alternatively, destroy the specific resource:
terraform destroy -target=cpln_catalog_template.example
This deletes all Control Plane resources created by the release.