I have Terraform module for Azure API management, in azurerm_api_management resource policy attribute is required.
Value for policy attribute must be received from file:
data "local_file" "apim_global" {
filename = "${var.ados_release_dir}/${var.apim_policy_artifact}/api-management/global.xml"
}
module "pau-apim" {
...
policy = {
xml_content = "${data.local_file.apim_global.content}"
}
...
In Terraform module policy variable is defined as type of any:
variable "policy" {
type = any
description = "A mapping of policy to assign to the apim."
default = null
}
Any ideas how to fix it?

azurerm_api_management.apiresource in the module as well? It looks like that's where the error is coming from rather than the module variable. - ydaetskcoR