Manages a Custom Action within a Logic App Workflow
resource "azurerm_resource_group" "example" {
name = "workflow-resources"
location = "West Europe"
}
resource "azurerm_logic_app_workflow" "example" {
name = "workflow1"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
}
resource "azurerm_logic_app_action_custom" "example" {
name = "example-action"
logic_app_id = azurerm_logic_app_workflow.example.id
body = <<BODY
{
"description": "A variable to configure the auto expiration age in days. Configured in negative number. Default is -30 (30 days old).",
"inputs": {
"variables": [
{
"name": "ExpirationAgeInDays",
"type": "Integer",
"value": -30
}
]
},
"runAfter": {},
"type": "InitializeVariable"
}
BODY
}
The following arguments are supported:
name
- (Required) Specifies the name of the HTTP Action to be created within the Logic App Workflow. Changing this forces a new resource to be created.logic_app_id
- (Required) Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
body
- (Required) Specifies the JSON Blob defining the Body of this Custom Action.
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Action within the Logic App Workflow.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Logic App Custom Action.update
- (Defaults to 30 minutes) Used when updating the Logic App Custom Action.read
- (Defaults to 5 minutes) Used when retrieving the Logic App Custom Action.delete
- (Defaults to 30 minutes) Used when deleting the Logic App Custom Action.Logic App Custom Actions can be imported using the resource id
, e.g.
terraform import azurerm_logic_app_action_custom.custom1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Logic/workflows/workflow1/actions/custom1