Skip to content

Commit 3daf068

Browse files
authored
Promote DRG to top level module (#92)
* WIP - feat: add support for private DNS * WIP - feat promote DRG to top-level module * drg submoduled exported to a new top level module
1 parent d40583e commit 3daf068

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+126
-1407
lines changed

CHANGELOG.adoc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@ Given a version number MAJOR.MINOR.PATCH:
1414
- MINOR version when adding functionality in a backwards compatible manner,
1515
- PATCH version when making backwards compatible bug fixes.
1616
17-
== 3.3.0 (unreleased)
17+
== 4.0.0 (not released)
18+
* removed DRG submodule, now promoted to terraform-oci-drg module (feat: )
19+
* updated examples to use GitHub repo as source ()
20+
21+
== 3.4.0 (March 27, 2022)
22+
* Replaced required provider hashicorp/oci --> oracle/oci
23+
24+
== 3.3.0 (March 18, 2022)
1825
* Added support for Defined Tags (fixes #73)
26+
* Fixed route tables with drg destination (fixes #80)
1927

2028
== v3.2.0 (January 19, 2022)
2129

CONTRIBUTORS.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
_maintainers have admin access and can merge code to main_
66

77
- https://github.com/hyder[@hyder]
8-
- https://github.com/markxnelson[@markxnelson]
8+
- https://github.com/snafuz[@snafuz]
99

1010
=== CONTRIBUTORS
1111

README.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ It creates the following resources:
4040
* An optional internet gateway and a route table
4141
* An optional NAT gateway and a route table
4242
* An optional service gateway
43-
* An optional dynamic routing gateway _[Deprecated; use the [drg submodule](modules/drg/README.md) instead]_
44-
* An optional remote peering connection _[Deprecated; use the [drg submodule](modules/drg/README.md) instead]_
4543
* One or more optional Local Peering Gateways in requestor or acceptor mode, and possibilities to associate a Route Table
4644
4745
It also controls the Default Security List, with a *Lockdown mode* that can be enabled or disabled

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ It creates the following resources:
88
* An optional internet gateway and a route table
99
* An optional NAT gateway
1010
* An optional service gateway
11-
* An optional dynamic routing gateway _[Deprecated; use [drg submodule](modules/drg/README.md) instead]_
12-
* An optional remote peering connection _[Deprecated; use [drg submodule](modules/drg/README.md) instead]_
1311
* One or more optional Local Peering Gateways in requestor or acceptor mode, and possibilities to associate a Route Table
1412

1513
It also controls the Default Security List, with a *Lockdown mode* that can be enabled or disabled.

docs/quickstart.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ variable "user_id" {
100100
* `create_nat_gateway`
101101
* `create_service_gateway`
102102
* `freeform_tags`
103+
* `attached_drg_id`
103104

104105
. Run Terraform:
105106

@@ -164,11 +165,12 @@ cp terraform.tfvars.example terraform.tfvars
164165

165166
. Optional parameters to override:
166167

167-
* `create_drg`
168+
* `attached_drg_id`
168169
* `create_internet_gateway`
169170
* `create_nat_gateway`
170171
* `create_service_gateway`
171172
* `freeform_tags`
173+
* `defined_tags`
172174

173175
. Run Terraform:
174176
+

docs/routing_rules.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ They share the same schema but each Input Variable controls the associated route
8282

8383
For routing rules targeting a Gateway created by the module, `network_entity_id` accepts some special strings to automatically retrieve the gateway ocid.
8484

85-
- `internet_gateway_route_rules` and `nat_gateway_route_rules` recognise the `"drg"` string and resolve it to the DRG ocid created by the module,
85+
- `internet_gateway_route_rules` and `nat_gateway_route_rules` recognise the `"drg"` string and resolve it to the DRG ocid attached to the module (if available),
8686
- `internet_gateway_route_rules` recognise the `"internet_gateway"` string and resolve it to the Internet Gateway ocid created by the module,
8787
- `nat_gateway_route_rules` recognise the `"nat_gateway"` string and resolve it to the NAT Gateway ocid created by the module.
8888

docs/terraformoptions.adoc

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ defined_tags = {
8888
|Type
8989
|Default
9090

91-
|`create_drg`
92-
|Deprecated: Use drg sub-module instead. whether to create Dynamic Routing Gateway. If set to true, creates a Dynamic Routing Gateway.
93-
|`boolean`
94-
|false
91+
|`attached_drg_id`
92+
|DRG OCID to be attached to the VCN.
93+
|`string`
94+
|null
9595

9696
|`create_internet_gateway`
9797
|Whether to create an internet gateway.
@@ -108,11 +108,6 @@ defined_tags = {
108108
|`boolean`
109109
|false
110110

111-
|`drg_display_name`
112-
|Deprecated: Use drg sub-module instead. (Updatable) Name of Dynamic Routing Gateway. Does not have to be unique.
113-
|`string`
114-
|"drg"
115-
116111
|`enable_ipv6`
117112
|(Updatable) Whether IPv6 is enabled for the VCN. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block.
118113
|`boolean`

examples/custom_route_rules/.terraform.lock.hcl

Lines changed: 0 additions & 44 deletions
This file was deleted.

examples/custom_route_rules/main.tf

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ terraform {
1717

1818
module "vcn" {
1919

20-
source = "../../"
20+
source = "github.com/oracle-terraform-modules/terraform-oci-vcn"
2121
# to use the terraform registry version comment the previous line and uncomment the 2 lines below
2222
# source = "oracle-terraform-modules/vcn/oci"
2323
# version = "specify_version_number"
@@ -29,7 +29,6 @@ module "vcn" {
2929
defined_tags = var.defined_tags
3030

3131
# vcn parameters
32-
create_drg = var.create_drg # boolean: true or false
3332
create_internet_gateway = var.create_internet_gateway # boolean: true or false
3433
lockdown_default_seclist = var.lockdown_default_seclist # boolean: true or false
3534
create_nat_gateway = var.create_nat_gateway # boolean: true or false
@@ -40,10 +39,10 @@ module "vcn" {
4039
vcn_name = var.vcn_name
4140

4241
# gateways parameters
43-
drg_display_name = var.drg_display_name
4442
internet_gateway_display_name = var.internet_gateway_display_name
4543
nat_gateway_display_name = var.nat_gateway_display_name
4644
service_gateway_display_name = var.service_gateway_display_name
45+
attached_drg_id = var.attached_drg_id
4746

4847
# routing rules
4948

@@ -63,7 +62,6 @@ resource "oci_core_local_peering_gateway" "lpg" {
6362
output "module_vcn" {
6463
description = "vcn and gateways information"
6564
value = {
66-
drg_id = module.vcn.drg_id
6765
internet_gateway_id = module.vcn.internet_gateway_id
6866
nat_gateway_id = module.vcn.nat_gateway_id
6967
service_gateway_id = module.vcn.service_gateway_id

examples/custom_route_rules/terraform.tfvars.example

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ label_prefix = "dev"
2121

2222
# vcn parameters
2323

24-
create_drg = false
2524

2625
create_internet_gateway = false
2726

@@ -37,6 +36,8 @@ vcn_dns_label = "vcn"
3736

3837
vcn_name = "vcn"
3938

39+
attached_drg_id = "ocid1.drg.oc1.aaaaaa" # edit this OCID
40+
4041
freeform_tags = {
4142
environment = "dev"
4243
lob = "finance"
@@ -53,13 +54,13 @@ internet_gateway_route_rules = [ # this module input shows how to pass routing i
5354
destination = "192.168.0.0/16" # Route Rule Destination CIDR
5455
destination_type = "CIDR_BLOCK" # only CIDR_BLOCK is supported at the moment
5556
network_entity_id = "drg" # for internet_gateway_route_rules input variable, you can use special strings "drg", "internet_gateway" or pass a valid OCID using string or any Named Values
56-
description = "Terraformed - User added Routing Rule: To drg created by this module. drg_id is automatically retrieved with keyword drg"
57+
description = "Terraformed - User added Routing Rule: To drg provided to this module. drg_id, if available, is automatically retrieved with keyword drg"
5758
},
5859
{
5960
destination = "172.16.0.0/16"
6061
destination_type = "CIDR_BLOCK"
6162
network_entity_id = "drg"
62-
description = "Terraformed - User added Routing Rule: To drg created by this module. drg_id is automatically retrieved with keyword drg"
63+
description = "Terraformed - User added Routing Rule: To drg provided to this module. drg_id, if available, is automatically retrieved with keyword drg"
6364
},
6465
{
6566
destination = "203.0.113.0/24" # rfc5737 (TEST-NET-3)

0 commit comments

Comments
 (0)