Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.0 #86

Merged
merged 84 commits into from
Dec 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
8a79411
fix: updated subnets to use for_each rather then count
tfhartmann Sep 19, 2019
f1590db
fix: fixing incorrect outputs
tfhartmann Sep 19, 2019
f2839e8
wip: tried chaging to list, didnt' work. Going to do more debugging
tfhartmann Sep 20, 2019
1392cf0
fix: fixed outputs so they would match the outputs of splat
tfhartmann Sep 20, 2019
264b2e0
fix: formatting! From hells heart I curse thee!
tfhartmann Sep 20, 2019
71939d2
fix: cleaned up example outputs declarations
tfhartmann Sep 20, 2019
b17126e
feat: adding some tests to validate outputs
tfhartmann Sep 20, 2019
188b777
fix: doh, don't comment out the tests
tfhartmann Sep 20, 2019
17e12e5
feat: and low. I have created tests for outputs
tfhartmann Sep 21, 2019
e89d26b
fix: removing spurious comments
tfhartmann Sep 24, 2019
a57883c
fix: removed outputs from the firewall example
tfhartmann Sep 25, 2019
7c43cf0
Revert "fix: removed outputs from the firewall example"
tfhartmann Sep 25, 2019
d451d32
docs: fixing header warning
tfhartmann Sep 25, 2019
ff274e9
fix: ran `make docker_generate_docs`
tfhartmann Sep 25, 2019
a440fce
wip: adding tests for outputs in the firewall submodule
tfhartmann Sep 26, 2019
c19fd95
fix: syntax update to make the for loop more readable
tfhartmann Oct 2, 2019
f886fd7
docs: WIP on migration docs
tfhartmann Oct 2, 2019
4233054
feat: added migrations docs and a migration script
tfhartmann Oct 2, 2019
a1d5d04
lint: Fixing docs and linting errors
tfhartmann Oct 2, 2019
0e771c9
wip: updated migration script to run migration commands
tfhartmann Oct 4, 2019
aee0cc0
rebase: add back depends_on for subnets after a rebase
tfhartmann Oct 11, 2019
14f3be3
Revert "rebase: add back depends_on for subnets after a rebase"
tfhartmann Oct 11, 2019
f3bebfc
moved migrate.sh into the helpers dir
tfhartmann Oct 15, 2019
1c99d28
feat: made the scipt work across multiple modules
tfhartmann Oct 15, 2019
45d31ce
Merge branch 'master' into tfhartmann-issue70
morgante Oct 24, 2019
6880832
Merge pull request #73 from tfhartmann/tfhartmann-issue70
morgante Oct 24, 2019
2d1b821
Updates gcp.rb test for simple_project
Nov 14, 2019
7224c7d
Updates gcloud.rb for simple-project
Nov 14, 2019
2ac57e2
Updates simple-project example
Nov 14, 2019
5a8f0ee
Updates main.tf
Nov 14, 2019
d548224
Formats terraform
Nov 14, 2019
e806362
Updates README example
Nov 14, 2019
9983e14
Reduces complexity of log_config conditional
Nov 15, 2019
035a1b4
Removes `enable flow logs` tests
Nov 15, 2019
a9d2dbf
Updates simple-project example
Nov 15, 2019
b3607cb
Updates README.md
Nov 15, 2019
8ec4e16
Updates examples provider version
Nov 15, 2019
946e3f3
Merge pull request #108 from joshua9519/joshua9519/log_config
morgante Nov 15, 2019
dedcf4c
fix makefile
taylorludwig Nov 25, 2019
0a135c0
move vpc creation to its own module
taylorludwig Nov 25, 2019
987b4e4
move subnets to own module
taylorludwig Nov 25, 2019
28a26a2
move routes to its own submodule
taylorludwig Nov 25, 2019
211a516
use for_each for route creation
taylorludwig Nov 25, 2019
2dd1fad
update developer tools version to fix generate doc errors
taylorludwig Nov 25, 2019
6e0faef
generate docs
taylorludwig Nov 25, 2019
2c8ed09
add readme to submodules
taylorludwig Nov 25, 2019
f566110
formatting fix
taylorludwig Nov 25, 2019
f3e5e99
changelog
taylorludwig Nov 25, 2019
605269a
lock provider for google_project_services removal error
taylorludwig Nov 25, 2019
3a3a408
specify provider versions for each module for terraform init/validate
taylorludwig Nov 25, 2019
fec8285
Revert "specify provider versions for each module for terraform init/…
taylorludwig Nov 25, 2019
560bbb2
required provider versions on modules
taylorludwig Nov 25, 2019
fc02b37
Update CHANGELOG.md
taylorludwig Nov 25, 2019
188bf1c
remove compatability from submodules
taylorludwig Nov 26, 2019
2831941
update variable descriptions
taylorludwig Nov 26, 2019
8649e43
switch routes back to list type with map generated within module
taylorludwig Nov 26, 2019
d567d89
default rotue values to null so google_compute_route defaults are used
taylorludwig Nov 26, 2019
b5b9ad8
update output names per pr
taylorludwig Nov 26, 2019
e95a6b7
switch shared_vpc_host to bool
taylorludwig Nov 26, 2019
a351412
simpler way to return project id for shared vpc
taylorludwig Nov 26, 2019
4146283
update changelog and readme for list structure
taylorludwig Nov 26, 2019
c9a6090
fix terraform fmt issues
taylorludwig Nov 26, 2019
db0448e
name isn't required anymore
taylorludwig Nov 26, 2019
84119a8
default output needs to be to match original value so tests and back…
taylorludwig Nov 26, 2019
babfafa
fix readme examples
taylorludwig Nov 26, 2019
6b10555
remove unused leftover var
taylorludwig Nov 26, 2019
f0443f7
remove network var for route depedency. Its inherit by passing in net…
taylorludwig Nov 26, 2019
f86ad43
remove description
taylorludwig Nov 26, 2019
2f6aee7
rename svpc_project_id to project_id
taylorludwig Nov 26, 2019
6e7ffd1
use a module_depends_on list instead of using explicit subnet
taylorludwig Nov 26, 2019
da5372d
lint/validate fixes
taylorludwig Nov 26, 2019
7ec22d8
initial migrate.py from gke module
taylorludwig Nov 27, 2019
99a3819
update migrate.py to work with google-network resources and for_each …
taylorludwig Nov 27, 2019
69615da
remove old sh migrate script
taylorludwig Nov 27, 2019
2d4027a
update readme for new py migrate script
taylorludwig Nov 27, 2019
3afde82
python format
taylorludwig Nov 27, 2019
9342a26
update migration doc to mention issue with single count mvs
taylorludwig Dec 2, 2019
b60f0ab
Merge pull request #116 from taylorludwig/feature/103-submodules
morgante Dec 6, 2019
1b63ed9
Merge branch 'master' into release/2.0
morgante Dec 6, 2019
ecdfe25
Remove unused locals from main.tf
morgante Dec 6, 2019
1a0602d
Slightly rework upgrade guide
morgante Dec 7, 2019
b51a1e5
Small bugfixes to upgrade script
morgante Dec 7, 2019
f4a98d1
Fix dryrun command in docs
morgante Dec 7, 2019
a172ad3
Merge pull request #127 from terraform-google-modules/bugfix/2.0-rele…
morgante Dec 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,21 @@ suites:
color: true
systems:
- name: local
attrs_outputs:
customized_inspec_attribute: output_network_name
customized_inspec_attribute: output_network_self_link
customized_inspec_attribute: output_subnets_ips
customized_inspec_attribute: output_routes
customized_inspec_attribute: output_subnets_flow_logs
customized_inspec_attribute: output_subnets_names
customized_inspec_attribute: output_subnets_private_access
customized_inspec_attribute: output_subnets_regions
customized_inspec_attribute: output_subnets_secondary_ranges
customized_inspec_attribute: output_project_id
backend: local
controls:
- gcloud
- inspec_attributes
- name: "multi_vpc"
driver:
name: "terraform"
Expand Down Expand Up @@ -107,9 +119,21 @@ suites:
controls:
- gcp
- name: local
attrs_outputs:
customized_inspec_attribute: output_network_name
customized_inspec_attribute: output_network_self_link
customized_inspec_attribute: output_subnets_ips
customized_inspec_attribute: output_routes
customized_inspec_attribute: output_subnets_flow_logs
customized_inspec_attribute: output_subnets_names
customized_inspec_attribute: output_subnets_private_access
customized_inspec_attribute: output_subnets_regions
customized_inspec_attribute: output_subnets_secondary_ranges
customized_inspec_attribute: output_project_id
backend: local
controls:
- gcloud
- inspec_attributes
- name: "submodule_network_peering"
driver:
name: "terraform"
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog][keepachangelog-site],
and this project adheres to [Semantic Versioning][semver-site].

## [Unreleased]
v2.0.0 is a backwards-incompatible release. Please see the [upgrading guide](./docs/upgrading_to_v2.0.md).

### Added

- Split main module up into vpc, subnets, and routes submodules. [#103]

### Fixed

- Fixes subnet recreation when a subnet is updated. [#73]


## [1.5.0] - 2019-11-06

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Make will use bash instead of sh
SHELL := /usr/bin/env bash

DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.5.0
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.6.0
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
REGISTRY_URL := gcr.io/cloud-foundation-cicd

Expand Down
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ It supports creating:
- Subnets within the VPC
- Secondary ranges for the subnets (if applicable)

Sub modules are provided for creating individual vpc, subnets, and routes. See the modules directory for the various sub modules usage.

## Compatibility

This module is meant for use with Terraform 0.12. If you haven't [upgraded](https://www.terraform.io/upgrade-guides/0-12.html) and need a Terraform 0.11.x-compatible version of this module, the last released version intended for Terraform 0.11.x is [0.8.0](https://registry.terraform.io/modules/terraform-google-modules/network/google/0.8.0).
Expand Down Expand Up @@ -38,6 +40,15 @@ module "vpc" {
subnet_flow_logs = "true"
description = "This subnet has a description"
},
{
subnet_name = "subnet-03"
subnet_ip = "10.10.30.0/24"
subnet_region = "us-west1"
subnet_flow_logs = "true"
subnet_flow_logs_interval = "INTERVAL_10_MIN"
subnet_flow_logs_sampling = 0.7
subnet_flow_logs_metadata = "INCLUDE_ALL_METADATA"
}
]

secondary_ranges = {
Expand Down Expand Up @@ -92,7 +103,7 @@ Then perform the following commands on the root folder:
| routes | List of routes being created in this VPC | list(map(string)) | `<list>` | no |
| routing\_mode | The network routing mode (default 'GLOBAL') | string | `"GLOBAL"` | no |
| secondary\_ranges | Secondary ranges that will be used in some of the subnets | object | `<map>` | no |
| shared\_vpc\_host | Makes this project a Shared VPC host if 'true' (default 'false') | string | `"false"` | no |
| shared\_vpc\_host | Makes this project a Shared VPC host if 'true' (default 'false') | bool | `"false"` | no |
| subnets | The list of subnets being created | list(map(string)) | n/a | yes |

## Outputs
Expand All @@ -101,19 +112,20 @@ Then perform the following commands on the root folder:
|------|-------------|
| network\_name | The name of the VPC being created |
| network\_self\_link | The URI of the VPC being created |
| routes | The routes associated with this VPC |
| project\_id | VPC project id |
| route\_names | The route names associated with this VPC |
| subnets\_flow\_logs | Whether the subnets will have VPC flow logs enabled |
| subnets\_ips | The IPs and CIDRs of the subnets being created |
| subnets\_names | The names of the subnets being created |
| subnets\_private\_access | Whether the subnets will have access to Google API's without a public IP |
| subnets\_regions | The region where the subnets will be created |
| subnets\_secondary\_ranges | The secondary ranges associated with these subnets |
| subnets\_self\_links | The self-links of subnets being created |
| svpc\_host\_project\_id | Shared VPC host project id. |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

### Subnet Inputs

The subnets list contains maps, where each object represents a subnet. Each map has the following inputs (please see examples folder for additional references):

| Name | Description | Type | Default | Required |
Expand All @@ -125,7 +137,8 @@ The subnets list contains maps, where each object represents a subnet. Each map
| subnet\_flow\_logs | Whether the subnet will record and send flow log data to logging | string | `"false"` | no |

### Route Inputs
The routes list contains maps, where each object represents a route. For the next\_hop\_* inputs, only one is possible to be used in each route. Having two next_hop_* inputs will produce an error. Each map has the following inputs (please see examples folder for additional references):

The routes list contains maps, where each object represents a route. For the next_hop_* inputs, only one is possible to be used in each route. Having two next_hop_* inputs will produce an error. Each map has the following inputs (please see examples folder for additional references):

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
Expand All @@ -143,7 +156,7 @@ The routes list contains maps, where each object represents a route. For the nex
## Requirements
### Installed Software
- [Terraform](https://www.terraform.io/downloads.html) ~> 0.12.0
- [Terraform Provider for GCP][terraform-provider-google] ~> 2.10.0
- [Terraform Provider for GCP][terraform-provider-google] ~> 2.19.0
- [gcloud](https://cloud.google.com/sdk/gcloud/) >243.0.0

### Configure a Service Account
Expand Down
2 changes: 1 addition & 1 deletion build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ tags:
- 'integration'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.5.0'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.6.0'
2 changes: 1 addition & 1 deletion build/lint.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ tags:
- 'lint'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.5.0'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.6.0'
134 changes: 134 additions & 0 deletions docs/upgrading_to_v2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Upgrading to v2.x

The v2.x release of _google-network_ is a backwards incompatible
release.

Because v2.x changed how the subnet resource is iterated on, resources in Terraform state need to be migrated in order to avoid the resources from getting destroyed and recreated.

## Migration Instructions

First, upgrade to the new version of this module.

```diff
module "kubernetes_engine_private_cluster" {
source = "terraform-google-modules/network/google"
- version = "~> 1.5"
+ version = "~> 2.0"

# ...
}
```

If you run `terraform plan` at this point, Terraform will inform you that it will attempt to delete and recreate your existing subnets. This is almost certainly not the behavior you want.

You will need to migrate your state, either [manually](#manual-migration-steps) or [automatically](#migration-script).

### Migration Script

1. Download the script:

```sh
curl -O https://raw.githubusercontent.com/terraform-google-modules/terraform-google-network/master/helpers/migrate.py
chmod +x migrate.py
```

2. Back up your Terraform state:

```sh
terraform state pull >> state.bak
```

2. Run the script to output the migration commands:

```sh
$ ./migrate.py --dryrun
terraform state mv 'module.example.module.test-vpc-module-02.google_compute_network.network[0]' 'module.example.module.test-vpc-module-02.module.vpc.google_compute_network.network'
terraform state mv 'module.example.module.test-vpc-module-02.google_compute_subnetwork.subnetwork' 'module.example.module.test-vpc-module-02.module.subnets.google_compute_subnetwork.subnetwork'
terraform state mv 'module.example.module.test-vpc-module-02.module.subnets.google_compute_subnetwork.subnetwork[0]' 'module.example.module.test-vpc-module-02.module.subnets.google_compute_subnetwork.subnetwork["us-west1/multi-vpc-a1-02-subnet-01"]'
terraform state mv 'module.example.module.test-vpc-module-02.module.subnets.google_compute_subnetwork.subnetwork[1]' 'module.example.module.test-vpc-module-02.module.subnets.google_compute_subnetwork.subnetwork["us-west1/multi-vpc-a1-02-subnet-02"]'
terraform state mv 'module.example.module.test-vpc-module-02.google_compute_route.route' 'module.example.module.test-vpc-module-02.module.routes.google_compute_route.route'
terraform state mv 'module.example.module.test-vpc-module-02.module.routes.google_compute_route.route[0]' 'module.example.module.test-vpc-module-02.module.routes.google_compute_route.route["multi-vpc-a1-02-egress-inet"]'
terraform state mv 'module.example.module.test-vpc-module-02.module.routes.google_compute_route.route[1]' 'module.example.module.test-vpc-module-02.module.routes.google_compute_route.route["multi-vpc-a1-02-testapp-proxy"]'

```

3. Execute the migration script:

```sh
$ ./migrate.py
---- Migrating the following modules:
-- module.example.module.test-vpc-module-02
---- Commands to run:
Move "module.example.module.test-vpc-module-02.google_compute_network.network[0]" to "module.example.module.test-vpc-module-02.module.vpc.google_compute_network.network"
Successfully moved 1 object(s).
Move "module.example.module.test-vpc-module-02.google_compute_subnetwork.subnetwork" to "module.example.module.test-vpc-module-02.module.subnets.google_compute_subnetwork.subnetwork"
Successfully moved 1 object(s).
Move "module.example.module.test-vpc-module-02.module.subnets.google_compute_subnetwork.subnetwork[0]" to "module.example.module.test-vpc-module-02.module.subnets.google_compute_subnetwork.subnetwork[\"us-west1/multi-vpc-a1-02-subnet-01\"]"
Successfully moved 1 object(s).
Move "module.example.module.test-vpc-module-02.module.subnets.google_compute_subnetwork.subnetwork[1]" to "module.example.module.test-vpc-module-02.module.subnets.google_compute_subnetwork.subnetwork[\"us-west1/multi-vpc-a1-02-subnet-02\"]"
Successfully moved 1 object(s).
Move "module.example.module.test-vpc-module-02.google_compute_route.route" to "module.example.module.test-vpc-module-02.module.routes.google_compute_route.route"
Successfully moved 1 object(s).
Move "module.example.module.test-vpc-module-02.module.routes.google_compute_route.route[0]" to "module.example.module.test-vpc-module-02.module.routes.google_compute_route.route[\"multi-vpc-a1-02-egress-inet\"]"
Successfully moved 1 object(s).
Move "module.example.module.test-vpc-module-02.module.routes.google_compute_route.route[1]" to "module.example.module.test-vpc-module-02.module.routes.google_compute_route.route[\"multi-vpc-a1-02-testapp-proxy\"]"
Successfully moved 1 object(s).

```

4. Run `terraform plan` to confirm no changes are expected.

### Manual Migration Steps

In this example here are the commands used migrate the vpc and subnets created by the `simple_project` in the examples directory. _please note the need to escape the quotes on the new resource_. You may also use the migration script.

- `terraform state mv module.example.module.test-vpc-module.google_compute_network.network module.example.module.test-vpc-module.module.vpc.google_compute_subnetwork.network`

- `terraform state mv module.example.module.test-vpc-module.google_compute_subnetwork.subnetwork module.example.module.test-vpc-module.module.subnets.google_compute_subnetwork.subnetwork`

- `terraform state mv module.example.module.test-vpc-module.module.subnets.google_compute_subnetwork.subnetwork[0] module.example.module.test-vpc-module.module.subnets.google_compute_subnetwork.subnetwork[\"us-west1/simple-project-timh-subnet-01\"]`

- `terraform state mv module.example.module.test-vpc-module.module.subnets.google_compute_subnetwork.subnetwork[1] module.example.module.test-vpc-module.module.subnets.google_compute_subnetwork.subnetwork[\"us-west1/simple-project-timh-subnet-02\"]`

*You'll notice that because of a terraform [issue](https://github.com/hashicorp/terraform/issues/22301), we need to move the whole resource collection first before renaming to the `for_each` keys*

`terraform plan` should now return a no-op and show no new changes.

```Shell
$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

module.example.module.test-vpc-module.google_compute_network.network: Refreshing state... [id=simple-project-timh]
module.example.module.test-vpc-module.google_compute_subnetwork.subnetwork["us-west1/simple-project-timh-subnet-02"]: Refreshing state... [id=us-west1/simple-project-timh-subnet-02]
module.example.module.test-vpc-module.google_compute_subnetwork.subnetwork["us-west1/simple-project-timh-subnet-01"]: Refreshing state... [id=us-west1/simple-project-timh-subnet-01]

------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.
```

### Known Issues

If your previous state only contains a **single** subnet or route then `terraform mv` will throw an error similar to the following during migration:

```
Error: Invalid target address

Cannot move to
module.example.module.test-vpc-module-01.module.routes.google_compute_route.route["multi-vpc-a1-01-egress-inet"]:
module.example.module.test-vpc-module-01.module.routes.google_compute_route.route
does not exist in the current state.
```

This is due to a terraform mv [issue](https://github.com/hashicorp/terraform/issues/22301)

The workaround is to either

1. Create a temporary subnet or route prior to migration
2. Manually updating the state file. Update the `index_key` of the appropriate user and push the to the remote state if necessary.
2 changes: 1 addition & 1 deletion examples/delete_default_gateway_routes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This VPC has a single subnet with no secondary ranges, and ensures the default i
|------|-------------|
| network\_name | The name of the VPC being created |
| network\_self\_link | The URI of the VPC being created |
| routes | The routes associated with this VPC |
| route\_names | The routes associated with this VPC |
| subnets\_flow\_logs | Whether the subnets will have VPC flow logs enabled |
| subnets\_ips | The IP and cidrs of the subnets being created |
| subnets\_names | The names of the subnets being created |
Expand Down
2 changes: 1 addition & 1 deletion examples/delete_default_gateway_routes/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

provider "google" {
version = "~> 2.10.0"
version = "~> 2.19.0"
}

provider "null" {
Expand Down
4 changes: 2 additions & 2 deletions examples/delete_default_gateway_routes/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ output "subnets_secondary_ranges" {
description = "The secondary ranges associated with these subnets"
}

output "routes" {
value = module.test-vpc-module.routes
output "route_names" {
value = module.test-vpc-module.route_names
description = "The routes associated with this VPC"
}
2 changes: 1 addition & 1 deletion examples/multi_vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

provider "google" {
version = "~> 2.10.0"
version = "~> 2.19.0"
}

provider "null" {
Expand Down
4 changes: 2 additions & 2 deletions examples/multi_vpc/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ output "network_01_subnets_secondary_ranges" {
}

output "network_01_routes" {
value = module.test-vpc-module-01.routes
value = module.test-vpc-module-01.route_names
description = "The routes associated with network-01"
}

Expand Down Expand Up @@ -102,6 +102,6 @@ output "network_02_subnets_secondary_ranges" {
}

output "network_02_routes" {
value = module.test-vpc-module-02.routes
value = module.test-vpc-module-02.route_names
description = "The routes associated with network-02"
}
3 changes: 2 additions & 1 deletion examples/secondary_ranges/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ ranges and the third being given a single secondary range.
|------|-------------|
| network\_name | The name of the VPC being created |
| network\_self\_link | The URI of the VPC being created |
| routes | The routes associated with this VPC |
| project\_id | VPC project id |
| route\_names | The routes associated with this VPC |
| subnets\_flow\_logs | Whether the subnets will have VPC flow logs enabled |
| subnets\_ips | The IP and cidrs of the subnets being created |
| subnets\_names | The names of the subnets being created |
Expand Down
2 changes: 1 addition & 1 deletion examples/secondary_ranges/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

provider "google" {
version = "~> 2.10.0"
version = "~> 2.19.0"
}

provider "null" {
Expand Down
9 changes: 7 additions & 2 deletions examples/secondary_ranges/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ output "network_self_link" {
description = "The URI of the VPC being created"
}

output "project_id" {
value = module.vpc-secondary-ranges.project_id
description = "VPC project id"
}

output "subnets_names" {
value = module.vpc-secondary-ranges.subnets_names
description = "The names of the subnets being created"
Expand Down Expand Up @@ -54,7 +59,7 @@ output "subnets_secondary_ranges" {
description = "The secondary ranges associated with these subnets"
}

output "routes" {
value = module.vpc-secondary-ranges.routes
output "route_names" {
value = module.vpc-secondary-ranges.route_names
description = "The routes associated with this VPC"
}
3 changes: 2 additions & 1 deletion examples/simple_project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ This VPC has two subnets, with no secondary ranges.
|------|-------------|
| network\_name | The name of the VPC being created |
| network\_self\_link | The URI of the VPC being created |
| routes | The routes associated with this VPC |
| project\_id | VPC project id |
| route\_names | The routes associated with this VPC |
| subnets\_flow\_logs | Whether the subnets will have VPC flow logs enabled |
| subnets\_ips | The IP and cidrs of the subnets being created |
| subnets\_names | The names of the subnets being created |
Expand Down
Loading