feat(oci private network): add igw

This commit is contained in:
Kat Inskip 2024-06-09 12:52:31 -07:00
parent fea4a43dcc
commit 90ed8be56b
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
2 changed files with 22 additions and 3 deletions

View file

@ -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"
}
} }

View 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
}