Skip to content
Terraform provider for Container Linux Configs
Branch: master
Clone or download
dghubble Add .travis.yml test coverage for Go v1.12.x
* Test the latest 3 versions of Go for consistency across
Latest commit f830530 May 8, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
ct ct: update tests to work with Ignition spec v2.2 Apr 25, 2018
example Upgrade terraform dependency to v0.12.0-beta1 Mar 12, 2019
vendor Vendor updated Terraform module dependency Mar 12, 2019
.gitignore *: Prepare for v0.2.0 release Aug 3, 2017
.travis.yml Add .travis.yml test coverage for Go v1.12.x May 8, 2019 Rename module to May 8, 2019 Add license and other docs Aug 15, 2016
DCO update CoC and legalese Jan 4, 2018
LICENSE Add license and other docs Aug 15, 2016
Makefile Rename module to May 8, 2019
NOTICE Add license and other docs Aug 15, 2016 Rename module to May 8, 2019 update CoC and legalese Jan 4, 2018
go.mod Rename module to May 8, 2019
main.go Rename module to May 8, 2019


terraform-provider-ct allows defining a ct_config Container Linux Config resource to validate the content and render an Ignition document. Rendered Ignition may be used as input to other Terraform resources (e.g. instance user-data).



Add the terraform-provider-ct plugin binary for your system to the Terraform 3rd-party plugin directory ~/.terraform.d/plugins.

tar xzf terraform-provider-ct-$VERSION-linux-amd64.tar.gz
mv terraform-provider-ct-$VERSION-linux-amd64/terraform-provider-ct ~/.terraform.d/plugins/terraform-provider-ct_$VERSION

Terraform plugin binary names are versioned to allow for migrations of managed infrastructure.

$ tree ~/.terraform.d/
└── plugins
    ├── terraform-provider-ct_v0.3.0
    └── terraform-provider-ct_v0.3.1


Configure the ct provider in a file.

provider "ct" {
  version = "0.3.1"

Run terraform init to ensure plugin version requirements are met.

$ terraform init

Declare a ct_config resource in Terraform.

data "ct_config" "worker" {
  content      = "${file("worker.yaml")}"
  platform     = "ec2"
  pretty_print = false

  snippets = [

resource "aws_instance" "worker" {
  user_data = "${data.ct_config.worker.rendered}"

Set the content to the contents of a Container Linux Config that should be validated and rendered as Ignition. Optionally, use the snippets field to append a list of Container Linux Config snippets. Use platform if platform-specific susbstitution is desired.

Ignition schema output

Each minor version of terraform-provider-ct is tightly coupled with a minor version of the Ignition schema. Ignition transparently handles old Ignition schema versions, so this isn't normally an issue.

Upgrading between versions for existing managed clusters may not be safe. Check your usage to determine whether a user_data change to an instance would re-provision a machine (important machines may be configured to ignore user_data changes).

terraform-provider-ct Ignition schema version
0.2.x 2.0
0.3.x 2.2



To develop the provider plugin locally, build an executable with Go v1.11+.



Add or update dependencies in go.mod and vendor.

make update
make vendor
You can’t perform that action at this time.