remove template provider

This commit is contained in:
Edward Viaene
2022-05-09 14:06:01 -04:00
parent 2a80e889ce
commit 1844e39a1a
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -1,20 +1,20 @@
# note: previous templatefile datasources have been replaced by the template_file() function # note: previous templatefile datasources have been replaced by the template_file() function
data "template_cloudinit_config" "cloudinit-example" { data "cloudinit_config" "cloudinit-example" {
gzip = false gzip = false
base64_encode = false base64_encode = false
part { part {
filename = "init.cfg" filename = "init.cfg"
content_type = "text/cloud-config" content_type = "text/cloud-config"
content = template_file("scripts/init.cfg", { content = templatefile("scripts/init.cfg", {
REGION = var.AWS_REGION REGION = var.AWS_REGION
}) })
} }
part { part {
content_type = "text/x-shellscript" content_type = "text/x-shellscript"
content = template_file("scripts/volumes.sh", { content = templatefile("scripts/volumes.sh", {
DEVICE = var.INSTANCE_DEVICE_NAME DEVICE = var.INSTANCE_DEVICE_NAME
}) })
} }
+1 -1
View File
@@ -12,7 +12,7 @@ resource "aws_instance" "example" {
key_name = aws_key_pair.mykeypair.key_name key_name = aws_key_pair.mykeypair.key_name
# user data # user data
user_data = data.template_cloudinit_config.cloudinit-example.rendered user_data = data.cloudinit_config.cloudinit-example.rendered
} }
resource "aws_ebs_volume" "ebs-volume-1" { resource "aws_ebs_volume" "ebs-volume-1" {