Skip to content
GantryCD

Declare dependencies

Add a comment to the dependent stack’s OpenTofu code:

# gantrycd:dependency: from_stack=network

from_stack is the ID of the stack it depends on. This creates a relationship between the two whole stacks.

Narrow the relationship when only one resource or output matters:

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

Use resource to name the resource in the current stack that depends on it:

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

GantryCD reads declarations from the root module’s .tf and .tofu files. The default trigger policy is manual.

Declare relationships that state cannot show, such as ordering rules and stack output reads. GantryCD can infer some cloud relationships without a declaration.