Skip to content
GantryCD

Declare dependencies

Put a comment above the resource or module that depends on another stack:

# gantrycd:dependency: from_stack=network
module "app" {}

module.app now depends on the network stack. The comment attaches to the next resource, data or module below it, past any blank lines or comments.

Declare what state cannot show — ordering rules, stack output reads. GantryCD infers some cloud relationships on its own.

Name the resource instead

For when the comment cannot sit above its block:

# gantrycd:dependency: from_stack=network resource=module.app

The whole stack depends on it

When no single resource owns the relationship:

# gantrycd:dependency: from_stack=network scope=stack

A comment with no block below it already means this. scope=stack says it on purpose, and still means it after someone adds a block underneath. It cannot be combined with resource.

Depend on one part of the other stack

# gantrycd:dependency: from_stack=network from_resource=output.vpc_id

from_resource narrows the far side. It is also the only field that decides whether a network apply redeploys you — see trigger policies.

Where they are read

The root module’s .tf and .tofu files. The default trigger policy is manual. Every field is listed in advanced options.