Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow local references in depends_on #292

Merged
merged 3 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/hc-install v0.6.1
github.com/hashicorp/hcl-lang v0.0.0-20231102085329-caa96d65d15b
github.com/hashicorp/hcl-lang v0.0.0-20231103134808-2ce7ad140f7c
github.com/hashicorp/hcl/v2 v2.19.1
github.com/hashicorp/terraform-exec v0.19.0
github.com/hashicorp/terraform-json v0.17.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mO
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/hc-install v0.6.1 h1:IGxShH7AVhPaSuSJpKtVi/EFORNjO+OYVJJrAtGG2mY=
github.com/hashicorp/hc-install v0.6.1/go.mod h1:0fW3jpg+wraYSnFDJ6Rlie3RvLf1bIqVIkzoon4KoVE=
github.com/hashicorp/hcl-lang v0.0.0-20231102085329-caa96d65d15b h1:j8TNMurAPPN05V2/FXOo16c6RpNKY57ZV7iqwO0vAOc=
github.com/hashicorp/hcl-lang v0.0.0-20231102085329-caa96d65d15b/go.mod h1:f8Trmd1qEAs00+y4etS5uTDqYhU3Z/pxJgzsTwWXWM8=
github.com/hashicorp/hcl-lang v0.0.0-20231103134808-2ce7ad140f7c h1:ppZ7NorEmcV4B7+M9DWd6nQNRSWs55RUebJzYOuAdc0=
github.com/hashicorp/hcl-lang v0.0.0-20231103134808-2ce7ad140f7c/go.mod h1:f8Trmd1qEAs00+y4etS5uTDqYhU3Z/pxJgzsTwWXWM8=
github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI=
github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE=
github.com/hashicorp/terraform-exec v0.19.0 h1:FpqZ6n50Tk95mItTSS9BjeOVUb4eg81SpgVtZNNtFSM=
Expand Down
1 change: 1 addition & 0 deletions internal/schema/0.12/data_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func datasourceBlockSchema(v *version.Version) *schema.BlockSchema {
schema.Reference{OfScopeId: refscope.ModuleScope},
schema.Reference{OfScopeId: refscope.ResourceScope},
schema.Reference{OfScopeId: refscope.VariableScope},
schema.Reference{OfScopeId: refscope.LocalScope},
},
},
IsOptional: true,
Expand Down
5 changes: 3 additions & 2 deletions internal/schema/0.12/locals_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ func localsBlockSchema() *schema.BlockSchema {
schema.StaticStep{Name: "local"},
schema.AttrNameStep{},
},
ScopeId: refscope.LocalScope,
AsExprType: true,
ScopeId: refscope.LocalScope,
AsExprType: true,
AsReference: true,
},
Constraint: schema.AnyExpression{OfType: cty.DynamicPseudoType},
},
Expand Down
1 change: 1 addition & 0 deletions internal/schema/0.12/output_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func outputBlockSchema() *schema.BlockSchema {
schema.Reference{OfScopeId: refscope.ModuleScope},
schema.Reference{OfScopeId: refscope.ResourceScope},
schema.Reference{OfScopeId: refscope.VariableScope},
schema.Reference{OfScopeId: refscope.LocalScope},
},
},
IsOptional: true,
Expand Down
1 change: 1 addition & 0 deletions internal/schema/0.12/resource_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func resourceBlockSchema(v *version.Version) *schema.BlockSchema {
schema.Reference{OfScopeId: refscope.ModuleScope},
schema.Reference{OfScopeId: refscope.ResourceScope},
schema.Reference{OfScopeId: refscope.VariableScope},
schema.Reference{OfScopeId: refscope.LocalScope},
},
},
IsOptional: true,
Expand Down
1 change: 1 addition & 0 deletions internal/schema/0.13/module_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func moduleBlockSchema() *schema.BlockSchema {
schema.Reference{OfScopeId: refscope.ModuleScope},
schema.Reference{OfScopeId: refscope.ResourceScope},
schema.Reference{OfScopeId: refscope.VariableScope},
schema.Reference{OfScopeId: refscope.LocalScope},
},
},
IsOptional: true,
Expand Down
1 change: 1 addition & 0 deletions internal/schema/1.5/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func scopedDataBlock() *schema.BlockSchema {
schema.Reference{OfScopeId: refscope.ModuleScope},
schema.Reference{OfScopeId: refscope.ResourceScope},
schema.Reference{OfScopeId: refscope.VariableScope},
schema.Reference{OfScopeId: refscope.LocalScope},
},
},
IsOptional: true,
Expand Down