# Auth0 Terraform Provider auth0\_flow\_vault\_connection always changes when I run terraform plan

**URL:** <https://community.auth0.com/t/auth0-terraform-provider-auth0-flow-vault-connection-always-changes-when-i-run-terraform-plan/169857>\
**Category:** Get Help\
**Tags:** platform-infrastructure, general-architecture-question\
**Created:** [January 22, 2025, 8:32pm UTC](https://community.auth0.com/t/auth0-terraform-provider-auth0-flow-vault-connection-always-changes-when-i-run-terraform-plan/169857 "2025-01-22T20:32:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hhurtado](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hhurtado/32/54455_2.png) [@hhurtado](https://community.auth0.com/u/hhurtado)\
**Post date:** [January 22, 2025, 8:32pm UTC](https://community.auth0.com/t/auth0-terraform-provider-auth0-flow-vault-connection-always-changes-when-i-run-terraform-plan/169857/1 "2025-01-22T20:32:19Z")

</div>

Ready to post? 🔍 First, try searching for your answer.  
Hello everyone,

I am having some unexpected output when I run a `terraform plan` for my Auth0 terraform.

The problem is with the `auth0_flow_vault_connection`, I have my resource like this:

```auto
resource "auth0_flow_vault_connection" "actions_connection" {
  name = "Auth0 Actions Connection"
  app_id = "AUTH0"
  setup = {
    client_id = data.auth0_client.actions_client.client_id
    client_secret = data.auth0_client.actions_client.client_secret
    domain = var.auth0_domain
    type = "OAUTH_APP"
  }
}

```

I applied the terraform with this new resource and it was created. The problem is when I run another `terraform plan`, the plan shows aways that the resources has changed even if I didn’t make any change. The output I see is:

```auto
Terraform will perform the following actions:

  # auth0_flow_vault_connection.actions_connection will be updated in-place
  ~ resource "auth0_flow_vault_connection" "actions_connection" {
      ~ account_name = <auth0-tenant>.us.auth0.com" -> null
        id = "ac_xxxxxxxxxxxxxxx"
        name = "Auth0 Actions Connection"
      - ready = true -> null
      ~ setup = (sensitive value)
        # (3 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

```

My expectation here is that if I don’t make any change to the resource then the `terraform plan` should not show any change for the resource.

Maybe have you seen that before, do you know how to fix it?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [January 23, 2025, 5:51pm UTC](https://community.auth0.com/t/auth0-terraform-provider-auth0-flow-vault-connection-always-changes-when-i-run-terraform-plan/169857/3 "2025-01-23T17:51:16Z")

</div>

Hi @hhurtado

Welcome back to the Auth0 Community!

When Terraform creates the plan, it does two separate actions for each of your instances:

- Terraform reads the lates values that have been associated with the resource, taking into the account any changes you have made outside it.
- Compares the resource against the configuration to check for any differences, proposing them in order for the resource to match the configuration

There might be something detected in one of these actions and there might not be any actual changes. I would advise to to check the connection’s settings that you are attempting to plan with Terraform and then apply them and check if any changes actually took place.

I am not sure why this might be the case, as mentioned above, it might detect some changes in either the configuration or resource.

Let me know if you have any additional questions or if the terraform still displays possible changes on the specific connection. If you notice some actual changes, feel free to let us know what was causing this discrepancy.

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![hhurtado](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hhurtado/32/54455_2.png) [@hhurtado](https://community.auth0.com/u/hhurtado)\
**Post date:** [February 5, 2025, 5:22pm UTC](https://community.auth0.com/t/auth0-terraform-provider-auth0-flow-vault-connection-always-changes-when-i-run-terraform-plan/169857/4 "2025-02-05T17:22:54Z")

</div>

Hi @nik.baleca! Thanks for the answer.

After trying different things I had to do 2 things to get rid of this issue.

1. Update provider to the version `1.11.0`
2. Update the resource to include the `account_name` field

```auto
resource "auth0_flow_vault_connection" "actions_connection" {
  name = "Auth0 Actions Connection"
  account_name = var.auth0_domain
  app_id = "AUTH0"
  setup = {
    client_id = data.auth0_client.actions_client.client_id
    client_secret = data.auth0_client.actions_client.client_secret
    domain = var.auth0_domain
    type = "OAUTH_APP"
  }
}

```

I hope this helps.

Regards!

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [February 5, 2025, 5:27pm UTC](https://community.auth0.com/t/auth0-terraform-provider-auth0-flow-vault-connection-always-changes-when-i-run-terraform-plan/169857/5 "2025-02-05T17:27:44Z")

</div>

Hi @hhurtado

Thank you for sharing the solution with us!

Kind Regards,  
Nik

---

<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:** [February 19, 2025, 5:28pm UTC](https://community.auth0.com/t/auth0-terraform-provider-auth0-flow-vault-connection-always-changes-when-i-run-terraform-plan/169857/6 "2025-02-19T17:28:20Z")

</div>

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