Skip to content

Commit 43baaba

Browse files
authored
chore: remove deprecated hashicorp/template from module examples (#1621)
Signed-off-by: Julien Leloup <[email protected]>
1 parent 5abb6ba commit 43baaba

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

examples/safer_cluster_iap_bastion/bastion.tf

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ locals {
1919
bastion_zone = format("%s-a", var.region)
2020
}
2121

22-
data "template_file" "startup_script" {
23-
template = <<-EOF
24-
sudo apt-get update -y
25-
sudo apt-get install -y tinyproxy
26-
EOF
27-
}
28-
2922
module "bastion" {
3023
source = "terraform-google-modules/bastion-host/google"
3124
version = "~> 5.0"
@@ -38,7 +31,7 @@ module "bastion" {
3831
zone = local.bastion_zone
3932
image_project = "debian-cloud"
4033
machine_type = "g1-small"
41-
startup_script = data.template_file.startup_script.rendered
34+
startup_script = templatefile("${path.module}/templates/startup-script.tftpl", {})
4235
members = var.bastion_members
4336
shielded_vm = "false"
4437
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sudo apt-get update -y
2+
sudo apt-get install -y tinyproxy

examples/safer_cluster_iap_bastion/versions.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ terraform {
2727
kubernetes = {
2828
source = "hashicorp/kubernetes"
2929
}
30-
template = {
31-
source = "hashicorp/template"
32-
}
3330
}
3431
required_version = ">= 0.13"
3532
}

0 commit comments

Comments
 (0)