Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Revert "feat: add tokens for multi builder"
Browse files Browse the repository at this point in the history
NichArchA82 committed Oct 5, 2024
1 parent 6b9eee8 commit 6e91ec6
Showing 1 changed file with 3 additions and 31 deletions.
34 changes: 3 additions & 31 deletions hetzner.pkr.hcl
Original file line number Diff line number Diff line change
@@ -8,49 +8,21 @@ variable "glueops_codespaces_container_tag" {
type = string
}

variable "token_stage" {
default = env("HCLOUD_TOKEN_STAGE")
}

variable "token_prod" {
default = env("HCLOUD_TOKEN_PROD")
}

# Build the stage image
source "hcloud" "base-amd64-stage" {
source "hcloud" "base-amd64" {
image = var.base_image
location = "nbg1"
server_type = "cx11"
server_name = "packer-${var.glueops_codespaces_container_tag}"
ssh_username = "root"
snapshot_name = "${var.glueops_codespaces_container_tag}"
token = "${var.token_stage}"
snapshot_labels = {
base = var.base_image,
version = var.glueops_codespaces_container_tag
}
}

#Build the prod image
source "hcloud" "base-amd64-prod" {
image = var.base_image
location = "nbg1"
server_type = "cx11"
server_name = "packer-${var.glueops_codespaces_container_tag}"
ssh_username = "root"
snapshot_name = "${var.glueops_codespaces_container_tag}"
token = "${var.token_prod}"
snapshot_labels = {
base = var.base_image,
version = var.glueops_codespaces_container_tag
}
}

build {
sources = [
"source.hcloud.base-amd64-stage",
"source.hcloud.base-amd64-prod"
]
sources = ["source.hcloud.base-amd64"]
provisioner "shell" {
scripts = [
"os-setup-start.sh",
@@ -72,4 +44,4 @@ packer {
version = "1.6.0"
}
}
}
}

0 comments on commit 6e91ec6

Please sign in to comment.