Skip to content

Commit aeb8e09

Browse files
committed
Make login instance non public in incus example
1 parent 3bfdf3f commit aeb8e09

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

examples/incus/main.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,16 @@ module "incus" {
1313

1414
instances = {
1515
mgmt = { type = "container", cpus = 4, ram = 6000, gpus = 0, tags = ["puppet", "mgmt", "nfs"], count = 1 }
16-
login = { type = "container", cpus = 2, ram = 3000, gpus = 0, tags = ["login", "public", "proxy"], count = 1 }
16+
login = { type = "container", cpus = 2, ram = 3000, gpus = 0, tags = ["login", "proxy"], count = 1 }
1717
node = { type = "container", cpus = 2, ram = 3000, gpus = 0, tags = ["node"], count = 1 }
1818
}
1919

20+
firewall_rules = {
21+
http = { "from_port" = 80, "to_port" = 80, tag = "proxy", "cidr" = "0.0.0.0/0" },
22+
https = { "from_port" = 443, "to_port" = 443, tag = "proxy", "cidr" = "0.0.0.0/0" },
23+
}
24+
bastion_tags = ["login"]
25+
2026
volumes = {}
2127

2228
public_keys = []

incus/infrastructure.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ locals {
153153

154154
post_inventory = { for host, values in local.inventory :
155155
host => merge(values, {
156-
local_ip = try(incus_instance.instances[host].ipv4_address, "")
157-
public_ip = try(incus_instance.instances[host].ipv4_address, "")
156+
local_ip = incus_instance.instances[host].ipv4_address,
157+
public_ip = incus_instance.instances[host].ipv4_address,
158158
})
159159
}
160160

0 commit comments

Comments
 (0)