mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-22 03:01:53 +03:00
remove template provider
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
# 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
|
||||
base64_encode = false
|
||||
|
||||
part {
|
||||
filename = "init.cfg"
|
||||
content_type = "text/cloud-config"
|
||||
content = template_file("scripts/init.cfg", {
|
||||
content = templatefile("scripts/init.cfg", {
|
||||
REGION = var.AWS_REGION
|
||||
})
|
||||
}
|
||||
|
||||
part {
|
||||
content_type = "text/x-shellscript"
|
||||
content = template_file("scripts/volumes.sh", {
|
||||
content = templatefile("scripts/volumes.sh", {
|
||||
DEVICE = var.INSTANCE_DEVICE_NAME
|
||||
})
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ resource "aws_instance" "example" {
|
||||
key_name = aws_key_pair.mykeypair.key_name
|
||||
|
||||
# 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" {
|
||||
|
||||
Reference in New Issue
Block a user