Skip to content

Commit

Permalink
fix: add example for policy of API
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayzrian committed Dec 12, 2023
1 parent 2fadd6f commit 3251f86
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/03-working-with-serverless-api/07-API-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,34 @@ resource "azurerm_api_management_backend" "products_fa" {
}
```

### Creating API Policy

```terraform
resource "azurerm_api_management_api_policy" "api_policy" {
api_management_name = azurerm_api_management.core_apim.name
api_name = azurerm_api_management_api.products_api.name
resource_group_name = azurerm_resource_group.apim.name
xml_content = <<XML
<policies>
<inbound>
<set-backend-service backend-id="${azurerm_api_management_backend.products_fa.name}"/>
<base/>
</inbound>
<backend>
<base/>
</backend>
<outbound>
<base/>
</outbound>
<on-error>
<base/>
</on-error>
</policies>
XML
}
```

#### Creating API Operation

```terraform
Expand Down

0 comments on commit 3251f86

Please sign in to comment.