forked from oracle-quickstart/oci-arch-web-ha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroute_tables.tf
34 lines (31 loc) · 1.38 KB
/
route_tables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## Copyright © 2020, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
# Create route table to connect vcn to internet gateway
resource "oci_core_route_table" "rt-pub" {
compartment_id = var.compartment_ocid
vcn_id = oci_core_virtual_network.vcn.id
display_name = "rt-table-pub"
route_rules {
destination = "0.0.0.0/0"
destination_type = "CIDR_BLOCK"
network_entity_id = oci_core_internet_gateway.ig.id
}
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
lifecycle {
ignore_changes = [ defined_tags["Oracle-Tags.CreatedBy"], defined_tags["Oracle-Tags.CreatedOn"] ]
}
}
resource "oci_core_route_table" "rt-priv" {
compartment_id = var.compartment_ocid
vcn_id = oci_core_virtual_network.vcn.id
display_name = "rt-table-priv"
route_rules {
destination = "0.0.0.0/0"
destination_type = "CIDR_BLOCK"
network_entity_id = oci_core_nat_gateway.nat_gw.id
}
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
lifecycle {
ignore_changes = [ defined_tags["Oracle-Tags.CreatedBy"], defined_tags["Oracle-Tags.CreatedOn"] ]
}
}