5
5
# File Version: 0.8.0
6
6
7
7
# Dependencies:
8
- # - module- defaults.tf file
8
+ # - defaults.tf file
9
9
# - local.create_new_vcn
10
10
# - local.create_subnets
11
11
# - local.resolved_vcn_compartment_ocid
12
12
# - local.subnets
13
13
# - local.route_tables
14
14
# - local.security_lists
15
+ # - terraform-oci-networking module
15
16
16
17
# ###############################################################################
17
18
#
23
24
# Module: Virtual Cloud Network (VCN)
24
25
# ###############################################################################
25
26
module "vcn" {
26
- source = " ./modules/ oci-networking/modules/vcn"
27
+ source = " github.com/oracle-quickstart/terraform- oci-networking// modules/vcn?ref=0.2.0 "
27
28
28
29
# Oracle Cloud Infrastructure Tenancy and Compartment OCID
29
30
compartment_ocid = local. vcn_compartment_ocid
@@ -46,7 +47,7 @@ module "vcn" {
46
47
# ###############################################################################
47
48
module "subnets" {
48
49
for_each = { for map in local . subnets : map . subnet_name => map }
49
- source = " ./modules/ oci-networking/modules/subnet"
50
+ source = " github.com/oracle-quickstart/terraform- oci-networking// modules/subnet?ref=0.2.0 "
50
51
51
52
# Oracle Cloud Infrastructure Tenancy and Compartment OCID
52
53
compartment_ocid = local. vcn_compartment_ocid
@@ -73,7 +74,7 @@ module "subnets" {
73
74
# Module: Gateways
74
75
# ###############################################################################
75
76
module "gateways" {
76
- source = " ./modules/ oci-networking/modules/gateways"
77
+ source = " github.com/oracle-quickstart/terraform- oci-networking// modules/gateways?ref=0.2.0 "
77
78
78
79
# Oracle Cloud Infrastructure Tenancy and Compartment OCID
79
80
compartment_ocid = local. vcn_compartment_ocid
@@ -107,7 +108,7 @@ module "gateways" {
107
108
# ###############################################################################
108
109
module "route_tables" {
109
110
for_each = { for map in local . route_tables : map . route_table_name => map }
110
- source = " ./modules/ oci-networking/modules/route_table"
111
+ source = " github.com/oracle-quickstart/terraform- oci-networking// modules/route_table?ref=0.2.0 "
111
112
112
113
# Oracle Cloud Infrastructure Tenancy and Compartment OCID
113
114
compartment_ocid = local. vcn_compartment_ocid
@@ -128,7 +129,7 @@ module "route_tables" {
128
129
# ###############################################################################
129
130
module "security_lists" {
130
131
for_each = { for map in local . security_lists : map . security_list_name => map }
131
- source = " ./modules/ oci-networking/modules/security_list"
132
+ source = " github.com/oracle-quickstart/terraform- oci-networking// modules/security_list?ref=0.2.0 "
132
133
133
134
# Oracle Cloud Infrastructure Tenancy and Compartment OCID
134
135
compartment_ocid = local. vcn_compartment_ocid
@@ -145,35 +146,6 @@ module "security_lists" {
145
146
ingress_security_rules = each. value . ingress_security_rules
146
147
}
147
148
148
- # ###############################################################################
149
- # OCI Network - VCN Variables
150
- # ###############################################################################
151
- variable "create_new_vcn" {
152
- default = true
153
- description = " Creates a new Virtual Cloud Network (VCN). If false, the VCN must be provided in the variable 'existent_vcn_ocid'."
154
- }
155
- variable "existent_vcn_ocid" {
156
- default = " "
157
- description = " Using existent Virtual Cloud Network (VCN) OCID."
158
- }
159
- variable "existent_vcn_compartment_ocid" {
160
- default = " "
161
- description = " Compartment OCID for existent Virtual Cloud Network (VCN)."
162
- }
163
- variable "vcn_cidr_blocks" {
164
- default = " 10.20.0.0/16"
165
- description = " IPv4 CIDR Blocks for the Virtual Cloud Network (VCN). If use more than one block, separate them with comma. e.g.: 10.20.0.0/16,10.80.0.0/16. If you plan to peer this VCN with another VCN, the VCNs must not have overlapping CIDRs."
166
- }
167
- variable "is_ipv6enabled" {
168
- default = false
169
- description = " Whether IPv6 is enabled for the Virtual Cloud Network (VCN)."
170
- }
171
- variable "ipv6private_cidr_blocks" {
172
- default = []
173
- description = " The list of one or more ULA or Private IPv6 CIDR blocks for the Virtual Cloud Network (VCN)."
174
- }
175
-
176
149
locals {
177
- vcn_cidr_blocks = split (" ," , var. vcn_cidr_blocks )
178
150
vcn_compartment_ocid = var. create_new_vcn ? local. resolved_vcn_compartment_ocid : var. existent_vcn_compartment_ocid
179
151
}
0 commit comments