opack-cloud documenation, and image deletion on clean

This commit is contained in:
Samuel Aubertin
2023-09-26 09:51:47 +02:00
parent 17474fcab4
commit dee53a0349
5 changed files with 88 additions and 39 deletions

View File

@@ -102,9 +102,14 @@ provider "google" {
project = "$${var.project}"
}
module "OPENBSD" {
source = "./module"
module "opack-module" {
source = "./opack-module"
gce_zone = "$${var.zone}"
servers = 1
}
output "ip" {
value = module.opack-module.nat_ip
}
endef
@@ -136,5 +141,17 @@ resource "google_compute_instance" "$(OPACK_TARGET)" {
}
}
output "nat_ip" {
value = google_compute_instance.$(OPACK_TARGET)[*].network_interface[0].access_config[0].nat_ip
}
endef
define OPACK_TERRAFORM_IMPORT_CONTENT =
resource "google_compute_image" "$(OPACK_TARGET)" {
# name = "$(OPACK_TARGET)"
}
endef