1
0
Fork 0
mirror of https://github.com/imjasonh/terraform-playground synced 2026-07-08 07:44:57 +00:00

Merge pull request #5 from imjasonh/copilot/sub-pr-3-again

This commit is contained in:
Jason Hall 2025-11-27 23:50:03 -06:00 committed by GitHub
commit 682694ee66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 6 deletions

View file

@ -31,13 +31,10 @@ resource "google_compute_instance_template" "container_vm_template" {
boot = true
}
# Network configuration
# Network configuration (private VM - no external IP)
network_interface {
network = "default"
subnetwork = null
# Assign an external IP address (access_config is required for external IP)
access_config {}
network = var.network
subnetwork = var.subnetwork
}
# Service Account configuration (needed for Google Cloud API access, including image pulls)

View file

@ -73,3 +73,13 @@ variable "source_image_project" {
default = "cos-cloud"
}
variable "network" {
description = "The VPC network to attach the VM to (e.g., 'projects/PROJECT/global/networks/NETWORK' or 'NETWORK')."
type = string
}
variable "subnetwork" {
description = "The subnetwork to attach the VM to (e.g., 'projects/PROJECT/regions/REGION/subnetworks/SUBNET' or 'SUBNET')."
type = string
}