Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.17.0 to 2.18.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.17.0...v2.18.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
terraform-provider-ct 
terraform-provider-ct allows Terraform to validate a Butane config or Container Linux 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.10.0"
}
}
}
Define a Butane config (for Fedora CoreOS) or Container Linux Config (for Flatcar Linux):
# Butane config
---
variant: fcos
version: 1.4.0
passwd:
users:
- name: core
ssh_authorized_keys:
- ssh-key foo
# Container Linux Config
---
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
- Terraform v0.13+ installed
Versions
Butane configs are converted to the current (according to this provider) stable Ignition config and merged together. For example, a Butane Config with version: 1.2.0 would produce an Ignition config with version v3.3.0. This relies on Ignition's forward compatibility.
Container Linux Configs render a fixed Ignition version, depending on the terraform-provider-ct release, so updating alters the rendered Ignition version.
Before terraform-provider-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.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.16+.
make