Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Refer to the [`terraform apply` command](/terraform/cli/commands/apply) document

### Trigger an action when applying a configuration

To trigger an action on resource lifecycle events, such as creating or destroying a resource, configure an `action_trigger` block and specify the action to run and the events that trigger the action. The `action_trigger` block is a member of the `lifecycle` block nested in a `resource` block. Refer to the [`action_trigger` documentation](/terraform/language/block/resource#action_trigger) for details about configuring the block.
To trigger an action on resource lifecycle events, such as creating a resource, configure an `action_trigger` block and specify the action to run and the events that trigger the action. The `action_trigger` block is a member of the `lifecycle` block nested in a `resource` block. Refer to the [`action_trigger` documentation](/terraform/language/block/resource#action_trigger) for details about configuring the block.

In the following example, Terraform invokes the `action.aws_lambda_invoke.example` action after creating the `aws_lambda_function.example` resource. Terraform also invokes the action during a `terraform apply` operation if the `resource` block configuration changes.

Expand All @@ -124,4 +124,4 @@ Because the `event` argument includes `after_update`, Terraform also updates th

## View actions in HCP Terraform

If your workspace is connected to your HCP Terraform organization, you can monitor action runs in HCP Terraform. Refer to [Action runs](/terraform/cloud-docs/run/manage#action-runs) in the HCP Terraform documentation for more information.
If your workspace is connected to your HCP Terraform organization, you can monitor action runs in HCP Terraform. Refer to [Action runs](/terraform/cloud-docs/run/manage#action-runs) in the HCP Terraform documentation for more information.
Loading