Legacy Dev Forum Posts

 View Only

Sign Up

Terraform Not Detecting Newly Added Dependency in Architect Flow After Import

  • 1.  Terraform Not Detecting Newly Added Dependency in Architect Flow After Import

    Posted 06-05-2025 18:33

    Klinton | 2025-03-06 09:52:52 UTC | #1

    Hello Everyone,

    I imported the Architect Flow dependency using Terraform with the following configuration:

    main.tf resource "genesyscloudtfexport" "exportflow" { directory = "./genesyscloud/flow" exportashcl = true logpermissionerrors = true includestatefile = true enabledependencyresolution = true splitfilesbyresource = false includefilterresources = ["genesyscloud_flow::Name Of Callflow"] }

    After running terraform plan and terraform apply, all dependencies were successfully imported, and the state file was created in a separate folder (./genesyscloud/flow/genesys.tf).

    Now, I have added another dependency (e.g., a datatable) to my Architect Flow. However, when I run terraform plan again, it shows "no changes", meaning the newly added dependency is not being detected.

    How can I track newly added dependencies in Architect Flow after the initial import?

    Thanks, Klinton


    charlie.conneely | 2025-03-10 12:18:06 UTC | #2

    Hi Klinton,

    Did you add another dependency to the flow via the Architect UI or via Terraform?


    Klinton | 2025-03-10 17:49:10 UTC | #3

    Hi Charlie,

    I adding dependency via the Architect UI

    Thanks,


    John_Carnell | 2025-03-10 18:27:12 UTC | #4

    Hi Klinton,

    Architect flows do not participate fully in the dependency graph as the flows are in a Domain Specific Language (DSL) independent of Terraform. When you export and turn on dependency resolution, we can use some of the public APIs to figure out dependencies and automatically export them. However, if you make changes in the Architect flow, you need to explicitly set the dependency using the depends_on keyword or reexport the flow and apply them back to your Terraform file.

    Thanks, John Carnell Director, Developer Engagement


    Klinton | 2025-03-11 14:18:39 UTC | #5

    Hi @John_Carnell

    Thank you for your answers.

    Before re-exporting the flow with a new dependency, should I remove the previously generated terraform.tfstate file from my directory? Or is there a better approach?

    Since terraform.tfstate compares the current state with main.tf, if I don’t modify main.tf but add a dependency in the Architect UI, Terraform still shows "no changes to apply." This happens because the new dependency isn't reflected in terraform.tfstate.

    Should I delete terraform.tfstate, or is there a better way to handle this?

    Thanks, Klinton


    system | 2025-04-10 14:19:11 UTC | #6

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


    This post was migrated from the old Developer Forum.

    ref: 32061