fix: the root CA is created by the server, an offline CA or a Simple CA service, chosen at setup; the shell can stay open in a tab of its own, the Docker page is offered only with Docker, and the test scripts are in bin/.
Release / release (push) Failing after 14m20s

This commit is contained in:
slawek committed 2026-11-23 06:45:23 +01:00
1 parent ff0c93ed73
commit a649331aa2
49 files changed
+1597 -637

No files matched your search

+4 -3
View File
@@ -3,7 +3,7 @@ data "http" "repo_gpg_key" {
}
locals {
supply_pki = var.root_cert_file != ""
supply_pki = var.simple_ca_url != ""
cloud_init_vars = {
hostname = var.name
@@ -11,6 +11,7 @@ locals {
repo_url = var.repo_url
repo_gpg_key = data.http.repo_gpg_key.response_body
ubuntu_codename = var.ubuntu_codename
trusted_cas = [for path in var.trusted_ca_files : file(path)]
# Contents of /etc/linux-manager/linux-manager.json.
config = {
@@ -104,8 +105,8 @@ resource "azurerm_linux_virtual_machine" "router" {
custom_data = base64encode(
local.supply_pki
? templatefile("${path.module}/../cloud-init-with-pki.yaml.tpl", merge(local.cloud_init_vars, {
root_cert = file(var.root_cert_file)
root_key = var.root_key_file != "" ? file(var.root_key_file) : ""
config = merge(local.cloud_init_vars.config, { pki = { root = "simple-ca", simple_ca_url = var.simple_ca_url } })
setup_code = var.simple_ca_setup_code
}))
: templatefile("${path.module}/../cloud-init.yaml.tpl", local.cloud_init_vars)
)
+15 -9
View File
@@ -32,7 +32,7 @@ variable "admin_username" {
}
variable "admin_password" {
description = "Admin password for the server VM. SSH key auth is always configured; leaving this empty additionally disables password authentication, setting it enables password auth alongside the key."
description = "Admin password for the server VM, accepted alongside the SSH key; empty disables password authentication."
type = string
default = ""
sensitive = true
@@ -50,7 +50,7 @@ variable "local_fqdn" {
}
variable "dns_zone_id" {
description = "Resource ID of an existing Azure DNS zone to create local_fqdn's A record in, pointing at the server's public IP. local_fqdn must be a name within that zone. Leave null to skip - local_fqdn is then just a label with nothing making it resolve."
description = "Resource ID of an existing Azure DNS zone, holding local_fqdn, to create local_fqdn's A record in, pointing at the server's public IP; null for no record."
type = string
nullable = true
default = null
@@ -63,7 +63,7 @@ variable "local_id_mode" {
}
variable "local_cidrs" {
description = "Local subnet CIDR(s) advertised into the site-to-site tunnel. Should include the workload subnet CIDR."
description = "Local subnet CIDR(s) advertised into the site-to-site tunnel, the workload subnet CIDR among them."
type = string
}
@@ -100,14 +100,20 @@ variable "p2s_address_pool" {
default = ""
}
variable "root_cert_file" {
description = "Path to an existing root CA certificate PEM to supply instead of letting the package create one. Leave empty to create one."
variable "simple_ca_url" {
description = "The https:// URL of the Simple CA service that signs the router's issuing CAs; empty for a root the package creates."
type = string
default = ""
}
variable "root_key_file" {
description = "Path to the private key PEM of root_cert_file. Leave empty to keep the root offline: the issuing CAs then wait for certificates signed elsewhere."
variable "trusted_ca_files" {
description = "Paths to PEM certificates of CAs added to the server's system trust store."
type = list(string)
default = []
}
variable "simple_ca_setup_code" {
description = "The one-time setup code of a sign-ca token of the Simple CA issuing CA, valid until the router's first boot."
type = string
default = ""
sensitive = true
@@ -132,7 +138,7 @@ variable "wireguard_listen_port" {
}
variable "deploy_workload_vm" {
description = "Deploy a bare VM on the workload subnet, for manually verifying routing through the server."
description = "Deploy a bare VM on the workload subnet."
type = bool
default = false
}
@@ -144,7 +150,7 @@ variable "repo_url" {
}
variable "ubuntu_codename" {
description = "Ubuntu release codename of the server VM's image, used to select the apt repo component."
description = "Ubuntu release codename of the server VM's image, the apt repository's distribution."
type = string
default = "resolute"
}