From 2a553454854313a4d03770cf9d38b7b731c76d88 Mon Sep 17 00:00:00 2001 From: James Pogran Date: Fri, 16 Aug 2024 12:10:02 -0400 Subject: [PATCH] Add depends_on attribute to component block schema This change adds a depends_on attribute to the component block schema. This attribute allows users to specify explicit dependencies for components in a stack configuration, which must also be used when determining an order of operations for components. --- internal/schema/stacks/1.9/component_block.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/schema/stacks/1.9/component_block.go b/internal/schema/stacks/1.9/component_block.go index b4df0e1..7a1f820 100644 --- a/internal/schema/stacks/1.9/component_block.go +++ b/internal/schema/stacks/1.9/component_block.go @@ -68,6 +68,14 @@ func componentBlockSchema() *schema.BlockSchema { Elem: schema.Reference{OfScopeId: refscope.ProviderScope}, }, }, + "depends_on": { + Description: lang.Markdown("Optionally specify explicit dependencies for components in a stack configuration, which must also be used when determining an order of operations for components"), + IsOptional: true, + Constraint: schema.List{ + // TODO: This eventually will support embedded stack references + Elem: schema.Reference{OfScopeId: refscope.ComponentScope}, + }, + }, }, }, }