admin管理员组

文章数量:1355658

I have a terraform script to create an ASP.NET Core 9.0 on Azure using the following snippet:

resource "azurerm_linux_web_app" "webapp" {
  name                = var.management_portal.name
  location            = var.resource_group.location
  resource_group_name = var.resource_group.name
  service_plan_id     = azurerm_service_plan.service_plan.id
  https_only = true
  site_config {
    application_stack {
      dotnet_version = "9.0"
    }
    always_on = true
  }
  app_settings = {
    "WEBSITES_ENABLE_APP_SERVICE_STORAGE" = "false"
  }
}

After running the script and deploying the asp application using Azure DevOps pipeline, I realized the following entries were not populated by terraform causing the app not to run; and, what you see on this screenshot are manually selected and applied by myself:

After choosing the entries above the asp core's web page appeared on the browser. How to resolve this issue such that a manual intervention to set the stack settings should not be necessary.

This my provider:

required_providers {
    azurerm = {
        source  = "hashicorp/azurerm"
        version = "4.25.0"
    }
}

I have a terraform script to create an ASP.NET Core 9.0 on Azure using the following snippet:

resource "azurerm_linux_web_app" "webapp" {
  name                = var.management_portal.name
  location            = var.resource_group.location
  resource_group_name = var.resource_group.name
  service_plan_id     = azurerm_service_plan.service_plan.id
  https_only = true
  site_config {
    application_stack {
      dotnet_version = "9.0"
    }
    always_on = true
  }
  app_settings = {
    "WEBSITES_ENABLE_APP_SERVICE_STORAGE" = "false"
  }
}

After running the script and deploying the asp application using Azure DevOps pipeline, I realized the following entries were not populated by terraform causing the app not to run; and, what you see on this screenshot are manually selected and applied by myself:

After choosing the entries above the asp core's web page appeared on the browser. How to resolve this issue such that a manual intervention to set the stack settings should not be necessary.

This my provider:

required_providers {
    azurerm = {
        source  = "hashicorp/azurerm"
        version = "4.25.0"
    }
}
Share Improve this question edited Mar 30 at 18:47 marc_s 756k184 gold badges1.4k silver badges1.5k bronze badges asked Mar 30 at 15:39 ArashArash 4,2767 gold badges50 silver badges82 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

After some investigating and narrowing down the issue, it turns out the release pipeline was the culprit not the terraform script. We need to ensure not to specify the .NET SDK version in the release pipeline's deployment task.

本文标签: