Skip to content

Commit 79d597c

Browse files
feat: upgrade minimum terraform provider versions
one key change in azurerm is that service principals now need to be referenced by object_id for assignment instead of by id because the provider changed the internal format
1 parent eb74afd commit 79d597c

File tree

12 files changed

+27
-25
lines changed

12 files changed

+27
-25
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
- Upgraded minimum terraform provider versions
11+
1012
## [v0.10.0]
1113

1214
### Added

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,15 @@ Before opening a Pull Request, please do the following:
172172
|------|---------|
173173
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | > 1.1 |
174174
| <a name="requirement_azapi"></a> [azapi](#requirement\_azapi) | >=1.13.1 |
175-
| <a name="requirement_azuread"></a> [azuread](#requirement\_azuread) | >=2.46.0 |
176-
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >=3.81.0 |
175+
| <a name="requirement_azuread"></a> [azuread](#requirement\_azuread) | >=3.0.2 |
176+
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >=4.11.0 |
177177

178178
## Providers
179179

180180
| Name | Version |
181181
|------|---------|
182182
| <a name="provider_azuread"></a> [azuread](#provider\_azuread) | 3.0.2 |
183-
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 4.5.0 |
183+
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 4.11.0 |
184184

185185
## Modules
186186

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ terraform {
33
required_providers {
44
azurerm = {
55
source = "hashicorp/azurerm"
6-
version = ">=3.81.0"
6+
version = ">=4.11.0"
77
}
88
azuread = {
99
source = "hashicorp/azuread"
10-
version = ">=2.46.0"
10+
version = ">=3.0.2"
1111
}
1212
azapi = {
1313
source = "Azure/azapi"

modules/meshcloud-mca-service-principal/module.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ terraform {
77
required_providers {
88
azurerm = {
99
source = "hashicorp/azurerm"
10-
version = ">=3.81.0"
10+
version = ">=4.11.0"
1111
}
1212
azuread = {
1313
source = "hashicorp/azuread"
14-
version = ">=2.46.0"
14+
version = ">=3.0.2"
1515
}
1616
azapi = {
1717
source = "Azure/azapi"

modules/meshcloud-metering-service-principal/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
| Name | Version |
55
|------|---------|
66
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | > 1.0 |
7-
| <a name="requirement_azuread"></a> [azuread](#requirement\_azuread) | >=2.46.0 |
8-
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >=3.81.0 |
7+
| <a name="requirement_azuread"></a> [azuread](#requirement\_azuread) | >=3.0.2 |
8+
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >=4.11.0 |
99

1010
## Providers
1111

1212
| Name | Version |
1313
|------|---------|
1414
| <a name="provider_azuread"></a> [azuread](#provider\_azuread) | 3.0.2 |
15-
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 4.5.0 |
15+
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 4.11.0 |
1616
| <a name="provider_time"></a> [time](#provider\_time) | 0.12.1 |
1717

1818
## Modules

modules/meshcloud-metering-service-principal/module.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ terraform {
66
required_providers {
77
azurerm = {
88
source = "hashicorp/azurerm"
9-
version = ">=3.81.0"
9+
version = ">=4.11.0"
1010
}
1111
azuread = {
1212
source = "hashicorp/azuread"
13-
version = ">=2.46.0"
13+
version = ">=3.0.2"
1414
}
1515
}
1616
}
@@ -22,7 +22,7 @@ resource "azurerm_role_assignment" "meshcloud_metering" {
2222
for_each = toset(var.assignment_scopes)
2323
scope = each.key
2424
role_definition_name = "Cost Management Reader"
25-
principal_id = azuread_service_principal.meshcloud_metering.id
25+
principal_id = azuread_service_principal.meshcloud_metering.object_id
2626
depends_on = [azuread_service_principal.meshcloud_metering]
2727
}
2828

modules/meshcloud-metering-service-principal/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
output "credentials" {
22
description = "Service Principal application id and object id"
33
value = {
4-
Enterprise_Application_Object_ID = azuread_service_principal.meshcloud_metering.id
4+
Enterprise_Application_Object_ID = azuread_service_principal.meshcloud_metering.object_id
55
Application_Client_ID = azuread_application.meshcloud_metering.client_id
66
Client_Secret = var.create_password ? "Execute `terraform output metering_service_principal_password` to see the password" : "No password was created"
77
}

modules/meshcloud-replicator-service-principal/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
| Name | Version |
55
|------|---------|
66
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | > 1.0 |
7-
| <a name="requirement_azuread"></a> [azuread](#requirement\_azuread) | >=2.46.0 |
8-
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >=3.81.0 |
7+
| <a name="requirement_azuread"></a> [azuread](#requirement\_azuread) | >=3.0.2 |
8+
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >=4.11.0 |
99

1010
## Providers
1111

1212
| Name | Version |
1313
|------|---------|
1414
| <a name="provider_azuread"></a> [azuread](#provider\_azuread) | 3.0.2 |
15-
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 4.5.0 |
15+
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 4.11.0 |
1616
| <a name="provider_terraform"></a> [terraform](#provider\_terraform) | n/a |
1717
| <a name="provider_time"></a> [time](#provider\_time) | 0.12.1 |
1818

modules/meshcloud-replicator-service-principal/module.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ terraform {
66
required_providers {
77
azurerm = {
88
source = "hashicorp/azurerm"
9-
version = ">=3.81.0"
9+
version = ">=4.11.0"
1010
}
1111
azuread = {
1212
source = "hashicorp/azuread"
13-
version = ">=2.46.0"
13+
version = ">=3.0.2"
1414
}
1515
}
1616
}
@@ -187,20 +187,20 @@ resource "azurerm_role_assignment" "meshcloud_replicator" {
187187
for_each = toset(var.assignment_scopes)
188188
scope = each.key
189189
role_definition_id = azurerm_role_definition.meshcloud_replicator.role_definition_resource_id
190-
principal_id = azuread_service_principal.meshcloud_replicator.id
190+
principal_id = azuread_service_principal.meshcloud_replicator.object_id
191191
}
192192

193193
resource "azurerm_role_assignment" "meshcloud_replicator_subscription_canceler" {
194194
for_each = toset(var.can_cancel_subscriptions_in_scopes)
195195
scope = each.key
196196
role_definition_id = azurerm_role_definition.meshcloud_replicator_subscription_canceler.role_definition_resource_id
197-
principal_id = azuread_service_principal.meshcloud_replicator.id
197+
principal_id = azuread_service_principal.meshcloud_replicator.object_id
198198
}
199199

200200
resource "azurerm_role_assignment" "meshcloud_replicator_rg_deleter" {
201201
for_each = toset(var.can_delete_rgs_in_scopes)
202202
scope = each.key
203-
principal_id = azuread_service_principal.meshcloud_replicator.id
203+
principal_id = azuread_service_principal.meshcloud_replicator.object_id
204204

205205
# The azurerm provider requires this must be a scoped id, so unfortuantely we need to construct the id of the role
206206
# definition at the assignment scope in order to make this stable for subsequent terraform apply's.

modules/meshcloud-replicator-service-principal/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
output "credentials" {
22
description = "Service Principal application id and object id"
33
value = {
4-
Enterprise_Application_Object_ID = azuread_service_principal.meshcloud_replicator.id
4+
Enterprise_Application_Object_ID = azuread_service_principal.meshcloud_replicator.object_id
55
Application_Client_ID = azuread_application.meshcloud_replicator.client_id
66
Client_Secret = var.create_password ? "Execute `terraform output replicator_service_principal_password` to see the password" : "No password was created"
77
}

modules/meshcloud-sso/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| Name | Version |
55
|------|---------|
66
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | > 1.0 |
7-
| <a name="requirement_azuread"></a> [azuread](#requirement\_azuread) | >=2.46.0 |
7+
| <a name="requirement_azuread"></a> [azuread](#requirement\_azuread) | >=3.0.2 |
88

99
## Providers
1010

modules/meshcloud-sso/module.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
azuread = {
55
source = "hashicorp/azuread"
6-
version = ">=2.46.0"
6+
version = ">=3.0.2"
77
}
88
}
99
}

0 commit comments

Comments
 (0)