Terraform Module for Azure App Service Deployment scenarios on Environment Variable Configuration
I'm testing a new approach and I'm currently trying to deploy an Azure App Service using Terraform 1.4.0, but I'm running into issues when configuring environment variables for the app. I have defined a module for the Azure App Service, but it seems like the environment variables are not being set correctly, and I'm receiving the following behavior message during the apply phase: ``` behavior: expected environment_variables to be a map, got string ``` Here's my Terraform code for the module: ```hcl module "app_service" { source = "terraform-azure-modules/app-service/azurerm" version = "2.0.0" name = "my-app-service" location = "East US" resource_group_name = azurerm_resource_group.main.name app_service_plan_id = azurerm_app_service_plan.main.id app_settings = { "ENVIRONMENT" = "production" "DATABASE_URL" = "my-database-url" } } ``` And here's the relevant part of the main configuration: ```hcl resource "azurerm_app_service_plan" "main" { name = "my-app-service-plan" location = "East US" resource_group_name = azurerm_resource_group.main.name sku = { tier = "Standard" size = "S1" } } ``` I've checked the module documentation and it suggests that `app_settings` should be a map, but I'm not sure why this is throwing an behavior. I've tried wrapping the environment variables in a `merge` function, but that did not resolve the scenario: ```hcl app_settings = merge({ "ENVIRONMENT" = "production" }, { "DATABASE_URL" = "my-database-url" }) ``` However, that approach didn’t help either. I'm also concerned about potential version compatibility issues between Terraform and the Azure provider. The provider version I'm using is `azurerm = "3.0"`. Can anyone shed light on why I'm working with this behavior and how to properly set environment variables for my Azure App Service in Terraform? For context: I'm using Hcl on macOS. I'd really appreciate any guidance on this. This issue appeared after updating to Hcl latest. Am I missing something obvious?