I'm attempting to use AzAPI to retrieve the publishing profile of an Azure Function. Publishing Profile
I'm using the "azapi_resource_action" data source for this retrieval. Enabling tracing, I can see the successful call and response (200) as well as the return xml. However, since the response is xml it doesn't appear to be captured and stored in the state file.
`data "azurerm_resource_group" "rg" {
name = "rg-sftest2-dev"
}
data "azurerm_function_app" "funcapp" {
name = "sftest22"
resource_group_name = data.azurerm_resource_group.rg.name
}
data "azapi_resource_action" "fa_xml" {
type = "Microsoft.Web/sites@2022-03-01"
resource_id = data.azurerm_function_app.funcapp.id
action = "publishxml"
body = jsonencode({"format"="WebDeploy"})
response_export_values = ["*"]
}`
Am I doing something wrong, or is AzAPI unable to handle responses that are not json?
I'm attempting to use AzAPI to retrieve the publishing profile of an Azure Function. Publishing Profile
I'm using the "azapi_resource_action" data source for this retrieval. Enabling tracing, I can see the successful call and response (200) as well as the return xml. However, since the response is xml it doesn't appear to be captured and stored in the state file.
`data "azurerm_resource_group" "rg" { name = "rg-sftest2-dev" }
data "azurerm_function_app" "funcapp" { name = "sftest22" resource_group_name = data.azurerm_resource_group.rg.name }
data "azapi_resource_action" "fa_xml" { type = "Microsoft.Web/sites@2022-03-01" resource_id = data.azurerm_function_app.funcapp.id action = "publishxml" body = jsonencode({"format"="WebDeploy"}) response_export_values = ["*"] }`
Am I doing something wrong, or is AzAPI unable to handle responses that are not json?
Thanks!