Skip to content

Commit

Permalink
use 'lucidsolns/ct' instead of 'poseidon/ct' provider and add support…
Browse files Browse the repository at this point in the history
… for butane local files

- the poseidon ct provider doesn't set the `FilesDir` option which means the whole of the butane configuration has to be in one file (unless using a remote source)
- this is likely to be switched back to 'poseidon/ct' when the pull request is merged

see:

  - poseidon/terraform-provider-ct#175
  • Loading branch information
greg committed Dec 17, 2023
1 parent a52e1cc commit db1b24d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ terraform {
- https://www.flatcar.org/docs/latest/provisioning/config-transpiler/
*/
ct = {
source = "poseidon/ct"
version = ">= 0.13.0"
source = "lucidsolns/ct"
version = ">= 0.13.1"
}

/*
Expand Down Expand Up @@ -321,6 +321,7 @@ data "ct_config" "ignition_json" {
})
strict = true
pretty_print = false
files_dir = var.butane_path

snippets = [
for snippet in var.butane_conf_snippets : templatefile(var.butane_conf, {
Expand Down
15 changes: 15 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,18 @@ variable "startup" {
type = string
default = "order=any"
}

variable butane_path {
description = <<-EOF
The path used to allow embedding local files.module
If this is set then the use of local files is enabled: e.g. in the butane files section:
- path: /etc/docker-compose.yaml
contents:
local: docker-compose.yaml
EOF
type = string
default = null
}

0 comments on commit db1b24d

Please sign in to comment.