Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure - azurerm_app_service - Unable to apply health_check_path in site_config #8512

Closed
ghost opened this issue Sep 17, 2020 · 3 comments
Closed

Comments

@ghost
Copy link

ghost commented Sep 17, 2020

This issue was originally opened by @PrykorTech as hashicorp/terraform#26256. It was migrated here as a result of the provider split. The original body of the issue is below.


Hi Team,

We've been looking at using health_check_path for azurerm_app_service however the property does not seem to work. I know its only been in production in Azure for a few weeks now, wondering if its functional within terraform?

https://www.terraform.io/docs/providers/azurerm/r/app_service.html

Terraform Version

0.13.2

Terraform Configuration Files

main.tf

terraform {
  backend "azurerm" {
    resource_group_name  = "euw-dev-contact-shared-infra-rs"
    storage_account_name = "euwdevcontacttfstorage"
    container_name       = "contact-dev-tstate"
    key                  = "history-dev-terraform.tfstate"
  }

  required_version = ">= 0.12"
}

provider "azurerm" {
  version         = "=2.5.0"
  subscription_id = "becc0df4-44f7-4070-a1a9-193c51e7b22b"
  features {}
}

module "main" {
  source = "../modules/history"

  environment        = "dev"
  container_tag      = var.container_tag
  webapp_tier        = "Standard"
  webapp_sku_size    = "S1"
  use_32_bit_process = false

  providers = {
    azurerm     = azurerm
    azurerm.dev = azurerm
  }
}

variable "container_tag" {
  default = "latest"
}

azurerm_app_service

resource "azurerm_app_service" "app_service" {
  name                = "${local.name_prefix}-appservice"
  location            = azurerm_resource_group.resource_group.location
  resource_group_name = azurerm_resource_group.resource_group.name
  app_service_plan_id = azurerm_app_service_plan.app_service_plan.id

  site_config {
    health_check_path         = "/contact/history/v1/_status"
    always_on                 = true
    use_32_bit_worker_process = var.use_32_bit_process
  }

  identity {
    type = "SystemAssigned"
  }

  lifecycle {
    ignore_changes = [
      site_config[0].linux_fx_version,
      # deployments are made outside of Terraform
      app_settings,
    ]
    prevent_destroy = true
  }

  tags = {
    sub_type    = var.sub_type
    team_number = var.team_number
  }
}

Expected Behavior

Terraform applies the health check path to the app service

Actual Behavior

Terraform complains An argument named "health_check_path" is not expected here.

Steps to Reproduce

  1. terraform init
  2. terraform validate
@njuCZ
Copy link
Contributor

njuCZ commented Sep 28, 2020

@PrykorTech the field "health_check_path" is only supported in version >= 2.9 through this changelog: https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/CHANGELOG-v2.md#290-may-07-2020 and you are using azurerm v2.5. could you please upgrade your azurerm and have a try? I have tried the latest azurerm and it could success in my local

@tombuildsstuff
Copy link
Member

👋

Since this should be fixed by updating the version of the Azure Provider being used here, I'm going to close this issue for the moment - but please let us know if that doesn't work for you and we'll take another look.

Thanks!

@ghost
Copy link
Author

ghost commented Nov 25, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants