This commit is contained in:
Edward Viaene
2016-10-14 08:43:55 +00:00
parent 694bfbfb48
commit 6789aec679
9 changed files with 238 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
provider "cloudinit" {}
resource "template_file" "init-script" {
template = "${file("scripts/init.cfg")}"
vars {
region = "${var.AWS_REGION}"
}
}
resource "template_file" "shell-script" {
template = "${file("scripts/volumes.sh")}"
}
resource "template_cloudinit_config" "cloudinit-example" {
gzip = false
base64_encode = false
part {
filename = "init.cfg"
content_type = "text/cloud-config"
content = "${template_file.init-script.rendered}"
}
part {
content_type = "text/x-shellscript"
content = "${template_file.shell-script.rendered}"
}
}