Skip to content

Commit

Permalink
Fix multiple issues (#345)
Browse files Browse the repository at this point in the history
* Cast `tomap()` to fix #340

* Add advanced input to fix #342

* Add logic to handle VPN GW generation to fix #333

* Add `advanced_vpn_settings`
- Fix #232
- Fix #334

* Custom `ip_configuration` disables PIP creation
- Fix #232

* Update to support provider version `v3.0.2`

* Link `secondary_location` to settings module

* Update to test VPN gateway without AZ

* Update resource type in ID prefix

* Update baseline for `v3.0.2` provider support

* Fix sensitive values error

* Update strategy to test using Terraform `v1.1.x`

* Update OPA guidance
  • Loading branch information
Kevin Rowlandson authored Apr 25, 2022
1 parent 4b0c135 commit 246cf7d
Show file tree
Hide file tree
Showing 40 changed files with 1,451 additions and 1,883 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,10 @@ Please refer to the [Deploy Identity Resources][wiki_deploy_identity_resources]

## Terraform versions

This module has been tested using Terraform `0.15.0` and AzureRM Provider `2.96.0` as a baseline, and various versions to up `v2.99.0`.
This module has been tested using Terraform `0.15.0` and AzureRM Provider `3.0.2` as a baseline, and various versions to up the latest at time of release.
In some cases, individual versions of the AzureRM provider may cause errors.
If this happens, we advise upgrading to the latest version and checking our [troubleshooting][wiki_troubleshooting] guide before [raising an issue](https://github.com/Azure/terraform-azurerm-caf-enterprise-scale/issues).

> Note that currently azurerm provider version `v3.0.0` and above are not supported by this module.
## Usage

As a basic starting point, we recommend starting with the following configuration in your root module.
Expand All @@ -134,7 +132,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/[Examples]-Deploy-Connectivity-Resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/[Examples]-Deploy-Default-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/[Examples]-Deploy-Identity-Resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/[Examples]-Deploy-Management-Resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/[Examples]-Deploy-Using-Module-Nesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/[Examples]-Override-Module-Role-Assignments.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/wiki/[User-Guide]-Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Before getting started with this module, please take note of the following considerations:

1. This module requires a minimum `azurerm` provider version of `2.96.0`.
1. This module requires a minimum `azurerm` provider version of `3.0.2`.

1. This module requires a minimum Terraform version `0.15.0`.
1. This module requires a minimum Terraform version `0.15.1`.

> **NOTE:** New releases of the module may contain features which require the minimum supported versions to be increased, but changes will be clearly documented in the release notes, user guide, and readme.
Expand Down
4 changes: 2 additions & 2 deletions docs/wiki/[User-Guide]-Provider-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
}
}
}
Expand Down Expand Up @@ -111,7 +111,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.96.0"
version = ">= 3.0.2"
configuration_aliases = [
azurerm.connectivity,
azurerm.management,
Expand Down
2 changes: 1 addition & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# empty object types in the code
locals {
empty_list = []
empty_map = {}
empty_map = tomap({})
empty_string = ""
}

Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module "management_resources" {
existing_automation_account_resource_id = lookup(local.management_resources_advanced, "existing_automation_account_resource_id", local.empty_string)
link_log_analytics_to_automation_account = lookup(local.management_resources_advanced, "link_log_analytics_to_automation_account", true)
custom_settings_by_resource_type = lookup(local.management_resources_advanced, "custom_settings_by_resource_type", local.empty_map)
asc_export_resource_group_name = lookup(local.management_resources_advanced, "asc_export_resource_group_name", local.empty_string)
}

# The following module is used to generate the configuration
Expand Down
Loading

0 comments on commit 246cf7d

Please sign in to comment.