terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

azurerm_windows_function_app doesn't support powershell 7.4

Open djbark opened this issue 9 months ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: 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 and review the contribution guide to help.

Terraform Version

1.8.2

AzureRM Provider Version

3.102.0

Affected Resource(s)/Data Source(s)

azurerm_windows_function_app

Terraform Configuration Files

resource "azurerm_windows_function_app" "example" {
  name                = "example-windows-function-app"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location

  storage_account_name       = azurerm_storage_account.example.name
  storage_account_access_key = azurerm_storage_account.example.primary_access_key
  service_plan_id            = azurerm_service_plan.example.id

    site_config {
        application_stack {
            powershell_core_version            = "7.4"
        }
    }
}

Debug Output/Panic Output

Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: expected site_config.0.application_stack.0.powershell_core_version to be one of ["7" "7.2"], got 7.4
│ 
│   with module.functionapp.azurerm_windows_function_app.example,
│   on functionapp/main.tf line 55, in resource "azurerm_windows_function_app" "example":
│   55:             powershell_core_version            = "7.4"

Expected Behaviour

The function app should be deployed with powershell 7.4 as powershell 7.2 will be deprecated on 08/11/2024

Actual Behaviour

The function app can only be deployed with powershell 7.2 (powershell 7 has already been deprecated)

Steps to Reproduce

Standard terraform plan/deploy.

Important Factoids

No response

References

No response

djbark avatar May 09 '24 15:05 djbark

@djbark yep, you are right. It should be there:

az functionapp list-runtimes --os windows -o table
Runtime          Version
---------------  ---------
dotnet-isolated  8
dotnet-isolated  7
dotnet-isolated  6
dotnet-isolated  .4.8
dotnet           6
node             20
node             18
node             16
node             14
java             17.0
java             11.0
java             8.0
powershell       7.4
powershell       7.2
custom

Chambras avatar May 09 '24 21:05 Chambras

Thanks @djbark for raising this issue, added to the task list, will update the PR link once ready.

xiaxyi avatar May 10 '24 08:05 xiaxyi

Hi @xiaxyi, @Chambras, contributors to azurerm,

please made same change for azurerm_linux_function_app, it has same update for powershell, if modules does not have shared code base.

Thank you.

since81 avatar May 14 '24 08:05 since81

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[bot] avatar Jun 15 '24 02:06 github-actions[bot]