123456789101112131415161718192021222324252627282930313233343536 |
- # Render a multi-part cloud-init config making use of the part
- # above, and other source files
- data "template_cloudinit_config" "cloud-init" {
- gzip = true
- base64_encode = true
- # Main cloud-config configuration file.
- part {
- filename = "init.cfg"
- content_type = "text/cloud-config"
- content = templatefile("${path.module}/cloud-init/cloud-init.tpl",
- {
- prefix = var.prefix
- zone = var.dns_info["private"]["zone"]
- splunk_prefix = var.prefix
- environment = var.environment
- salt_master = local.salt_master
- proxy = local.proxy
- aws_partition = var.aws_partition
- aws_partition_alias = var.aws_partition_alias
- aws_region = var.aws_region
- }
- )
- }
- part {
- content_type = "text/cloud-boothook"
- content = file("${path.module}/cloud-init/nvme-setup.sh")
- }
- part {
- content_type = "text/cloud-boothook"
- content = file("${path.module}/cloud-init/opt_splunk.boothook")
- }
- }
|