Dalton Hubble 36d7696043 Prepare for v0.7.1 release
* Remove Terraform v0.12.x legacy install instructions
2020-11-20 15:14:50 -08:00
2020-11-20 15:14:50 -08:00
2020-11-20 15:14:50 -08:00
2020-10-28 22:32:31 -07:00
2017-08-03 11:09:46 -07:00
2020-11-20 15:14:50 -08:00
2018-01-04 12:32:54 -08:00
2020-10-28 22:32:25 -07:00
2020-10-28 22:32:25 -07:00
2016-08-15 17:15:07 -04:00
2020-11-20 15:14:50 -08:00

terraform-provider-ct Build Status

terraform-provider-ct allows Terraform to validate a Container Linux Config or Fedora CoreOS Config and transpile it as Ignition for machine consumption.

Usage

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

provider "ct" {}

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

Define a Container Linux Config (CLC) or Fedora CoreOS Config (FCC).

# Container Linux Config
---
passwd:
  users:
    - name: core
      ssh_authorized_keys:
        - ssh-key foo
# Fedora CoreOS Config
---
variant: fcos
version: 1.2.0
passwd:
  users:
    - name: core
      ssh_authorized_keys:
        - ssh-key foo

Define a ct_config data source and render for machine consumption.

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

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

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

Run terraform init to ensure plugin version requirements are met.

$ terraform init

Requirements

Versions

Fedora CoreOS Config's contain a version that is associated with an Ignition format verison. For example, a FCC with version: 1.0.0 would produce Ignition 3.0.0, across future releases.

Container Linux Configs render a fixed Ignition version, depending on the terraform-provider-ct release, so updating alters the rendered Ignition version.

terraform-provider-ct CLC to Ignition FCC to Ignition
0.7.x Renders 2.3.0 FCC (1.0, 1.1, 1.2) -> Ignition (3.0, 3.1, 3.2)
0.6.x Renders 2.3.0 FCC 1.0.0 -> Ignition 3.0.0, FCC 1.1.0 -> Ignition v3.1.0
0.5.x Renders 2.2.0 FCC 1.0.0 -> Ignition 3.0.0
0.4.x Renders 2.2.0 FCC 1.0.0 -> Ignition 3.0.0
0.3.x Renders 2.2.0 NA
0.2.x Renders 2.0.0 NA

Notes:

  • Fedora CoreOS Config snippets must match the version set in the content. Version skew among snippets is not supported.

Development

Binary

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

make

Vendor

Add or update dependencies in go.mod and vendor.

make update
make vendor
Description
No description provided
Readme Apache-2.0 11 MiB
Languages
Go 92.7%
Makefile 7.3%