diff --git a/examples/hybrid_amazon_linux/main.tf b/examples/hybrid_amazon_linux/main.tf index 688ab55..f313cd3 100644 --- a/examples/hybrid_amazon_linux/main.tf +++ b/examples/hybrid_amazon_linux/main.tf @@ -147,7 +147,7 @@ locals { }) } -data "template_cloudinit_config" "cloud-init" { +data "cloudinit_config" "cloud-init" { gzip = true base64_encode = true @@ -169,11 +169,11 @@ resource "aws_instance" "external_postgres" { key_name = var.key_name subnet_id = aws_subnet.public_subnets.0.id vpc_security_group_ids = [aws_security_group.allow_postgres.id] - user_data = data.template_cloudinit_config.cloud-init.rendered + user_data = data.cloudinit_config.cloud-init.rendered tags = var.tags } -data "template_cloudinit_config" "proxy_cloud_init" { +data "cloudinit_config" "proxy_cloud_init" { gzip = true base64_encode = true @@ -195,7 +195,7 @@ resource "aws_instance" "external_proxy" { key_name = var.key_name subnet_id = aws_subnet.public_subnets.0.id vpc_security_group_ids = [aws_security_group.allow_proxy.id] - user_data = data.template_cloudinit_config.proxy_cloud_init.rendered + user_data = data.cloudinit_config.proxy_cloud_init.rendered tags = merge({ Name = "proxy" }, var.tags) } diff --git a/examples/hybrid_ecs/main.tf b/examples/hybrid_ecs/main.tf index 0eb2294..9d3734b 100644 --- a/examples/hybrid_ecs/main.tf +++ b/examples/hybrid_ecs/main.tf @@ -131,7 +131,7 @@ locals { }) } -data "template_cloudinit_config" "cloud-init" { +data "cloudinit_config" "cloud-init" { gzip = true base64_encode = true @@ -153,11 +153,11 @@ resource "aws_instance" "external_postgres" { key_name = var.key_name subnet_id = aws_subnet.public_subnets.0.id vpc_security_group_ids = [aws_security_group.allow_postgres.id] - user_data = data.template_cloudinit_config.cloud-init.rendered + user_data = data.cloudinit_config.cloud-init.rendered tags = var.tags } -data "template_cloudinit_config" "proxy_cloud_init" { +data "cloudinit_config" "proxy_cloud_init" { gzip = true base64_encode = true @@ -179,7 +179,7 @@ resource "aws_instance" "external_proxy" { key_name = var.key_name subnet_id = aws_subnet.public_subnets.0.id vpc_security_group_ids = [aws_security_group.allow_proxy.id] - user_data = data.template_cloudinit_config.proxy_cloud_init.rendered + user_data = data.cloudinit_config.proxy_cloud_init.rendered tags = merge({ Name = "proxy" }, var.tags) } diff --git a/examples/hybrid_external_database/main.tf b/examples/hybrid_external_database/main.tf index c8512cc..680d485 100644 --- a/examples/hybrid_external_database/main.tf +++ b/examples/hybrid_external_database/main.tf @@ -105,7 +105,7 @@ locals { }) } -data "template_cloudinit_config" "cloud-init" { +data "cloudinit_config" "cloud-init" { gzip = true base64_encode = true @@ -127,7 +127,7 @@ resource "aws_instance" "external_postgres" { key_name = var.key_name subnet_id = aws_subnet.public_subnets.0.id vpc_security_group_ids = [aws_security_group.allow_postgres.id] - user_data = data.template_cloudinit_config.cloud-init.rendered + user_data = data.cloudinit_config.cloud-init.rendered tags = var.tags } diff --git a/examples/hybrid_http_proxy/main.tf b/examples/hybrid_http_proxy/main.tf index feec252..a712938 100644 --- a/examples/hybrid_http_proxy/main.tf +++ b/examples/hybrid_http_proxy/main.tf @@ -128,7 +128,7 @@ locals { }) } -data "template_cloudinit_config" "db_cloud_init" { +data "cloudinit_config" "db_cloud_init" { gzip = true base64_encode = true @@ -150,11 +150,11 @@ resource "aws_instance" "external_postgres" { key_name = var.key_name subnet_id = aws_subnet.public_subnets.0.id vpc_security_group_ids = [aws_security_group.allow_postgres.id] - user_data = data.template_cloudinit_config.db_cloud_init.rendered + user_data = data.cloudinit_config.db_cloud_init.rendered tags = var.tags } -data "template_cloudinit_config" "proxy_cloud_init" { +data "cloudinit_config" "proxy_cloud_init" { gzip = true base64_encode = true @@ -176,7 +176,7 @@ resource "aws_instance" "external_proxy" { key_name = var.key_name subnet_id = aws_subnet.public_subnets.0.id vpc_security_group_ids = [aws_security_group.allow_proxy.id] - user_data = data.template_cloudinit_config.proxy_cloud_init.rendered + user_data = data.cloudinit_config.proxy_cloud_init.rendered tags = merge({ Name = "proxy" }, var.tags) } diff --git a/modules/ec2/main.tf b/modules/ec2/main.tf index 26e9b10..e1cd147 100644 --- a/modules/ec2/main.tf +++ b/modules/ec2/main.tf @@ -136,7 +136,7 @@ module "database" { tags = var.tags } -data "template_cloudinit_config" "cloud_init" { +data "cloudinit_config" "cloud_init" { gzip = true base64_encode = true @@ -157,7 +157,7 @@ resource "aws_launch_template" "kong" { image_id = var.ami_id instance_type = var.instance_type key_name = var.key_name - user_data = var.user_data == null ? base64encode(data.template_cloudinit_config.cloud_init.rendered) : base64encode(var.user_data) + user_data = var.user_data == null ? base64encode(data.cloudinit_config.cloud_init.rendered) : base64encode(var.user_data) update_default_version = true iam_instance_profile {