The CT (formerly known as Fuze) provider exposes data sources to render [Ignition] 1
configurations in the human-friendly [Config-Transpiler] 2 YAML format into
JSON. The rendered JSON strings can be used as input to other
Terraform resources, e.g. as user-data for cloud instances.
Requirements
Installation
go get -u github.com/coreos/terraform-provider-ct
Update your .terraformrc
file with the path to the binary:
providers {
ct = "/$GOPATH/bin/terraform-provider-ct"
}
Example Usage
data "ct_config" "web" {
pretty_print = false
content = "${file("web.yaml")}"
}
resource "aws_instance" "web" {
user_data = "${data.ct_config.web.rendered}"
}
Development
To develop the provider plugin locally, you'll need Go 1.8+ installed and a GOPATH setup. Build the plugin locally.
make
Optionally, install the plugin to $(GOPATH)/bin
.
make install
Vendor
Add or update dependencies in glide.yaml and vendor. The glide and glide-vc tools vendor and prune dependencies.
make vendor