From 039b56c5943fa9df4b0e64ace87c1ea23db40272 Mon Sep 17 00:00:00 2001 From: Daniel Banck Date: Fri, 27 Oct 2023 15:55:31 +0200 Subject: [PATCH] Allow variable references in `depends_on` --- internal/schema/0.12/data_block.go | 1 + internal/schema/0.12/output_block.go | 1 + internal/schema/0.12/resource_block.go | 1 + internal/schema/0.13/module_block.go | 1 + internal/schema/1.5/check.go | 1 + 5 files changed, 5 insertions(+) diff --git a/internal/schema/0.12/data_block.go b/internal/schema/0.12/data_block.go index 6b1ff8f2..64187dd8 100644 --- a/internal/schema/0.12/data_block.go +++ b/internal/schema/0.12/data_block.go @@ -64,6 +64,7 @@ func datasourceBlockSchema(v *version.Version) *schema.BlockSchema { schema.Reference{OfScopeId: refscope.DataScope}, schema.Reference{OfScopeId: refscope.ModuleScope}, schema.Reference{OfScopeId: refscope.ResourceScope}, + schema.Reference{OfScopeId: refscope.VariableScope}, }, }, IsOptional: true, diff --git a/internal/schema/0.12/output_block.go b/internal/schema/0.12/output_block.go index 248e80f3..e8e34b28 100644 --- a/internal/schema/0.12/output_block.go +++ b/internal/schema/0.12/output_block.go @@ -55,6 +55,7 @@ func outputBlockSchema() *schema.BlockSchema { schema.Reference{OfScopeId: refscope.DataScope}, schema.Reference{OfScopeId: refscope.ModuleScope}, schema.Reference{OfScopeId: refscope.ResourceScope}, + schema.Reference{OfScopeId: refscope.VariableScope}, }, }, IsOptional: true, diff --git a/internal/schema/0.12/resource_block.go b/internal/schema/0.12/resource_block.go index 0b036369..8b135398 100644 --- a/internal/schema/0.12/resource_block.go +++ b/internal/schema/0.12/resource_block.go @@ -64,6 +64,7 @@ func resourceBlockSchema(v *version.Version) *schema.BlockSchema { schema.Reference{OfScopeId: refscope.DataScope}, schema.Reference{OfScopeId: refscope.ModuleScope}, schema.Reference{OfScopeId: refscope.ResourceScope}, + schema.Reference{OfScopeId: refscope.VariableScope}, }, }, IsOptional: true, diff --git a/internal/schema/0.13/module_block.go b/internal/schema/0.13/module_block.go index 2a037c80..a6d8cf50 100644 --- a/internal/schema/0.13/module_block.go +++ b/internal/schema/0.13/module_block.go @@ -81,6 +81,7 @@ func moduleBlockSchema() *schema.BlockSchema { schema.Reference{OfScopeId: refscope.DataScope}, schema.Reference{OfScopeId: refscope.ModuleScope}, schema.Reference{OfScopeId: refscope.ResourceScope}, + schema.Reference{OfScopeId: refscope.VariableScope}, }, }, IsOptional: true, diff --git a/internal/schema/1.5/check.go b/internal/schema/1.5/check.go index 8ca2ff5e..175baaae 100644 --- a/internal/schema/1.5/check.go +++ b/internal/schema/1.5/check.go @@ -85,6 +85,7 @@ func scopedDataBlock() *schema.BlockSchema { schema.Reference{OfScopeId: refscope.DataScope}, schema.Reference{OfScopeId: refscope.ModuleScope}, schema.Reference{OfScopeId: refscope.ResourceScope}, + schema.Reference{OfScopeId: refscope.VariableScope}, }, }, IsOptional: true,