Olá pessoal,
Estou tentando criar uma vm e um disco, na mesma região e zona, através do terraform. No caso meu codigo ficou da seguinte forma:
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "4.25.0"
}
}
}
provider "google" {
credentials = file(######)
project = "teste-2023"
region = "southamerica-east1"
zone = "southamerica-east1-a"
}
resource "google_compute_disk" "authfy_connectvm_disk" {
name = "disk1"
type = "pd-ssd"
zone = "southamerica-east1-a"
size = 100
}
resource "google_compute_instance" "authfy-connectvm" {
name = "authfy-connectvmt"
machine_type = "e2-medium"
zone = "southamerica-east1-a"
boot_disk {
initialize_params {
image = "ubuntu-os-cloud/ubuntu-1804-lts"
}
}
attached_disk {
source = "authfy_connectvm_disk"
device_name = "authfy_connectvm_disk"
}
network_interface {
# A default network is created for all GCP projects
network = "default"
access_config {
}
}
}
Mas ao dar um terraform apply