Skip to content

Commit 61c9628

Browse files
authored
chore: bump Azure Terraform provider to V3 (#634)
Now that we no longer support subsume, it's possible to update the Azure Terraform provider to V3. Previously this was problematic as running an update/upgrade on service instances that supported subsume would try to run `terraform output` which failed as the schema used by the Azure provider V2/V3 has changed. With subsume no longer supported, we don't need to run `terraform output` (trigged by `tf_attribute`) and we don't see the error any more. [#183376379](https://www.pivotaltracker.com/story/show/183376379)
1 parent f799c94 commit 61c9628

File tree

19 files changed

+19
-29
lines changed

19 files changed

+19
-29
lines changed

acceptance-tests/upgrade/update_and_upgrade_mssql_db_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ var _ = Describe("UpgradeMssqlDBTest", Label("mssql-db"), func() {
114114
appOne.DELETE(schema)
115115
})
116116
})
117+
117118
When("using a config file for broker configuration", func() {
118119
It("it should respect the config as if it were set via an env var", func() {
119120
By("pushing a broker with a config file")
@@ -184,6 +185,7 @@ var _ = Describe("UpgradeMssqlDBTest", Label("mssql-db"), func() {
184185
})
185186

186187
})
188+
187189
When("upgrading broker version", Label("ancient"), func() {
188190
It("should continue to work", func() {
189191
By("pushing an ancient broker version")

azure-mssql-db-failover-group.yml

-4
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,12 @@ provision:
7676
maxLength: 63
7777
minLength: 6
7878
pattern: ^[a-z][a-z0-9-]+$
79-
tf_attribute: azurerm_sql_failover_group.failover_group.name
80-
tf_attribute_skip: existing
8179
- field_name: db_name
8280
type: string
8381
details: Name for your database
8482
default: csb-fog-db-${request.instance_id}
8583
constraints:
8684
maxLength: 64
87-
tf_attribute: azurerm_mssql_database.primary_db.name
88-
tf_attribute_skip: existing
8985
- field_name: server_pair
9086
type: string
9187
details: Name of server pair from server_credential_pairs to create database upon

azure-mssql-db.yml

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ provision:
7171
default: csb-db-${request.instance_id}
7272
constraints:
7373
maxLength: 64
74-
tf_attribute: azurerm_mssql_database.azure_sql_db.name
7574
- field_name: server
7675
type: string
7776
details: Name of server from server_credentials to create database upon

manifest.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,8 @@ terraform_binaries:
3535
source: https://github.com/hashicorp/terraform/archive/v1.5.7.zip
3636
default: true
3737
- name: terraform-provider-azurerm
38-
version: 2.20.0
39-
source: https://github.com/terraform-providers/terraform-provider-azurerm/archive/v2.20.0.zip
40-
- name: terraform-provider-azurerm
41-
version: 2.33.0
42-
source: https://github.com/terraform-providers/terraform-provider-azurerm/archive/v2.33.0.zip
43-
- name: terraform-provider-azurerm
44-
version: 2.99.0
45-
source: https://github.com/terraform-providers/terraform-provider-azurerm/archive/v2.99.0.zip
38+
version: 3.81.0
39+
source: https://github.com/terraform-providers/terraform-provider-azurerm/archive/v3.81.0.zip
4640
- name: terraform-provider-random
4741
version: 3.5.1
4842
source: https://github.com/terraform-providers/terraform-provider-random/archive/v3.5.1.zip

terraform/azure-cosmosdb/provision/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.33.0"
5+
version = ">=3.81.0"
66
}
77
}
88
}

terraform/azure-eventhubs/bind/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.33.0"
5+
version = ">=3.81.0"
66
}
77
}
88
}

terraform/azure-eventhubs/provision/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.33.0"
5+
version = ">=3.81.0"
66
}
77
}
88
}

terraform/azure-mongodb/provision/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.33.0"
5+
version = ">=3.81.0"
66
}
77
}
88
}

terraform/azure-mssql-db-failover/azure-versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.59.0"
5+
version = ">=3.81.0"
66
}
77
}
88
}

terraform/azure-mssql-db/provision/mssql-db-versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ terraform {
77

88
azurerm = {
99
source = "hashicorp/azurerm"
10-
version = ">=2.59.0"
10+
version = ">=3.81.0"
1111
}
1212
}
1313
}

terraform/azure-mssql-failover/provision/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.53.0"
5+
version = ">=3.81.0"
66
}
77
random = {
88
source = "hashicorp/random"

terraform/azure-mssql-server/provision/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.33.0"
5+
version = ">=3.81.0"
66
}
77
random = {
88
source = "hashicorp/random"

terraform/azure-mssql/provision/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.33.0"
5+
version = ">=3.81.0"
66
}
77
random = {
88
source = "hashicorp/random"

terraform/azure-mysql/provision/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.33.0"
5+
version = ">=3.81.0"
66
}
77
random = {
88
source = "hashicorp/random"

terraform/azure-postgres/provision/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.33.0"
5+
version = ">=3.81.0"
66
}
77
random = {
88
source = "hashicorp/random"

terraform/azure-redis/provision/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.33.0"
5+
version = ">=3.81.0"
66
}
77
random = {
88
source = "hashicorp/random"

terraform/azure-resource-group/provision/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.33.0"
5+
version = ">=3.81.0"
66
}
77
}
88
}

terraform/azure-storage/provision/main.tf

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ resource "azurerm_storage_account" "account" {
4848
resource "azurerm_storage_account_network_rules" "account_network_rule" {
4949
count = length(var.authorized_networks) != 0 ? 1 : 0
5050

51-
resource_group_name = local.resource_group
52-
storage_account_name = azurerm_storage_account.account.name
51+
storage_account_id = azurerm_storage_account.account.id
5352

5453
default_action = "Deny"
5554
virtual_network_subnet_ids = var.authorized_networks[*]

terraform/azure-storage/provision/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = ">=2.33.0"
5+
version = ">=3.81.0"
66
}
77
random = {
88
source = "hashicorp/random"

0 commit comments

Comments
 (0)