From 41561cdce08b4a82e26a74b5ece211cd632e9b1d Mon Sep 17 00:00:00 2001 From: Shahe Islam Date: Wed, 21 Aug 2024 13:40:42 +0100 Subject: [PATCH] 1839: Adding provider upgrades and correcting Terraform syntax 1839: Adding provider upgrades and correcting Terraform syntax --- terraform/.terraform.lock.hcl | 65 ++++++++++++------------- terraform/app.tf | 13 +++-- terraform/modules/container-app/main.tf | 2 +- terraform/terraform.tf | 4 +- 4 files changed, 43 insertions(+), 41 deletions(-) diff --git a/terraform/.terraform.lock.hcl b/terraform/.terraform.lock.hcl index 9b509de64..08ba146ef 100644 --- a/terraform/.terraform.lock.hcl +++ b/terraform/.terraform.lock.hcl @@ -7,6 +7,7 @@ provider "registry.terraform.io/azure/azapi" { hashes = [ "h1:7hzdY2CU804/ilfqfJ6sohSnZ/5R/6poLaO5BGUTbLA=", "h1:Yca1Jmc3+bBd+w7CuoBmgdpu58vMOz47gak5DLVvcDw=", + "h1:ZQtdLK02ftmNDcpb0Viij7OhC3Mvk5HLC02W5ZM2Q98=", "zh:1bbd3e887b13085aa1d989f11e3fc7c8cf0d81cc8dcfeb58f7f752478f061001", "zh:2c52b4f0bd0e96d8f60c878947a63ae8ea08a735968d8603769f0da4654954b3", "zh:32837d15d002721c20f4561a1b2d44438b066f9812801295d864e0b4c93b6297", @@ -23,46 +24,44 @@ provider "registry.terraform.io/azure/azapi" { } provider "registry.terraform.io/hashicorp/azurerm" { - version = "3.17.0" - constraints = "~> 3.17.0" + version = "3.116.0" + constraints = "~> 3.116.0" hashes = [ - "h1:3AnFUj0foLpWWHsBvIRE6v3DycJziM3lJGiYFeg7kH0=", - "h1:F3JekbiJ1K4eZadbgZ4FzdWflo5/h9Jg+Y2DKdm933g=", - "h1:NpYFAK+qIR/nRQZxnxHmTZMFoxA3spIOUFE6HkmMYlQ=", - "zh:03d2c6e49cd1392c583db88e2c9dcaef53d16d6bb0452a4c9a55baaca7fcd821", - "zh:05e797f57b91284a2a3deb5c75134c330301635932a28d01b55135ae633ee387", - "zh:092e8356721ff4c2965fc99359a8cba9430576ac5f03bbc4c3ffbcdfe89c6519", - "zh:1a3ed20746e0aef1e58d0c59f0b7d6f4ed45c46c17a4c476734ef673046abe06", - "zh:1dbb89d5bdef8734110cb42dcd8cd27f1a349cb8dde1d767ae974b98a3f96542", - "zh:25f3316152574a625216da53bf9d2a3a2353f4425ab2a80400d41cd06de69e67", - "zh:3b5db33b7418cac282744f55794d614405f182f4f0eab3efeefee8edb6d5bfbb", - "zh:623c4276822ac6b8b876d92641e737389a1b47f59321d0c7556d635bced5f1e1", - "zh:a236c9a13fde4ac17493e7ce6c8a2a8b5b15ea3a1604d671a3d947be5be414e0", - "zh:e6b2b6ff4159a23027216d838703e9d8707d24ea58e10028be96788e1fde4b14", - "zh:f2306d7870676f432e7f16d59f7ec0172a77928b943880b18e1cd39dd0f3346e", + "h1:BCR3NIorFSvGG3v/+JOiiw3VM4PkChLO4m84wzD9NDo=", + "zh:02b6606aff025fc2a962b3e568e000300abe959adac987183c24dac8eb057f4d", + "zh:2a23a8ce24ff9e885925ffee0c3ea7eadba7a702541d05869275778aa47bdea7", + "zh:57d10746384baeca4d5c56e88872727cdc150f437b8c5e14f0542127f7475e24", + "zh:59e3ebde1a2e1e094c671e179f231ead60684390dbf02d2b1b7fe67a228daa1a", + "zh:5f1f5c7d09efa2ee8ddf21bd9efbbf8286f6e90047556bef305c062fa0ac5880", + "zh:a40646aee3c9907276dab926e6123a8d70b1e56174836d4c59a9992034f88d70", + "zh:c21d40461bc5836cf56ad3d93d2fc47f61138574a55e972ad5ff1cb73bab66dc", + "zh:c56fb91a5ae66153ba0f737a26da1b3d4f88fdef7d41c63e06c5772d93b26953", + "zh:d1e60e85f51d12fc150aeab8e31d3f18f859c32f927f99deb5b74cb1e10087aa", + "zh:ed35e727e7d79e687cd3d148f52b442961ede286e7c5b4da1dcd9f0128009466", "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", + "zh:f6d2a4e7c58f44e7d04a4a9c73f35ed452f412c97c85def68c4b52814cbe03ab", ] } provider "registry.terraform.io/statuscakedev/statuscake" { - version = "2.1.0" - constraints = "2.1.0" + version = "2.2.2" + constraints = "2.2.2" hashes = [ - "h1:GI/6fNXTYwAcpvo4iES2VbrLJaJg8Lp4TdiQBxyhgTo=", - "zh:00cd46ce1502f0df61eb1f1aa6cac07399f20e48c89033dd53314b733762252d", - "zh:0fddb98d450ae9ad8daa25b1fec5c1e8c6c6487560d52da57b0e71e2531025e9", - "zh:1132ba7edd59a6514a02edb1efac2ca93a79a1831d4cd4d2923330b750aebe2d", + "h1:nVaJkDBk4sv0yWFzg3p+yeJGzE8mB4KJv3Q6/UgU164=", + "zh:0916313344c579d6e05d70f88129a10fe48f7dabe0e61cad17874d6c496f288d", + "zh:0d491ff72c2eda6482855033ca2146c5ace1663d07cb3da7253b59ed2e2ec6f4", + "zh:11fffbce18eb3d3c283e877242f477e0c561342c19090240b60af7d948bd84ac", "zh:1c3e89cf19118fc07d7b04257251fc9897e722c16e0a0df7b07fcd261f8c12e7", - "zh:20c8c16eb2fa16604fbbc0b828f2f74a92a47336e77f7f8cd89cc8f9754cebad", - "zh:20d0471e43f3817f52932fec2a7a8f58cdec79c20ac3d6766024516a237cb9cd", - "zh:36ba9b954c6316ae71d727cb11daf0aa5274bfd845882a22eb12ebbfb1503d14", - "zh:59827eae7136112ea9a45f83fc6bc2807e0980472d27a9faef5ffc329a09c42e", - "zh:8095d102d4d9899017cb5a518e3f4e76f6ea635e6181889b0d2e26ae0c35a847", - "zh:89c45f1f416f30dd95812f322dd13137612a7a57382b446ed2f6c4593e6c8156", - "zh:89f69ab96ae0a70c8270deb40e5a4d84e6c4cfc20c7f1671339c45ef8a5daad2", - "zh:a6bda1fc94bb7b47adb81cde18057037ab0febb3f0272c76addfec35726b72f1", - "zh:b04dedbe459ba39fe82b4a5d71d23f80ac2b11bb5686fdbd92a9118e128bee8d", - "zh:c31851ebcb6fdf745c31900a319fc5e0422019e49ef03406e61f3bcaa61ffc05", - "zh:e08c785ec8703a60362b9f4e66e3b6b1b8b0c8867c0ac87590bab3bd5ab5b3f1", + "zh:1c6116092c59bc0010e147dc7832ae981d528f235cef563e5ae05a93ef8bac5c", + "zh:1f13a543b1d32cc1f1e3d2ed5ca83445f088787c335690fe20dee1203488a8bc", + "zh:23f55fd0714696c3863f892646a79a780cea1923c0c4d2b1064df735ba4156f5", + "zh:288fbb4431ac12014aa5aab10ee7166dfe71fd1158464e06e8a527aa4919e64e", + "zh:2a0746d3c8cdc7d0875df0f4605d81130e6da0ce6196d0f5f8661fe9191bc2ab", + "zh:31d660756abc53d252906fe1239fad58ecb6c1d0dbb087408a8af266be1f9ae4", + "zh:6765281d1b7efb41085c5375660b6c6b271babc5d09b2c030bec7176f7a7bfb6", + "zh:6d7204eadb667c1f2cab762a7a97234cf47452f0ecad680f5106c8fd02524c87", + "zh:b70a97b0eba471d683e23ce8744a5c67ef9952086e2d6f5825b72f32b6caff89", + "zh:df89ee4aaba88faea33d33384a36ea52588b5514644d335f724378a682d8d9da", + "zh:ffe2e1e7224ea5f4dd65b9eef45464e3124cfc824473b04e7af429f9177f2375", ] } diff --git a/terraform/app.tf b/terraform/app.tf index 696b2f067..504b29f5b 100644 --- a/terraform/app.tf +++ b/terraform/app.tf @@ -173,6 +173,7 @@ resource "azurerm_service_plan" "service-plan" { } } +#All ip_restriction properties need to be included due to the bug raised here: https://github.com/hashicorp/terraform-provider-azurerm/issues/17189 resource "azurerm_linux_web_app" "auth-server-app" { name = local.auth_server_app_name location = data.azurerm_resource_group.group.location @@ -188,21 +189,23 @@ resource "azurerm_linux_web_app" "auth-server-app" { http2_enabled = true minimum_tls_version = "1.2" health_check_path = "/health" - #All ip_restriction properties need to be included due to the bug raised here: https://github.com/hashicorp/terraform-provider-azurerm/issues/17189 - ip_restriction = [{ + + ip_restriction { name = "FrontDoor" action = "Allow" priority = 1 - headers = [{ + + headers { x_azure_fdid = [local.infrastructure_secrets.FRONTDOOR_ID] x_fd_health_probe = [] x_forwarded_for = [] x_forwarded_host = [] - }] + } + service_tag = "AzureFrontDoor.Backend" ip_address = null virtual_network_subnet_id = null - }] + } } sticky_settings { diff --git a/terraform/modules/container-app/main.tf b/terraform/modules/container-app/main.tf index 81d4e4cc9..cda57aabd 100644 --- a/terraform/modules/container-app/main.tf +++ b/terraform/modules/container-app/main.tf @@ -1,7 +1,7 @@ locals { generated_yaml_path = abspath("${path.module}/.terraform/temp/container-app-${sha1(var.app_definition_yaml)}.yml") - app_name = yamldecode(var.app_definition_yaml).name + app_name = yamldecode(var.app_definition_yaml).name resource_group = yamldecode(var.app_definition_yaml).resourcegroup } diff --git a/terraform/terraform.tf b/terraform/terraform.tf index 1764110a2..7e3c960e6 100644 --- a/terraform/terraform.tf +++ b/terraform/terraform.tf @@ -8,7 +8,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "~> 3.17.0" + version = "~> 3.116.0" } azapi = { @@ -18,7 +18,7 @@ terraform { statuscake = { source = "StatusCakeDev/statuscake" - version = "2.1.0" + version = "2.2.2" } } }