Variabilize GCE region and zone, only use hostname for cloud, not hostname+target

This commit is contained in:
Samuel Aubertin
2025-04-27 16:43:03 +02:00
parent 6603cc9518
commit ba48937b12
2 changed files with 14 additions and 8 deletions

View File

@@ -37,7 +37,7 @@ endef
define OPACK_INSTALL_CLOUD_CONTENT =
Choose your keyboard layout = fr
System hostname = $(OPACK_SYS_HOSTNAME)-$(OPACK_TARGET)
System hostname = $(OPACK_SYS_HOSTNAME)
Which network interface = vio0
IPv4 address for vio0 = dhcp
IPv6 address for vio0 = none
@@ -91,10 +91,10 @@ endef
define OPACK_TERRAFORM_CONTENT =
variable "credentials" { default = "../$(OPACK_GCE_JSON_KEY)" }
variable "project" { default = "$(OPACK_GCE_PROJECT)" }
variable "region" { default = "europe-west4" }
variable "zone" { default = "europe-west4-b" }
variable "credentials" { default = "../$(OPACK_GCE_JSON_KEY)" }
variable "project" { default = "$(OPACK_GCE_PROJECT)" }
variable "region" { default = "$(OPACK_GCE_REGION)" }
variable "zone" { default = "$(OPACK_GCE_ZONE)" }
provider "google" {
region = "$${var.region}"
@@ -125,7 +125,7 @@ resource "google_compute_instance" "$(OPACK_TARGET)" {
zone = "$${var.gce_zone}"
boot_disk {
initialize_params {
image = "openbsd"
image = "openbsd"
}
}
network_interface {