mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-28 19:02:07 +03:00
demo-10
This commit is contained in:
@@ -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}"
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user