File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# ############
2- # # NETWORK ##
2+ # # ROUTING ##
33# ############
4+ resource "stackit_routing_table" "this" {
5+ count = var. network_area_id != null ? 1 : 0
6+ organization_id = var. organization_id
7+ network_area_id = var. network_area_id
8+ name = var. naming_pattern
9+ system_routes = false
10+
11+ labels = local. labels
12+ }
13+
14+ resource "stackit_routing_table_route" "this" {
15+ count = var. network_area_id != null ? 1 : 0
16+ routing_table_id = stackit_routing_table. this [0 ]. routing_table_id
17+
18+ organization_id = var. organization_id
19+ network_area_id = var. network_area_id
20+
21+ destination = {
22+ type = " cidrv4"
23+ value = " 0.0.0.0/0"
24+ }
25+
26+ next_hop = {
27+ type = " ipv4"
28+ value = var.firewall_next_hop_ip
29+ }
430
31+ labels = local. labels
32+ }
33+
34+ # ############
35+ # # NETWORK ##
36+ # ############
537resource "stackit_network" "this" {
6- count = var. network_area_id != null ? 1 : 0
38+ count = var. network_area_id != null ? 1 : 0
39+ project_id = stackit_resourcemanager_project. this . project_id
740
8- project_id = stackit_resourcemanager_project. this . project_id
941 name = " ${ var . naming_pattern } -routed"
1042 ipv4_prefix_length = var. network_prefix_length
1143 routed = true
12- }
44+ ipv4_nameservers = var. ipv4_nameservers
45+ routing_table_id = stackit_routing_table. this [0 ]. routing_table_id
46+
47+ labels = local. labels
48+ }
Original file line number Diff line number Diff line change 1+ variable "organization_id" {
2+ type = string
3+ description = " Container ID of the root organization."
4+ }
5+
16variable "custom_roles" {
27 type = list (object ({
38 name = string
@@ -53,4 +58,16 @@ variable "role_assignments" {
5358 }))
5459 description = " List of role assignments for the project. Subject can be a user email or service account email."
5560 default = []
61+ }
62+
63+ variable "firewall_next_hop_ip" {
64+ type = string
65+ description = " IP address of the firewall next hop."
66+ default = null
67+ }
68+
69+ variable "ipv4_nameservers" {
70+ type = list (string )
71+ description = " List of IPv4 nameservers for the network."
72+ default = null
5673}
You can’t perform that action at this time.
0 commit comments