Skip to content

azurermLogicAppActionHttp

Manages an HTTP Action within a Logic App Workflow

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "workflow-resources",
  }
);
const azurermLogicAppWorkflowExample =
  new azurerm.logicAppWorkflow.LogicAppWorkflow(this, "example_1", {
    location: azurermResourceGroupExample.location,
    name: "workflow1",
    resource_group_name: azurermResourceGroupExample.name,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermLogicAppWorkflowExample.overrideLogicalId("example");
const azurermLogicAppActionHttpExample =
  new azurerm.logicAppActionHttp.LogicAppActionHttp(this, "example_2", {
    logic_app_id: azurermLogicAppWorkflowExample.id,
    method: "GET",
    name: "webhook",
    uri: "http://example.com/some-webhook",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermLogicAppActionHttpExample.overrideLogicalId("example");

Argument Reference

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.

-> NOTE: This name must be unique across all Actions within the Logic App Workflow.

  • logicAppId - (Required) Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.

  • method - (Required) Specifies the HTTP Method which should be used for this HTTP Action. Possible values include delete, get, patch, post and put.

  • uri - (Required) Specifies the URI which will be called when this HTTP Action is triggered.

  • body - (Optional) Specifies the HTTP Body that should be sent to the uri when this HTTP Action is triggered.

  • headers - (Optional) Specifies a Map of Key-Value Pairs that should be sent to the uri when this HTTP Action is triggered.

  • queries - (Optional) Specifies a Map of Key-Value Pairs that should be sent to the uri when this HTTP Action is triggered.

  • runAfter - (Optional) Specifies the place of the HTTP Action in the Logic App Workflow. If not specified, the HTTP Action is right after the Trigger. A runAfter block is as defined below.


A runAfter block supports the following:

  • actionName - (Required) Specifies the name of the precedent HTTP Action.

  • actionResult - (Required) Specifies the expected result of the precedent HTTP Action, only after which the current HTTP Action will be triggered. Possible values include succeeded, failed, skipped and timedOut.

Attributes Reference

The following attributes are exported:

  • id - The ID of the HTTP Action within the Logic App Workflow.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Logic App HTTP Action.
  • update - (Defaults to 30 minutes) Used when updating the Logic App HTTP Action.
  • read - (Defaults to 5 minutes) Used when retrieving the Logic App HTTP Action.
  • delete - (Defaults to 30 minutes) Used when deleting the Logic App HTTP Action.

Import

Logic App HTTP Actions can be imported using the resourceId, e.g.

terraform import azurerm_logic_app_action_http.webhook1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Logic/workflows/workflow1/actions/webhook1

-> NOTE: This ID is unique to Terraform and doesn't directly match to any other resource. To compose this ID, you can take the ID Logic App Workflow and append /actions/{nameOfTheAction}.