cloud-init.tf 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Render a multi-part cloud-init config making use of the part
  2. # above, and other source files
  3. data "template_cloudinit_config" "cloud-init" {
  4. gzip = true
  5. base64_encode = true
  6. # Main cloud-config configuration file.
  7. part {
  8. filename = "init.cfg"
  9. content_type = "text/cloud-config"
  10. content = templatefile("${path.module}/cloud-init/cloud-init.tpl",
  11. {
  12. prefix = var.prefix
  13. zone = var.dns_info["private"]["zone"]
  14. splunk_prefix = var.prefix
  15. environment = var.environment
  16. salt_master = local.salt_master
  17. proxy = local.proxy
  18. aws_partition = var.aws_partition
  19. aws_partition_alias = var.aws_partition_alias
  20. aws_region = var.aws_region
  21. }
  22. )
  23. }
  24. part {
  25. content_type = "text/cloud-boothook"
  26. content = file("${path.module}/cloud-init/nvme-setup.sh")
  27. }
  28. part {
  29. content_type = "text/cloud-boothook"
  30. content = file("${path.module}/cloud-init/opt_splunk.boothook")
  31. }
  32. }