azurerm_api_management_product_policy

Manages an API Management Product Policy

Example Usage

data "azurerm_api_management_product" "example" {
  product_id          = "my-product"
  api_management_name = "example-apim"
  resource_group_name = "search-service"
}

resource "azurerm_api_management_product_policy" "example" {
  product_id          = data.azurerm_api_management_product.example.product_id
  api_management_name = data.azurerm_api_management_product.example.api_management_name
  resource_group_name = data.azurerm_api_management_product.example.resource_group_name

  xml_content = <<XML
<policies>
  <inbound>
    <find-and-replace from="xyz" to="abc" />
  </inbound>
</policies>
XML

}

Argument Reference

The following arguments are supported:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

API Management Product Policy can be imported using the resource id, e.g.

terraform import azurerm_api_management_product_policy.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/products/product1