-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "anypoint_apim_policy_custom Resource - terraform-provider-anypoint" | ||
subcategory: "" | ||
description: |- | ||
Create and manage an API Policy of any type. | ||
--- | ||
|
||
# anypoint_apim_policy_custom (Resource) | ||
|
||
Create and manage an API Policy of any type. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "anypoint_apim_policy_custom" "policy_custom_01" { | ||
org_id = var.root_org | ||
env_id = var.env_id | ||
apim_id = anypoint_apim_mule4.api.id | ||
disabled = false | ||
asset_group_id="68ef9520-24e9-4cf2-b2f5-620025690913" | ||
asset_id="client-id-enforcement" | ||
asset_version = "1.3.2" | ||
configuration_data = jsonencode({ | ||
credentialsOriginHasHttpBasicAuthenticationHeader = "customExpression" | ||
clientIdExpression = "#[attributes.headers['client_id']]" | ||
clientSecretExpression = "#[attributes.headers['client_secret']]" | ||
}) | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `apim_id` (String) The api manager instance id where the api instance is defined. | ||
- `asset_group_id` (String) The policy template group id in anypoint exchange. Don't change unless mulesoft has renamed the policy group id. | ||
- `asset_id` (String) The policy template id in anypoint exchange. Don't change unless mulesoft has renamed the policy asset id. | ||
- `asset_version` (String) the policy template version in anypoint exchange. | ||
- `configuration_data` (String) The policy configuration data in json format | ||
- `env_id` (String) The environment id where api instance is defined. | ||
- `org_id` (String) The organization id where the api instance is defined. | ||
|
||
### Optional | ||
|
||
- `disabled` (Boolean) Whether the policy is disabled. | ||
- `last_updated` (String) The last time this resource has been updated locally. | ||
- `pointcut_data` (Block List) The method & resource conditions (see [below for nested schema](#nestedblock--pointcut_data)) | ||
|
||
### Read-Only | ||
|
||
- `audit` (Map of String) The instance's auditing data | ||
- `id` (String) The policy's unique id | ||
- `master_organization_id` (String) The organization id where the api instance is defined. | ||
- `order` (Number) The policy order. | ||
- `policy_template_id` (String) The policy template id | ||
|
||
<a id="nestedblock--pointcut_data"></a> | ||
### Nested Schema for `pointcut_data` | ||
|
||
Required: | ||
|
||
- `method_regex` (Set of String) The list of HTTP methods | ||
- `uri_template_regex` (String) URI template regex | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# In order for the import to work, you should provide a ID composed of the following: | ||
# {ORG_ID}/{ENV_ID}/{API_ID}/{API_POLICY_ID} | ||
|
||
terraform import \ | ||
-var-file params.tfvars.json \ #variables file | ||
anypoint_apim_policy_custom.policy_custom_01 \ #resource name | ||
aa1f55d6-213d-4f60-845c-207286484cd1/7074fcdd-9b23-4ab3-97c8-5db5f4adf17d/19250669/4720771 #resource ID | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters