# Attach action to a flow using terraform

**URL:** <https://community.auth0.com/t/attach-action-to-a-flow-using-terraform/101217>\
**Category:** Get Help\
**Tags:** admin-management, dashboard, login-experience\
**Created:** [February 24, 2023, 12:21pm UTC](https://community.auth0.com/t/attach-action-to-a-flow-using-terraform/101217 "2023-02-24T12:21:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![khaledez](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/khaledez/32/44907_2.png) [@khaledez](https://community.auth0.com/u/khaledez)\
**Post date:** [February 24, 2023, 12:21pm UTC](https://community.auth0.com/t/attach-action-to-a-flow-using-terraform/101217/1 "2023-02-24T12:21:25Z")

</div>

Hello,  
I have this Action defined in Terraform:

```plaintext
resource "auth0_action" "post-login" {
  name = "Post-Login"
  deploy = true
  runtime = "node16"
  code = file("${path.module}/auth0-actions/post-login.js")
  supported_triggers {
    id = "post-login"
    version = "v3"
  }

}

```

After applying the changes. I could see the action in Management Console → Actions → Library.  
But I don’t see it attached to the Login flow in Management Console → Actions → Flows → Login!

How can I configure terraform action to automatically attach it to the flow?!

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [February 25, 2023, 12:31am UTC](https://community.auth0.com/t/attach-action-to-a-flow-using-terraform/101217/3 "2023-02-25T00:31:41Z")

</div>

Hi @khaledez,

Welcome to the Auth0 Community!

I have just reviewed the Auth0 Terraform documentation and found that you must call the `auth0_trigger_binding` resource to attach your Actions to the flow and deploy them.

See here: [Terraform Registry -auth0\_trigger\_binding](https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/trigger_binding)

I hope this helps!

Please let me know if you have any further questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 11, 2023, 12:32am UTC](https://community.auth0.com/t/attach-action-to-a-flow-using-terraform/101217/5 "2023-03-11T00:32:42Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
