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

azurerm_windows_function_app not correctly created with Java 11 application stack #16375

Closed
1 task done
AaldertVanWijk-TomTom opened this issue Apr 13, 2022 · 5 comments
Closed
1 task done

Comments

@AaldertVanWijk-TomTom
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.1.7

AzureRM Provider Version

3.1.0

Affected Resource(s)/Data Source(s)

azurerm_windows_function_app

Terraform Configuration Files

resource "azurerm_windows_function_app" "this" {
  name                       = local.computed_name
  location                   = azurerm_resource_group.this.location
  resource_group_name        = azurerm_resource_group.this.name
  service_plan_id            = azurerm_service_plan.this.id
  storage_account_name       = azurerm_storage_account.this.name
  storage_account_access_key = azurerm_storage_account.this.primary_access_key

  functions_extension_version = "~4"

  https_only   = true
  app_settings = {
    "API_TOMTOM_KEY" = var.api_tomtom_key
    "WEBSITE_RUN_FROM_PACKAGE" = "1"
    "WEBSITE_ADD_SITENAME_BINDINGS_IN_APPHOST_CONFIG" = 1
    "SCALYR_KEY" = var.scalyr_key
    "STAGE" = var.stage
  }

  site_config {
    application_stack {
      java_version = "11"
    }
    default_documents = []
    http2_enabled = true
    always_on = var.service_plan_sku != "Y1"

    dynamic "ip_restriction" {
      for_each = local.all_ips
      content {
        name       = ip_restriction.key
        ip_address = ip_restriction.value
        action     = "Allow"
        headers    = []
      }
    }
  }

  tags = local.tags
}

Debug Output/Panic Output

none

Expected Behaviour

with azurerm 3.0.2 this deploys a perfectly functional java function app.

Actual Behaviour

with azurerm 3.1.0 the configuration regarding Java is missing/wrong and the app does not function

Steps to Reproduce

deploy a functioning azurerm_windows_function_app with java 11 with azurerm 3.0.2
redeploy with 3.1.0

Important Factoids

No response

References

No response

@AaldertVanWijk-TomTom
Copy link
Contributor Author

AaldertVanWijk-TomTom commented Apr 13, 2022

Actually, upon further working with this and going back to azurerm 3.0.2. I Als see it happening there intermittently.
to be honest I don't really have a consistent way of reproducing the issue. (I did taint -> plan -> apply ±10 times and failed 80% of the time)

Also as a general observation. It is worrying to me that if the deployment fails. I see quite different things in the UI of azure, However Terraform does not see any differences.
This indicates to me that the azurerm provider gets an incomplete view of the actual resources in azure. and is unable to compare it properly against it's actual and desired state 🤯

@xiaxyi
Copy link
Contributor

xiaxyi commented Jun 30, 2022

Thanks @AaldertVanWijk-TomTom ,this is Java version issue in TF, I will submit a pr to fix it.

@MajaStojkovic-TomTom
Copy link

Is there any ETA on when we could expect the PR with the fix to be merged?

@rcskosir
Copy link
Contributor

Thanks for taking the time to submit this issue. #19685 supersedes #18076, and has been merged. As such I am going to mark this issue as closed. If you are still seeing this issue, please let us know so we can reopen this issue.

Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants