Files
Dalton Hubble e59b2b7b55 Update Flatcar Linux examples and use Ignition
* Discontinue using Matchbox's Container Linux Config features
* Flatcar Linux OS now supports Ignition v2.13+ which means it
can accept Ignition v3.x spec's, like Fedora CoreOS. Matchbox
supports this by serving Ignition documents directly
* Users of the poseidon/matchbox Terraform provider can pass
a `matchbox_profile` `raw_ignition` contents with the desired
Ignition v3.3 spec
* Users of the poseidon/ct Terraform provider can write Butane
Config YAML, perform templating, and render an Ignition document
using either the fcos or the flatcar variant
2022-07-29 22:12:20 -07:00

39 lines
1.0 KiB
HCL

// Create a flatcar-install profile
resource "matchbox_profile" "flatcar-install" {
name = "flatcar-install"
kernel = "/assets/flatcar/3227.2.0/flatcar_production_pxe.vmlinuz"
initrd = [
"/assets/flatcar/3227.2.0/flatcar_production_pxe_image.cpio.gz",
]
args = [
"initrd=flatcar_production_pxe_image.cpio.gz",
"flatcar.config.url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}",
"flatcar.first_boot=yes",
]
raw_ignition = data.ct_config.install.rendered
}
data "ct_config" "install" {
content = templatefile("butane/flatcar-install.yaml", {
matchbox_http_endpoint = var.matchbox_http_endpoint
ssh_authorized_key = var.ssh_authorized_key
})
strict = true
}
// Profile to set an SSH authorized key on first boot from disk
resource "matchbox_profile" "worker" {
name = "worker"
raw_ignition = data.ct_config.worker.rendered
}
data "ct_config" "worker" {
content = templatefile("butane/flatcar.yaml", {
ssh_authorized_key = var.ssh_authorized_key
})
strict = true
}