Skip to content

Commit

Permalink
road to v3.0.0 (#55)
Browse files Browse the repository at this point in the history
- fix #24 gateway creation variables misnamed
- fix #54 rename freeform tag variable
- fix #30 #44 add display_name to gateways and drg attachment
- Fix #29 update main example 
  - Module cloning instruction now use Terraform Registry 
  - main example is now under its own folder, named module composition
- fix #56 add validation for custom display name for gateways (prevent empty strings)
- fix #57 change variable types for custom routes
  • Loading branch information
kral2 authored Sep 3, 2021
1 parent 9f081e6 commit f0c7569
Show file tree
Hide file tree
Showing 31 changed files with 452 additions and 263 deletions.
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If you are running into one of these scenarios, we recommend opening an issue in

### Terraform Version and Provider Version

<!--- Please run `terraform -v` to show the Terraform core version and provider version(s).
<!--- Please run `terraform -v` to show the Terraform core version and provider version(s).
If you are using a local copy of the Terraform Oracle Cloud Infrastructure Provider, run the plugin directly to get the version: `<path-to-plugin>/terraform-provider-oci`
If you are not running the latest version of Terraform or the provider, please upgrade because your issue may have already been fixed. [Terraform documentation on provider versioning](https://www.terraform.io/docs/configuration/providers.html#provider-versions). --->

Expand All @@ -43,8 +43,8 @@ If you are not running the latest version of Terraform or the provider, please u

```hcl
# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file.
# Please remove any sensitive information from configuration files before sharing them.
# please use a service like Dropbox and share a link to the ZIP file.
# Please remove any sensitive information from configuration files before sharing them.
```

### Debug Output
Expand All @@ -59,8 +59,8 @@ Github Gist: https://gist.github.com/

### Panic Output

<!---
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the `crash.log`.
<!---
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the `crash.log`.
Github Gist: https://gist.github.com/
--->
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ labels: enhancement
<!--- Information about code formatting: https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code --->

```hcl
# Copy-paste any Terraform configurations for how the requested feature may be used.
# Copy-paste any Terraform configurations for how the requested feature may be used.
```

### References
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Proposed change

<!---
<!---

Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add. Discussing the design upfront helps to ensure that we're ready to accept your work.

Expand Down
20 changes: 20 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,23 @@ Given a version number MAJOR.MINOR.PATCH:
=== Breaking changes
* Changed minimum Terraform version to 1.0.0 (fixes #49)
* Deprecated `vcn_cidr`, use `vcn_cidrs` instead (list of IPv4 CIDRs).
* [ ] Deprecated previous gateway creation variable names. We now use imperative style, see codingconventions (fixes #24)
* Deprecated previous gateway creation variable names. We now use imperative style, see codingconventions (fixes #24 and #54)

=== New features
* added support for local peering gateways (fixes #38)
* added support for multiple CIDR (fixes #21)
* [ ] added custom display name for gateways and drg attachment (fixes #30 and #44)
* added custom display name for gateways and drg attachment (fixes #30 and #44)

=== Changes
* added variable validation for gateway display names (fixes #56)
* `var.internet_gateway_route_rules` and `var.nat_gateway_route_rules` new type: `list(map(string))` instead of `list(object)` (backward compatible change)

=== Fixes
* Fixed description for var.local_peering_gateways (fixes #51)

=== Other minor changes
* Updated default tag values
* Updated all examples to use the new `vcn_cidrs` module Input Variable instead of the now deprecated `vcn_cidr`
* Updated all examples with new features and using Terraform Registry

== v2.3.0 (July 21, 2021)

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You should ensure that your documentation changes include the following:
- If your contribution provision new resources, update the README introduction section
- If your contribution adds any new variables, update xref:docs/terraformoptions.adoc[docs/terraformoptions] with the variable requirements
- Add your GitHub handler to xref:CONTRIBUTORS.adoc[CONTRIBUTORS] under the *CONTRIBUTORS* section
-
-
- Don't forget how important the documentation is, especially for examples: we would love it if you updated the `main.tf` and `variables.tf` in the `examples/` folder. A simple example is fine.
- You should also update the code examples in link:examples/README.md[examples/README]: it contains sample code blocks that probably needs to be updated to reflect your changes

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2019, 2020 Oracle and/or its affiliates.
Copyright (c) 2019, 2021 Oracle and/or its affiliates.

The Universal Permissive License (UPL), Version 1.0

Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ Learn how to {uri-contribute}[contribute].

Copyright &copy; 2019, 2021, Oracle and/or its associates.

Licensed under the {uri-license}[Universal Permissive License 1.0] as shown at
Licensed under the {uri-license}[Universal Permissive License 1.0] as shown at
{uri-canonical-license}[https://oss.oracle.com/licenses/upl].
2 changes: 1 addition & 1 deletion docs/prerequisites.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ toc::[]

== Install Terraform

Start by installing Terraform wth the proper package for your operating system and architecture.
Start by installing Terraform wth the proper package for your operating system and architecture.

=== Installing Terraform on Oracle Linux

Expand Down
22 changes: 11 additions & 11 deletions docs/quickstart.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

1. Git is installed
2. SSH client is installed
3. Terraform 0.12.24+ is installed
3. Terraform 1.0.0 or greater is installed

== Instructions

Expand Down Expand Up @@ -96,10 +96,10 @@ variable "user_id" {

. Optional parameters to override:

* `internet_gateway_enabled`
* `nat_gateway_enabled`
* `service_gateway_enabled`
* `tags`
* `create_internet_gateway`
* `create_nat_gateway`
* `create_service_gateway`
* `freeform_tags`

. Run Terraform:

Expand All @@ -119,7 +119,7 @@ You can also use the method below to reuse this in your own module.
+
[source, hcl]
----
include::../examples/variables.tf[lines=3..-1]
include::../examples/module_composition/variables.tf[lines=3..-1]
----

. Create a provider.tf file in your root directory and add the following:
Expand All @@ -139,7 +139,7 @@ provider "oci" {
+
[source,hcl]
----
include::../examples/main.tf[lines=3..-1]
include::../examples/module_composition/main.tf[lines=3..-1]
----

. Copy terraform.tfvars.example to terraform.tfvars and set the mandatory provider parameters:
Expand All @@ -165,10 +165,10 @@ cp terraform.tfvars.example terraform.tfvars
. Optional parameters to override:

* `create_drg`
* `internet_gateway_enabled`
* `nat_gateway_enabled`
* `service_gateway_enabled`
* `tags`
* `create_internet_gateway`
* `create_nat_gateway`
* `create_service_gateway`
* `freeform_tags`

. Run Terraform:
+
Expand Down
26 changes: 13 additions & 13 deletions docs/routing_rules.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ endif::[]

When you create an Internet or a NAT gateway, terraform-oci-vcn modules automatically creates a dedicated route table for each gateway.

- `<label_prefix>-internet-route` route table is created if `internet_gateway_enabled = true`
- `<label_prefix>-nat-route` route table is created if `nat_gateway_enabled = true`
- `<label_prefix>-internet-route` route table is created if `create_internet_gateway = true`
- `<label_prefix>-nat-route` route table is created if `create_nat_gateway = true`
These automatically created route tables comes with automatic rules, that cannot be controlled by the module user.

Expand All @@ -33,39 +33,39 @@ internet-route is meant to be attached to public subnets you provision. It comes

nat-route table is meant to be attached to private subnets you provision. It comes with one automatic/non-editable rule that redirects all unknown destination to the NAT Gateway created by this module: `0.0.0.0/0 --> NAT Gateway`.

If a Service Gateway is also created by the module with `service_gateway_enabled = true`, a second rule is added to redirect all Oracle Network Services traffic to the Service Gateway created by this module: `All <REGION> services in OSN --> Service Gateway`
If a Service Gateway is also created by the module with `create_service_gateway = true`, a second rule is added to redirect all Oracle Network Services traffic to the Service Gateway created by this module: `All <REGION> services in OSN --> Service Gateway`

== Custom routes

terraform-oci-vcn modules have two optional Input Variables to inject user defined route rules into `internet-route` route table and `nat-route` route table using respectively:

- `internet_gateway_route_rules` with the following schema:
- `internet_gateway_route_rules` defined as a `list(map(string))` with the following expected schema:

[source,hcl]
----
variable "internet_gateway_route_rules" {
description = "(Updatable) List of routing rules to add to Internet Gateway Routing Table"
type = list(object({
destination = string
destination_type = string
network_entity_id = string
description = string
destination = string # required
destination_type = string # required
network_entity_id = string # required
description = string # optional
}))
default = null
}
----

- `nat_gateway_route_rules` with the following schema:
- `nat_gateway_route_rules` defined as a `list(map(string))` with the following expected schema:

[source,hcl]
----
variable "nat_gateway_route_rules" {
description = "(Updatable) List of routing rules to add to NAT Gateway Routing Table"
type = list(object({
destination = string
destination_type = string
network_entity_id = string
description = string
destination = string # required
destination_type = string # required
network_entity_id = string # required
description = string # optional
}))
default = null
}
Expand Down
Loading

0 comments on commit f0c7569

Please sign in to comment.