Created
June 5, 2019 20:52
-
-
Save claydanford/66ceebb8aebc88edee7f1f54a14d44d4 to your computer and use it in GitHub Desktop.
This data source puts rendered template parts together for generating cloud-init user-data.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "template_cloudinit_config" "agent_init" { | |
gzip = false | |
base64_encode = false | |
part { | |
filename = "agent.cfg" | |
content_type = "text/cloud-config" | |
content = "${data.template_file.agent_write_files.rendered}" | |
} | |
part { | |
content_type = "text/cloud-config" | |
content = "${data.template_file.agent_runcmd.rendered}" | |
} | |
part { | |
content_type = "text/cloud-config" | |
content = "${var.extra_agent_userdata}" | |
merge_type = "${var.extra_agent_userdata_merge}" | |
} | |
part { | |
content_type = "text/cloud-config" | |
content = "${data.template_file.agent_end.rendered}" | |
merge_type = "list(append)+dict(recurse_array)+str()" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment