Open schwarzzz opened 2 years ago
@schwarzzz The resource is being deprecated, can you try azurerm_windows_funtion_app
and azurerm_linux_funtion_app
?
I would say this is the same that what is described on this issue -> https://github.com/hashicorp/terraform-provider-azurerm/issues/21320
We're suffering that and we have continuous drift after bumping to 3.49.0
@pacoguzman I tried to reproduce this issue, if auth -> false, auth is actually disabled from the API side, just Terraform not setting the enable -> false in state.
I may not have exactly the same production environment as yours, so just would like to confirm with you, whether the Api sets the auth enabled to false is what you expected?
I see two properties are different between the instance that have auth turned off during initial creation and the instance with auth turned off during update:
Community Note
Problem Description
I stumbled upon this while investigating a checkov code analysis finding (CKV_AZURE_56). I activated authentication on an
azurerm_function_app
and then removed the corresponding codeauth_settings
block again.auth_settings
block, authentication is disabledenabled = true
enables authenticationauth_settings
block does not deactivate authentication=> The Terraform configuration does not represent the state of the resource in Azure.
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_function_app
Terraform Configuration Files
Expected Behaviour
When the
auth_settings
block is removed, Terraform should remove theauth_settings
feature and set it toenabled = false
. Authentication will be deactived.Actual Behaviour
When the
auth_settings
block is removed,terraform plan
showsNo changes.
Authentication remains active.Steps to Reproduce
auth_settings
blockauth_settings
block and apply the configurationKeeping the
auth_settings
block and settingenabled = false
disables authentication again.