hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.6k stars 4.65k forks source link

azurerm_linux_function_app_slot doesn't allow for TLS 1.3 #28008

Open dvasdekis opened 1 day ago

dvasdekis commented 1 day ago

Is there an existing issue for this?

Community Note

Terraform Version

1.9.8

AzureRM Provider Version

4.9.0

Affected Resource(s)/Data Source(s)

azurerm_linux_function_app_slot

Terraform Configuration Files

resource "azurerm_linux_function_app_slot" "linuxfuncapp-staging-c" {
  name                          = "staging"
  function_app_id               = azurerm_linux_function_app.linuxfuncapp-c[0].id
  storage_account_name          = azurerm_linux_function_app.linuxfuncapp-c[0].storage_account_name
  storage_account_access_key    = azurerm_storage_account.func_lake.primary_access_key
  builtin_logging_enabled       = true
  public_network_access_enabled = true
  https_only                    = true
  identity { type = "SystemAssigned" }
  site_config {
    always_on                              = false
    http2_enabled                          = true
    minimum_tls_version                    = "1.3"
  }
}

Debug Output/Panic Output

Error: expected site_config.0.minimum_tls_version to be one of ["1.0" "1.1" "1.2"], got 1.3
│
│   with module.sciops-jiraticketaudit-linuxfuncapp.azurerm_linux_function_app_slot.linuxfuncapp-staging-c[0],
│   on ..\..\patterns\components\function_app\resources.tf line 739, in resource "azurerm_linux_function_app_slot" "linuxfuncapp-staging-c":
│  739:     minimum_tls_version                    = "1.3"
│

Expected Behaviour

Successful apply

Actual Behaviour

azurerm_linux_function_app_slot should apply TLS version 1.3, same as azurerm_linux_function_app. I am able to manually set the TLS to version 1.3 in the staging slot via clickops:

image

Steps to Reproduce

terraform apply

Important Factoids

No

References

No response

ziyeqf commented 1 day ago

Hi @dvasdekis, thanks for reporting.

I just submitted a PR (#28016) for this issue, it's still draft as the tests are in progress. You can subscribe it to keep track, once it merged and released this should be supported.

For any further questions please leave comments. Thanks.