Skip to content

Commit

Permalink
garm: introduce vm_location param
Browse files Browse the repository at this point in the history
the current location (eastus) will only support SEV-SNP and nestable
instances, if we want to support TDX runners, we have to move to a
region that supports all three of them: westeurope is one of those
regions.

Since we don't want to invalidate all the urls in the github webhook
configurations when moving to another location (garm urls are bound
to a location), a discrete `vm_location` param has been introduced that
configures GARM to spawn Runners in that region.

Signed-off-by: Magnus Kulke <magnuskulke@microsoft.com>
  • Loading branch information
mkulke committed Feb 1, 2024
1 parent 3ac177c commit beaabde
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
location = "{{ env['LOCATION'] }}"
location = "{{ env['VM_LOCATION'] }}"

[credentials]
subscription_id = "{{ env['SUBSCRIPTION_ID'] }}"
Expand Down
2 changes: 1 addition & 1 deletion github/azure-self-hosted-runners/tf/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ resource "azurerm_container_group" "garm_aci" {
GARM_HOSTNAME = local.fqdn
SUBSCRIPTION_ID = data.azurerm_subscription.current.subscription_id
AZURE_CLIENT_ID = azurerm_user_assigned_identity.garm_id.client_id
LOCATION = var.location
VM_LOCATION = var.vm_location
}

secure_environment_variables = {
Expand Down
6 changes: 6 additions & 0 deletions github/azure-self-hosted-runners/tf/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ variable "location" {
description = "Location for all resources"
}

variable "vm_location" {
type = string
default = "westeurope"
description = "Location for the runner VMs"
}

variable "garm_image" {
type = string
default = "ghcr.io/confidential-containers/garm:main"
Expand Down

0 comments on commit beaabde

Please sign in to comment.