module.app-service.azurerm_linux_web_app.backend_api: Refreshing state... [id=/subscriptions/xxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxx/providers/Microsoft.Web/sites/xxxxxxxxxxx]
╷
│ Error: expected "site_config.0.api_definition_url" to have a host, got api/v3/api-docs.yaml
│
│ with module.app-service.azurerm_linux_web_app.example,
│ on modules/app-service/main.tf line 75, in resource "azurerm_linux_web_app" "example":
│ 75: api_definition_url = "api/v3/api-docs.yaml"
│
╵
Error: Process completed with exit code 1.
Expected Behaviour
Resource created with API definition URL pointing to relative path.
Actual Behaviour
Deployment fails because validation expects URL format only.
module.app-service.azurerm_linux_web_app.backend_api: Refreshing state... [id=/subscriptions/xxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxx/providers/Microsoft.Web/sites/xxxxxxxxxxx]
╷
│ Error: expected "site_config.0.api_definition_url" to have a host, got api/v3/api-docs.yaml
│
│ with module.app-service.azurerm_linux_web_app.example,
│ on modules/app-service/main.tf line 75, in resource "azurerm_linux_web_app" "example":
│ 75: api_definition_url = "api/v3/api-docs.yaml"
│
╵
Error: Process completed with exit code 1.
To verify that relative paths should be accepted I created the App Service in the Azure Portal, and it worked.
According to the field description relative paths are acceptable.
Is there an existing issue for this?
Community Note
Terraform Version
1.3.7
AzureRM Provider Version
3.59.0
Affected Resource(s)/Data Source(s)
azurerm_linux_web_app
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Resource created with API definition URL pointing to relative path.
Actual Behaviour
Deployment fails because validation expects URL format only.
module.app-service.azurerm_linux_web_app.backend_api: Refreshing state... [id=/subscriptions/xxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxx/providers/Microsoft.Web/sites/xxxxxxxxxxx] ╷ │ Error: expected "site_config.0.api_definition_url" to have a host, got api/v3/api-docs.yaml │ │ with module.app-service.azurerm_linux_web_app.example, │ on modules/app-service/main.tf line 75, in resource "azurerm_linux_web_app" "example": │ 75: api_definition_url = "api/v3/api-docs.yaml" │ ╵ Error: Process completed with exit code 1.
Steps to Reproduce
No response
Important Factoids
No response
References
No response