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

Unable to set api_management_api_id to null for unlinking API Management from Web App #28266

Open
1 task done
sametnur opened this issue Dec 12, 2024 · 0 comments
Open
1 task done

Comments

@sametnur
Copy link

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 comments along the lines of "+1", "me too" or "any updates", 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.5.0

AzureRM Provider Version

3.0.0

Affected Resource(s)/Data Source(s)

azurerm_windows_web_app

Terraform Configuration Files

resource "azurerm_windows_web_app" "wa" {
  name                = "example-web-app"
  resource_group_name = "example-rg"
  location            = "North Europe"
  
  site_config {
    api_management_api_id = null
  }
}

Debug Output/Panic Output

1- Associate a web app with an APIM using the api_management_api_id parameter in Terraform.
2- Attempt to unlink the APIM by updating the configuration with:
   api_management_api_id = null

3- Apply the Terraform changes.

Expected Behaviour

The id field should be set to null, as follows:

"apiManagementConfig": {
"id": null
}

Actual Behaviour

The web app configuration reflects the following incorrect state:

"apiManagementConfig": {
"id": ""
}

Steps to Reproduce

To resolve the issue, I had to manually update the web app configuration using Azure CLI to set the id field to null

echo '{
"apiManagementConfig": {
"id": null
}
}' > config.json

az webapp config set --name --resource-group --generic-configurations @config.json --debug

Important Factoids

No response

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant