You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The script `configure-environment-for-gruntwork-module` now optionally installs [Terragrunt](https://github.com/gruntwork-io/terragrunt). In addition, `terraform`, `terragrunt`, `packer`, and `glide` are now automatically placed in the system `PATH`.
77
+
- The script `configure-environment-for-gruntwork-module` now optionally installs [Terragrunt](https://github.com/gruntwork-io/terragrunt). In addition, `terraform`, `terragrunt`, `packer`, and `glide` are now automatically placed in the system `PATH`.
78
78
79
79
80
80
</div>
@@ -156,42 +156,42 @@ Here are the repos that were updated:
BREAKING CHANGE: Upgrade module parameters to take advantage of the new data types introduced in Terraform 0.7.x: list and map. As a result of this change, this release is NOT backwards-compatible with Terraform 0.6.x.
159
+
160
+
BREAKING CHANGE: Upgrade module parameters to take advantage of the new data types introduced in Terraform 0.7.x: list and map. As a result of this change, this release is NOT backwards-compatible with Terraform 0.6.x.
161
161
162
162
- All VPC output variables that used to return comma-separated strings now return proper lists (e.g. `public_subnet_cidr_blocks`, `private_app_subnet_ids`, `private_persistence_route_table_ids`, etc).
163
-
- Similarly, all VPC input variables that used to look for a comma-separated string now look for a proper list as well (e.g. `public_subnet_ids`, `private_app_subnet_cidr_blocks`).
163
+
- Similarly, all VPC input variables that used to look for a comma-separated string now look for a proper list as well (e.g. `public_subnet_ids`, `private_app_subnet_cidr_blocks`).
164
164
- The VPC modules no longer take `aws_availability_zones` as an input variable. They now determine this using the [aws_availability_zones data source](https://www.terraform.io/docs/providers/aws/d/availability_zones.html) instead. Unfortunately, due to a [limitation in Terraform](https://github.com/hashicorp/terraform/issues/3888), we cannot automatically tell how many AZs are available, so you must specify the number using the `num_availability_zones` variable.
165
-
- The Availability Zones output is now called `availability_zones` instead of `aws_ availability_zones`.
165
+
- The Availability Zones output is now called `availability_zones` instead of `aws_ availability_zones`.
166
166
167
167
168
168
-`vars.tf`:
169
-
-[Example diff](https://github.com/gruntwork-io/module-vpc/compare/c83c30f998f8486537e7308dcdfbcd5cdf34bffa...master?diff=unified&name=master#diff-14c7cc73490c3d2d8347d14cb8a44729) and
170
-
- Remove the `aws_availability_zones` variable.
169
+
-[Example diff](https://github.com/gruntwork-io/module-vpc/compare/c83c30f998f8486537e7308dcdfbcd5cdf34bffa...master?diff=unified&name=master#diff-14c7cc73490c3d2d8347d14cb8a44729) and
170
+
- Remove the `aws_availability_zones` variable.
171
171
- Add a variable called `num_availability_zones`. This represents the number of availability zones usable by this AWS account for the current AWS region. Set its `default` value to 2, 3, or 4, depending on your region.
172
172
-`main.tf`
173
173
-[Example diff](https://github.com/gruntwork-io/module-vpc/compare/c83c30f998f8486537e7308dcdfbcd5cdf34bffa...master?diff=unified&name=master#diff-8140c347465c3fb50113f34a03f9c0d1) (ignore the `user_data` stuff)
174
174
- Update the `ref` of the `vpc-mgmt` and `vpc-mgmt-network-acls` URLs to `0.1.0`.
175
175
- In the `mgmt_vpc` module, instead of setting `aws_availability_zones = "${var.aws_availability_zones}"`, set `num_availability_zones = "${var.num_availability_zones}"`.
176
-
- In the `mgmt_vpc_network_acls` module, instead of setting `num_subnets = "${length(split(",", var.aws_availability_zones))}"`, set `num_subnets = "${var.num_availability_zones}"`.
176
+
- In the `mgmt_vpc_network_acls` module, instead of setting `num_subnets = "${length(split(",", var.aws_availability_zones))}"`, set `num_subnets = "${var.num_availability_zones}"`.
177
177
- In the `mgmt_vpc_network_acls` module, if you don't have it already, set a new parameter: `vpc_ready = "${module.mgmt_vpc.vpc_ready}"`.
178
178
- Deploy:
179
179
- Run `terragrunt get -update`
180
180
- Run `terragrunt plan`
181
181
- You may see a few Network ACLs being created and destroyed. That's OK.
182
-
- You should NOT see the VPC, any route tables, or any subnets being created or destroyed. If you do, let us know (mailto:[email protected])!
182
+
- You should NOT see the VPC, any route tables, or any subnets being created or destroyed. If you do, let us know ([email protected])!
183
183
- If everything looks OK, run `terragrunt apply`.
184
184
185
185
186
186
These use the exact same upgrade process as the mgmt VPC, except there are some additional steps for the peering connection:
187
187
-`main.tf`:
188
188
-[Example diff](https://github.com/gruntwork-io/module-vpc/compare/c83c30f998f8486537e7308dcdfbcd5cdf34bffa...master?diff=unified&name=master#diff-3c06616a9c2b49d630e46d8439b63a8c) (ignore the `user_data` stuff)
189
189
- Update the `ref` of the `vpc-peering` URL to `0.1.0`.
190
-
- Instead of manually concatenating values in a string for the `origin_vpc_route_table_ids` and `destination_vpc_route_table_ids` parameters, use the [concat](https://www.terraform.io/docs/configuration/interpolation.html#concat_list1_list2_) and [list](https://www.terraform.io/docs/configuration/interpolation.html#list_items_) functions. You should get something like `origin_vpc_route_table_ids = "${concat(data.terraform_remote_state.mgmt_vpc.private_subnet_route_table_ids, list(data.terraform_remote_state.mgmt_vpc.public_subnet_route_table_id))}"`.
190
+
- Instead of manually concatenating values in a string for the `origin_vpc_route_table_ids` and `destination_vpc_route_table_ids` parameters, use the [concat](https://www.terraform.io/docs/configuration/interpolation.html#concat_list1_list2_) and [list](https://www.terraform.io/docs/configuration/interpolation.html#list_items_) functions. You should get something like `origin_vpc_route_table_ids = "${concat(data.terraform_remote_state.mgmt_vpc.private_subnet_route_table_ids, list(data.terraform_remote_state.mgmt_vpc.public_subnet_route_table_id))}"`.
191
191
- Replace `length(split(",", var.aws_availability_zones))` in the calculation of the `num_origin_vpc_route_tables` and `num_destination_vpc_route_tables` parameters with `var.num_availability_zones`. The other parts of the calculation (e.g. the +1 and the *2) stay the same.
192
192
- Deploy:
193
193
- Same process as the mgmt VPC above.
194
-
- Other than minor Network ACL changes, you should not see anything being destroyed. If you do, this could lead to outage, so please notify us (mailto:[email protected])!
194
+
- Other than minor Network ACL changes, you should not see anything being destroyed. If you do, this could lead to outage, so please notify us ([email protected])!
195
195
196
196
197
197
You can update other variables and outputs to lists (e.g. `var.aws_account_ids`), get rid of unnecessary `split` and `join` usage, and upgrade `terraform_remote_state` usage to data sources. See the [Terraform 0.7 upgrade guide](https://www.terraform.io/upgrade-guides/0-7.html) for details.
0 commit comments