Skip to content

Commit

Permalink
1839: Adding provider upgrades and correcting Terraform syntax
Browse files Browse the repository at this point in the history
1839: Adding provider upgrades and correcting Terraform syntax
  • Loading branch information
shaheislamdfe committed Aug 21, 2024
1 parent 24c797b commit 41561cd
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 41 deletions.
65 changes: 32 additions & 33 deletions terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions terraform/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/container-app/main.tf
Original file line number Diff line number Diff line change
@@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions terraform/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.17.0"
version = "~> 3.116.0"
}

azapi = {
Expand All @@ -18,7 +18,7 @@ terraform {

statuscake = {
source = "StatusCakeDev/statuscake"
version = "2.1.0"
version = "2.2.2"
}
}
}

0 comments on commit 41561cd

Please sign in to comment.