mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
feat(oci private network): add igw
This commit is contained in:
parent
fea4a43dcc
commit
90ed8be56b
2 changed files with 22 additions and 3 deletions
|
|
@ -1,13 +1,19 @@
|
||||||
|
|
||||||
resource "oci_core_default_route_table" "this" {
|
resource "oci_core_default_route_table" "this" {
|
||||||
manage_default_resource_id = oci_core_vcn.this.default_route_table_id
|
manage_default_resource_id = local.vcn.default_route_table_id
|
||||||
|
|
||||||
display_name = oci_core_vcn.this.display_name
|
display_name = oci_core_vcn.this.display_name
|
||||||
|
|
||||||
route_rules {
|
route_rules {
|
||||||
network_entity_id = oci_core_internet_gateway.this.id
|
network_entity_id = local.igw.id
|
||||||
|
|
||||||
description = "Default route"
|
description = "Internet v4"
|
||||||
destination = "0.0.0.0/0"
|
destination = "0.0.0.0/0"
|
||||||
}
|
}
|
||||||
|
route_rules {
|
||||||
|
network_entity_id = local.igw.id
|
||||||
|
|
||||||
|
description = "Internet v6"
|
||||||
|
destination = "::/0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
13
tf/oci_common_private_network/internet_gateway.tf
Normal file
13
tf/oci_common_private_network/internet_gateway.tf
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
resource "oci_core_internet_gateway" "this" {
|
||||||
|
display_name = "internet"
|
||||||
|
compartment_id = var.tenancy_ocid
|
||||||
|
vcn_id = local.vcn.id
|
||||||
|
}
|
||||||
|
|
||||||
|
locals {
|
||||||
|
igw = oci_core_internet_gateway.this
|
||||||
|
}
|
||||||
|
|
||||||
|
output "internet_gateway_id" {
|
||||||
|
value = local.igw.id
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue