Skip to content

Commit 6778e5c

Browse files
feat: allow configuring IPv6 (#5)
1 parent 45aad65 commit 6778e5c

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

main.tf

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,20 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "firezone" {
2323
network_security_group_id = var.network_security_group_id
2424

2525
ip_configuration {
26-
name = "internal"
26+
name = "internal-ipv4"
2727
primary = true
2828
subnet_id = var.private_subnet
29+
version = "IPv4"
30+
}
31+
32+
dynamic "ip_configuration" {
33+
for_each = var.private_subnet_ipv6 != null ? [1] : []
34+
content {
35+
name = "internal-ipv6"
36+
primary = false
37+
subnet_id = var.private_subnet_ipv6
38+
version = "IPv6"
39+
}
2940
}
3041
}
3142

variables.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,16 @@ variable "firezone_api_url" {
7373
}
7474

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

80+
variable "private_subnet_ipv6" {
81+
description = "The private IPv6 subnet ID"
82+
type = string
83+
default = null
84+
}
85+
8086
variable "network_security_group_id" {
8187
description = "The network security group id to attach to the instances"
8288
type = string

0 commit comments

Comments
 (0)