From e7d442aa8c31dc32f002d99d7d47a6eacbf38409 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Mon, 4 Nov 2024 09:21:26 +0100 Subject: [PATCH 1/2] Bump azure/azapi from 1.15.0 to 2.0.1 in /code/infra --- code/infra/function.tf | 12 +++++++----- code/infra/network.tf | 12 ++++++------ code/infra/terraform.tf | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/code/infra/function.tf b/code/infra/function.tf index 2309064..61e897e 100644 --- a/code/infra/function.tf +++ b/code/infra/function.tf @@ -8,7 +8,7 @@ resource "azapi_resource" "function" { type = "SystemAssigned" } - body = jsonencode({ + body = { kind = "functionapp,linux,container" properties = { clientAffinityEnabled = false @@ -171,12 +171,14 @@ resource "azapi_resource" "function" { webSocketsEnabled = false } } - }) + } schema_validation_enabled = false - # ignore_body_changes = [ # Required when app settings are managed in a separate process - # "properties.siteConfig.appSettings" - # ] + # lifecycle { + # ignore_changes = [ + # body.properties.siteConfig.appSettings, # Required when app settings are managed in a separate process + # ] + # } depends_on = [ module.key_vault.key_vault_setup_completed, module.storage_account.storage_setup_completed, diff --git a/code/infra/network.tf b/code/infra/network.tf index e66efed..c5e75a2 100644 --- a/code/infra/network.tf +++ b/code/infra/network.tf @@ -1,9 +1,9 @@ resource "azapi_resource" "subnet_function" { - type = "Microsoft.Network/virtualNetworks/subnets@2022-07-01" + type = "Microsoft.Network/virtualNetworks/subnets@2024-03-01" name = "FunctionSubnet" parent_id = data.azurerm_virtual_network.virtual_network.id - body = jsonencode({ + body = { properties = { addressPrefix = var.subnet_cidr_function delegations = [ @@ -26,15 +26,15 @@ resource "azapi_resource" "subnet_function" { serviceEndpointPolicies = [] serviceEndpoints = [] } - }) + } } resource "azapi_resource" "subnet_private_endpoints" { - type = "Microsoft.Network/virtualNetworks/subnets@2022-07-01" + type = "Microsoft.Network/virtualNetworks/subnets@2024-03-01" name = "PeSubnet" parent_id = data.azurerm_virtual_network.virtual_network.id - body = jsonencode({ + body = { properties = { addressPrefix = var.subnet_cidr_private_endpoints delegations = [] @@ -50,7 +50,7 @@ resource "azapi_resource" "subnet_private_endpoints" { serviceEndpointPolicies = [] serviceEndpoints = [] } - }) + } depends_on = [ azapi_resource.subnet_function diff --git a/code/infra/terraform.tf b/code/infra/terraform.tf index e893906..347b2d9 100644 --- a/code/infra/terraform.tf +++ b/code/infra/terraform.tf @@ -8,7 +8,7 @@ terraform { } azapi = { source = "azure/azapi" - version = "1.15.0" + version = "2.0.1" } time = { source = "hashicorp/time" From b94be8a9434b4332d83d05dd4751e9d87eaee0fd Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Mon, 4 Nov 2024 09:21:47 +0100 Subject: [PATCH 2/2] Bump hashicorp/azurerm from 4.6.0 to 4.8.0 in /code/infra --- code/infra/terraform.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/infra/terraform.tf b/code/infra/terraform.tf index 347b2d9..de705d6 100644 --- a/code/infra/terraform.tf +++ b/code/infra/terraform.tf @@ -4,7 +4,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.6.0" + version = "4.8.0" } azapi = { source = "azure/azapi"