Terraform Variable part 3 - terraform tfvars

preview_player
Показать описание

terraform {
required_providers {
google = {
source = "hashicorp/google"
}
}
}

provider "google" {

project = "vertical-gift-423404-q8"
region = "us-central1"
zone = "us-central1-c"
}

# Define the GCE instance1
resource "google_compute_instance" "tf_vm_instance-1" {
name = "my-tf-vm-instance-1"
zone = "us-central1-a"
boot_disk {
initialize_params {
image = "ubuntu-1404-trusty-v20160627"
}
}

network_interface {
network = "default"
}
}

############################################

# Define variable for GCE instances
variable "instancetype" {
default = "n1-standard-1"
}

############################################

instancetype = "n1-standard-2"

############################################
Рекомендации по теме