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:
commit
682694ee66
2 changed files with 13 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue