» azurerm_api_management_api_operation_policy

Manages an API Management API Operation Policy

» Example Usage

resource "azurerm_api_management_api_operation" "example" {
  ...
}

resource "azurerm_api_management_api_operation_policy" "example" {
  api_name              = "${azurerm_api_management_api_operation.example.api_name}"
  api_management_name   = "${azurerm_api_management_api_operation.example.api_management_name}"
  resource_group_name   = "${azurerm_api_management_api_operation.example.resource_group_name}"
  operation_id          = "${azurerm_api_management_api_operation.example.operation_id}"
  xml_content           = <<XML
<policies>
  <inbound>
    <find-and-replace from="xyz" to="abc" />
  </inbound>
</policies>
XML
}

» Argument Reference

The following arguments are supported:

  • api_name - (Required) The ID of the API Management API Operation within the API Management Service. Changing this forces a new resource to be created.

  • api_management_name - (Required) The name of the API Management Service. Changing this forces a new resource to be created.

  • resource_group_name - (Required) The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.

  • xml_content - (Optional) The XML Content for this Policy.

  • xml_link - (Optional) A link to a Policy XML Document, which must be publicly available.

» Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The ID of the API Management API Operation Policy.

» Import

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

terraform import azurerm_api_management_api_operation_policy.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/instance1/apis/api1/operations/operation1/policies/policy