Skip to content

Commit 2ec24ad

Browse files
fix: allow passing an IPv6 prefix (#10)
The IPv6 support we have added in #5 is broken. IPv6 must be configured on the VM instances directly. To do so, we allow passing an IPv6 prefix id that the individual VMs can then allocate from.
1 parent cfa2242 commit 2ec24ad

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

main.tf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,18 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "firezone" {
3030
}
3131

3232
dynamic "ip_configuration" {
33-
for_each = var.private_subnet_ipv6 != null ? [1] : []
33+
for_each = var.public_ipv6_prefix != null ? [1] : []
3434
content {
3535
name = "internal-ipv6"
3636
primary = false
37-
subnet_id = var.private_subnet_ipv6
37+
subnet_id = var.private_subnet
3838
version = "IPv6"
39+
public_ip_address {
40+
name = "public-ipv6"
41+
version = "IPv6"
42+
public_ip_prefix_id = var.public_ipv6_prefix
43+
sku_name = "Standard_Regional"
44+
}
3945
}
4046
}
4147
}

variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ variable "firezone_api_url" {
7373
}
7474

7575
variable "private_subnet" {
76-
description = "The private IPv4 subnet ID"
76+
description = "The private subnet ID"
7777
type = string
7878
}
7979

80-
variable "private_subnet_ipv6" {
81-
description = "The private IPv6 subnet ID"
80+
variable "public_ipv6_prefix" {
81+
description = "The public IPv6 prefix to use"
8282
type = string
8383
default = null
8484
}

0 commit comments

Comments
 (0)