From dee26d39d5d3fc5fb78feb7fe26d63e4d956c9be Mon Sep 17 00:00:00 2001
From: Matt White <16320656+matt-FFFFFF@users.noreply.github.com>
Date: Tue, 29 Oct 2024 10:00:26 +0000
Subject: [PATCH] fix: cap azapi at < 2.0 and tf at < 2.0 (#427)
* fix: cap azapi at < 2.0 and tf at < 2.0
* docs: make docs
* fix: typo, fixes #416
* docs: make docs
* chore: remove dependabot version (not security) updates
* chore: update terraform docs
* chore: bump go version
* fix: constrain test provider versions to majors
---
.github/dependabot.yml | 12 ------------
.github/workflows/docs-fmt-test.yml | 2 +-
.tfdocs-config.yml | 4 ++--
Makefile | 2 +-
README.md | 7 +++----
header.md | 2 +-
locals.version.tf.json | 2 +-
terraform.tf | 4 ++--
tests/utils/providers.go | 4 ++--
9 files changed, 13 insertions(+), 26 deletions(-)
delete mode 100644 .github/dependabot.yml
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index e1a67ae1..00000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-version: 2
-
-updates:
- - package-ecosystem: gomod
- directory: /tests
- schedule:
- interval: daily
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: daily
diff --git a/.github/workflows/docs-fmt-test.yml b/.github/workflows/docs-fmt-test.yml
index 8084c5f9..cd4511ee 100644
--- a/.github/workflows/docs-fmt-test.yml
+++ b/.github/workflows/docs-fmt-test.yml
@@ -22,7 +22,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
- go-version: '1.20.x'
+ go-version: '1.23.x'
cache-dependency-path: tests/go.sum
- name: Install tools
diff --git a/.tfdocs-config.yml b/.tfdocs-config.yml
index 22962293..e66d7fa5 100644
--- a/.tfdocs-config.yml
+++ b/.tfdocs-config.yml
@@ -4,7 +4,7 @@
formatter: "markdown document" # this is required
-version: "~> 0.17.0"
+version: "~> 0.19"
header-from: "header.md"
footer-from: "footer.md"
@@ -18,7 +18,7 @@ sections:
show: []
hide-all: false # deprecated in v0.13.0, removed in v0.15.0
- show-all: true # deprecated in v0.13.0, removed in v0.15.0
+ show-all: true # deprecated in v0.13.0, removed in v0.15.0
content: |-
{{ .Header }}
diff --git a/Makefile b/Makefile
index 0f906af3..f88bb195 100644
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,7 @@ tfclean:
tools:
go install mvdan.cc/gofumpt@latest
go install github.com/katbyte/terrafmt@latest
- go install github.com/terraform-docs/terraform-docs@v0.17.0
+ go install github.com/terraform-docs/terraform-docs@v0.19
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH || $$GOPATH)/bin v1.52.2
# Makefile targets are files, but we aren't using it like this,
diff --git a/README.md b/README.md
index 7efa905f..860d0312 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
## Overview
The landing zone Terraform module is designed to accelerate deployment of individual landing zones within an Azure tenant.
-We use the [AzureRM](https://registry.terraform.io/providers/hashicorp/azurerm/latest) and [AzAPI](https://registry.terraform.io/providers/azure/azapi/latest) providers to create the subscription and deploy the resources in a single `terrafom apply` step.
+We use the [AzureRM](https://registry.terraform.io/providers/hashicorp/azurerm/latest) and [AzAPI](https://registry.terraform.io/providers/azure/azapi/latest) providers to create the subscription and deploy the resources in a single `terraform apply` step.
The module is designed to be instantiated many times, once for each desired landing zone.
@@ -136,9 +136,9 @@ module "lz_vending" {
The following requirements are needed by this module:
-- [terraform](#requirement\_terraform) (>= 1.3.0)
+- [terraform](#requirement\_terraform) (~> 1.3)
-- [azapi](#requirement\_azapi) (>= 1.4.0)
+- [azapi](#requirement\_azapi) (~> 1.4)
## Modules
@@ -619,7 +619,6 @@ Default:
"Microsoft.Sql": [],
"Microsoft.Storage": [],
"Microsoft.StreamAnalytics": [],
- "Microsoft.TimeSeriesInsights": [],
"Microsoft.Web": [],
"microsoft.insights": []
}
diff --git a/header.md b/header.md
index 761c0502..d7f2eb26 100644
--- a/header.md
+++ b/header.md
@@ -7,7 +7,7 @@
## Overview
The landing zone Terraform module is designed to accelerate deployment of individual landing zones within an Azure tenant.
-We use the [AzureRM](https://registry.terraform.io/providers/hashicorp/azurerm/latest) and [AzAPI](https://registry.terraform.io/providers/azure/azapi/latest) providers to create the subscription and deploy the resources in a single `terrafom apply` step.
+We use the [AzureRM](https://registry.terraform.io/providers/hashicorp/azurerm/latest) and [AzAPI](https://registry.terraform.io/providers/azure/azapi/latest) providers to create the subscription and deploy the resources in a single `terraform apply` step.
The module is designed to be instantiated many times, once for each desired landing zone.
diff --git a/locals.version.tf.json b/locals.version.tf.json
index 2716b922..40a1c920 100644
--- a/locals.version.tf.json
+++ b/locals.version.tf.json
@@ -1,5 +1,5 @@
{
"locals": {
- "module_version": "4.1.3"
+ "module_version": "4.1.5"
}
}
diff --git a/terraform.tf b/terraform.tf
index d2bdb883..f06cc26a 100644
--- a/terraform.tf
+++ b/terraform.tf
@@ -1,9 +1,9 @@
terraform {
- required_version = ">= 1.3.0"
+ required_version = "~> 1.3"
required_providers {
azapi = {
source = "azure/azapi"
- version = ">= 1.4.0"
+ version = "~> 1.4"
}
}
}
diff --git a/tests/utils/providers.go b/tests/utils/providers.go
index 8d2eb841..a0a66d4a 100644
--- a/tests/utils/providers.go
+++ b/tests/utils/providers.go
@@ -71,8 +71,8 @@ func generateRequiredProvidersFile(data RequiredProvidersData, path string) erro
// If the environment variables are not set or the value is "latest", it will use the default values.
func newRequiredProvidersData() RequiredProvidersData {
var rpd RequiredProvidersData
- azapiver := ">= 1.4.0"
- azurermver := ">= 3.7.0"
+ azapiver := "~> 1.4"
+ azurermver := "~> 3.7"
if val := os.Getenv("AZAPI_VERSION"); val != "" && val != "latest" {
azapiver = "= " + val