terraform { required_providers { coder = { source = "coder/coder" version = "0.6.6" } google = { source = "hashicorp/google" version = "~> 4.34.0" } } } variable "project_id" { description = "Which Google Compute Project should your workspace live in?" } variable "zone" { description = "What region should your workspace live in?" default = "us-central1-a" validation { condition = contains(["northamerica-northeast1-a", "us-central1-a", "us-west2-c", "europe-west4-b", "southamerica-east1-a"], var.zone) error_message = "Invalid zone!" } } provider "google" { zone = var.zone project = var.project_id } data "google_compute_default_service_account" "default" { } data "coder_workspace" "me" { } resource "coder_agent" "main" { auth = "google-instance-identity" arch = "amd64" os = "linux" startup_script = <