poseidon
terraform-provider-ct
Go

Terraform provider for converting Butane Configs to Ignition

Last updated Jul 7, 2026
201
Stars
42
Forks
4
Issues
0
Stars/day
Attention Score
75
Language breakdown
Go 92.7%
Makefile 7.3%
Files click to expand
README

terraform-provider-ct

GoDoc Workflow Downloads Sponsors Mastodon

terraform-provider-ct allows Terraform to validate a Butane config and transpile to an Ignition config for machine consumption.

Usage

Configure the config transpiler provider (e.g. providers.tf).

provider "ct" {}

terraform { required_providers { ct = { source = "poseidon/ct" version = "0.14.0" } } }

Define a Butane config for Fedora CoreOS or Flatcar Linux:

variant: fcos
version: 1.5.0
passwd:
  users:
    - name: core
      sshauthorizedkeys:
        - ssh-key foo
variant: flatcar
version: 1.1.0
passwd:
  users:
    - name: core
      sshauthorizedkeys:
        - ssh-key foo

Define a ct_config data source with strict validation.

data "ct_config" "worker" {
  content      = file("worker.yaml")
  strict       = true
  pretty_print = false

snippets = [ file("units.yaml"), file("storage.yaml"), ] }

Optionally, template the content.

data "ct_config" "worker" {
  content = templatefile("worker.yaml", {
    sshauthorizedkey = "ssh-ed25519 AAAA...",
  })
  strict       = true
}

Render the ct_config as Ignition for use by machine instances.

resource "aws_instance" "worker" {
  userdata = data.ctconfig.worker.rendered
}

Run terraform init to ensure plugin version requirements are met.

$ terraform init

Requirements

Versions

Butane configs are converted to the current (according to this provider) stable Ignition config and merged together. For example, poseidon/ct v0.12.0 would convert a Butane Config with variant: fcos and version: 1.2.0 to an Ignition config with version v3.3.0. This relies on Ignition's forward compatibility.

| poseidon/ct | Butane variant | Butane version | Ignition verison | |-----------------------|----------------|----------------|------------------| | 0.14.x | fcos | 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0 | 3.4.0 | | 0.14.x | flatcar | 1.0.0, 1.1.0 | 3.4.0 | | 0.13.x | fcos | 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0 | 3.4.0 | | 0.13.x | flatcar | 1.0.0, 1.1.0 | 3.4.0 | | 0.12.x | fcos | 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0 | 3.3.0 | | 0.12.x | flatcar | 1.0.0 | 3.3.0 |

Before poseidon/ct v0.12.0, ct_config content could be a Butane Config or a Container Linux Config (CLC). Before poseidon/ct v0.10.0, Butane configs contained a version that was associated with an Ignition format version. For example, a Butane config with version: 1.0.0 would produce an Ignition config with version 3.0.0.

| terraform-provider-ct | CLC to Ignition | Butane to Ignition | |-----------------------|---------------------|--------------------| | 0.11.x | Renders 2.3.0 | Butane (1.0, 1.1, 1.2, 1.3, 1.4) -> Ignition 3.3 | | 0.10.x | Renders 2.3.0 | Butane (1.0, 1.1, 1.2, 1.3, 1.4) -> Ignition 3.3 | | 0.9.x | Renders 2.3.0 | Butane (1.0, 1.1, 1.2, 1.3, 1.4) -> Ignition (3.0, 3.1, 3.2, 3.2, 3.3) | 0.8.x | Renders 2.3.0 | Butane (1.0, 1.1, 1.2, 1.3) -> Ignition (3.0, 3.1, 3.2, 3.2) | 0.7.x | Renders 2.3.0 | Butane (1.0, 1.1, 1.2) -> Ignition (3.0, 3.1, 3.2) | | 0.6.x | Renders 2.3.0 | Butane (1.0, 1.1) -> Ignition (3.0, 3.1) | | 0.5.x | Renders 2.2.0 | Butane 1.0.0 -> Ignition 3.0.0 | | 0.4.x | Renders 2.2.0 | Butane 1.0.0 -> Ignition 3.0.0 | | 0.3.x | Renders 2.2.0 | NA | | 0.2.x | Renders 2.0.0 | NA |

Development

Binary

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

make
🔗 More in this category

© 2026 GitRepoTrend · poseidon/terraform-provider-ct · Updated daily from GitHub