Skip to content

Commit

Permalink
Merge branch 'dev-route-tables-fix' into 'main'
Browse files Browse the repository at this point in the history
Dev route tables fix

See merge request nace-shared-services/terraform-oci-cis-landing-zone-networking!5
  • Loading branch information
cosmindev committed Nov 15, 2023
2 parents 5635015 + 5bf7d1a commit 1fdec6a
Show file tree
Hide file tree
Showing 99 changed files with 3,243 additions and 621 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,23 @@ The ```network_configuration``` is a multidimensional complex object:
- ```vcns``` defines any number of VCNs to be created for this category.will enable one to specify any number of vcns he wants to create under one category. Each ```vcn``` can have any number of:
- ```security_lists```,
- ```route_tables```,
- For route rules we support the following:
- ```destination``` supported values:
- ```a cidr block```
- ```objectstorage``` or ```all-services``` - only for ```SERVICE_CIDR_BLOCK```
- ```destination_type``` supported values:
- ```CIDR_BLOCK```
- ```SERVICE_CIDR_BLOCK``` - only for SGW
- ```dhcp_options```,
- ```subnets```,
- ```network_security_groups``` and
- ```vcn_specific_gateways``` like:
- ```internet_gateways```,
- ```nat_gateways```,
- ```service_gateways``` and
- ```service_gateways```
- SGW services value:
- ```objectstorage``` - for object storage access
- ```all-services``` - for all OCI internal network services access
- ```local_peering_gateways```.
- All the resources of a ```vcn``` (including the VCN) are created from scratch. To refer to a resource a key is used to refer to the related resource. Here is an example for specifying a security list, attached to a subnet:

Expand Down Expand Up @@ -179,13 +189,23 @@ The ```network_configuration``` is a multidimensional complex object:
- Any number these attributes can be specified:
- ```security_lists```,
- ```route_tables```,
- For route rules we support the following:
- ```destination``` supported values:
- ```a cidr block```
- ```objectstorage``` or ```all-services``` - only for ```SERVICE_CIDR_BLOCK```
- ```destination_type``` supported values:
- ```CIDR_BLOCK```
- ```SERVICE_CIDR_BLOCK``` - only for SGW
- ```dhcp_options```,
- ```subnets```,
- ```network_security_groups``` and
- ```vcn_specific_gateways``` like:
- ```internet_gateways```,
- ```nat_gateways```,
- ```service_gateways``` or
- ```service_gateways```
- SGW services value:
- ```objectstorage``` - for object storage access
- ```all-services``` - for all OCI internal network services access
- ```local_peering_gateways```.
- To refer a resource within a resource, the following options are available:
1. To use the referend object key when the refered object was created as part of the same automation.
Expand Down
9 changes: 9 additions & 0 deletions cross-connect-groups.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# ####################################################################################################### #
# Copyright (c) 2023 Oracle and/or its affiliates, All rights reserved. #
# Licensed under the Universal Permissive License v 1.0 as shown at https: //oss.oracle.com/licenses/upl. #
# Author: Cosmin Tudor #
# Author email: cosmin.tudor@oracle.com #
# Last Modified: Wed Nov 15 2023 #
# Modified by: Cosmin Tudor, email: cosmin.tudor@oracle.com #
# ####################################################################################################### #

locals {
one_dimension_cross_connect_groups = local.one_dimension_processed_non_vcn_specific_gateways != null ? {
for flat_ccg in flatten([
Expand Down
9 changes: 9 additions & 0 deletions cross-connects.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# ####################################################################################################### #
# Copyright (c) 2023 Oracle and/or its affiliates, All rights reserved. #
# Licensed under the Universal Permissive License v 1.0 as shown at https: //oss.oracle.com/licenses/upl. #
# Author: Cosmin Tudor #
# Author email: cosmin.tudor@oracle.com #
# Last Modified: Wed Nov 15 2023 #
# Modified by: Cosmin Tudor, email: cosmin.tudor@oracle.com #
# ####################################################################################################### #

locals {
one_dimension_cross_connects = local.one_dimension_cross_connect_groups != null ? {
for flat_cc in flatten([
Expand Down
10 changes: 8 additions & 2 deletions customer-premises-equipments.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Copyright (c) 2023, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
# ####################################################################################################### #
# Copyright (c) 2023 Oracle and/or its affiliates, All rights reserved. #
# Licensed under the Universal Permissive License v 1.0 as shown at https: //oss.oracle.com/licenses/upl. #
# Author: Cosmin Tudor #
# Author email: cosmin.tudor@oracle.com #
# Last Modified: Wed Nov 15 2023 #
# Modified by: Cosmin Tudor, email: cosmin.tudor@oracle.com #
# ####################################################################################################### #

data "oci_core_cpe_device_shapes" "cpe_device_shapes" {
}
Expand Down
10 changes: 8 additions & 2 deletions data_sources.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Copyright (c) 2022, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
# ####################################################################################################### #
# Copyright (c) 2023 Oracle and/or its affiliates, All rights reserved. #
# Licensed under the Universal Permissive License v 1.0 as shown at https: //oss.oracle.com/licenses/upl. #
# Author: Cosmin Tudor #
# Author email: cosmin.tudor@oracle.com #
# Last Modified: Wed Nov 15 2023 #
# Modified by: Cosmin Tudor, email: cosmin.tudor@oracle.com #
# ####################################################################################################### #

data "oci_core_vcn" "existing_vcns" {
for_each = local.aux_one_dimension_processed_existing_vcns
Expand Down
13 changes: 11 additions & 2 deletions default_dhcp_options.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# ####################################################################################################### #
# Copyright (c) 2023 Oracle and/or its affiliates, All rights reserved. #
# Licensed under the Universal Permissive License v 1.0 as shown at https: //oss.oracle.com/licenses/upl. #
# Author: Cosmin Tudor #
# Author email: cosmin.tudor@oracle.com #
# Last Modified: Wed Nov 15 2023 #
# Modified by: Cosmin Tudor, email: cosmin.tudor@oracle.com #
# ####################################################################################################### #

locals {
one_dimension_processed_default_dhcp_options = local.one_dimension_processed_vcns != null ? {
for flat_default_dhcp_option in flatten([
Expand Down Expand Up @@ -43,8 +52,8 @@ locals {
options = vcn_value.default_dhcp_options.options
network_configuration_category = vcn_value.network_configuration_category
vcn_key = vcn_key
vcn_id = oci_core_vcn.these[vcn_key].id
vcn_name = vcn_value.display_name
vcn_id = vcn_value.vcn_id
vcn_name = vcn_value.vcn_name
dhcp_option_key = "CUSTOM-DEFAULT-DHCP-OPTIONS-${vcn_key}"
}
] if vcn_value.default_dhcp_options != null
Expand Down
Loading

0 comments on commit 1fdec6a

Please sign in to comment.