mirror of
https://github.com/ghndrx/tf-variable-demo.git
synced 2026-02-10 06:54:57 +00:00
commit new files
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
resource "google_compute_instance_template" "template" {
|
||||
name_prefix = "instance-template-"
|
||||
project = var.project_id
|
||||
region = var.region
|
||||
|
||||
machine_type = var.instance_type
|
||||
disk {
|
||||
source_image = var.image_name
|
||||
auto_delete = true
|
||||
boot = true
|
||||
}
|
||||
|
||||
network_interface {
|
||||
network = "default"
|
||||
access_config {
|
||||
// Ephemeral public IP address
|
||||
}
|
||||
}
|
||||
|
||||
metadata_startup_script = var.startup_script
|
||||
|
||||
lifecycle {
|
||||
create_before_destroy = true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
variable "project_id" {}
|
||||
variable "region" {}
|
||||
variable "image_name" {}
|
||||
variable "instance_type" {}
|
||||
variable "startup_script" {}
|
||||
|
||||
Reference in New Issue
Block a user