diff --git a/.changes/unreleased/ENHANCEMENTS-20241029-113554.yaml b/.changes/unreleased/ENHANCEMENTS-20241029-113554.yaml new file mode 100644 index 000000000..1269c85cd --- /dev/null +++ b/.changes/unreleased/ENHANCEMENTS-20241029-113554.yaml @@ -0,0 +1,6 @@ +kind: ENHANCEMENTS +body: 'Add `category` to Stacks Deployment store blocks ' +time: 2024-10-29T11:35:54.290832+01:00 +custom: + Issue: "1852" + Repository: terraform-ls diff --git a/go.mod b/go.mod index 5905f95bd..3ada12ff7 100644 --- a/go.mod +++ b/go.mod @@ -13,12 +13,12 @@ require ( github.com/hashicorp/go-uuid v1.0.3 github.com/hashicorp/go-version v1.7.0 github.com/hashicorp/hc-install v0.9.0 - github.com/hashicorp/hcl-lang v0.0.0-20240830144831-468c47ee72a9 + github.com/hashicorp/hcl-lang v0.0.0-20241029094326-4b65a8528795 github.com/hashicorp/hcl/v2 v2.22.0 github.com/hashicorp/terraform-exec v0.21.0 - github.com/hashicorp/terraform-json v0.22.1 + github.com/hashicorp/terraform-json v0.22.2-0.20241007092238-76bdbbf21572 github.com/hashicorp/terraform-registry-address v0.2.3 - github.com/hashicorp/terraform-schema v0.0.0-20240923145411-83cd24ebe35a + github.com/hashicorp/terraform-schema v0.0.0-20241029094833-06703fa106cc github.com/mcuadros/go-defaults v1.2.0 github.com/mh-cbon/go-fmt-fail v0.0.0-20160815164508-67765b3fbcb5 github.com/mitchellh/cli v1.1.5 diff --git a/go.sum b/go.sum index c50a93719..34ab58672 100644 --- a/go.sum +++ b/go.sum @@ -223,18 +223,18 @@ github.com/hashicorp/hc-install v0.9.0 h1:2dIk8LcvANwtv3QZLckxcjyF5w8KVtiMxu6G6e github.com/hashicorp/hc-install v0.9.0/go.mod h1:+6vOP+mf3tuGgMApVYtmsnDoKWMDcFXeTxCACYZ8SFg= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl-lang v0.0.0-20240830144831-468c47ee72a9 h1:+vOoWN3mmsPs/qdx0DhdgA0JO20uqIoibrti+VT9gb4= -github.com/hashicorp/hcl-lang v0.0.0-20240830144831-468c47ee72a9/go.mod h1:q2ps+/W6LMDEr2Y6Z92s0EX7jhMrftJEuwD6LXOv20A= +github.com/hashicorp/hcl-lang v0.0.0-20241029094326-4b65a8528795 h1:x17XGul8WRQsA0hgJEGtNtp0EpRqK01n3Px4INLqlGc= +github.com/hashicorp/hcl-lang v0.0.0-20241029094326-4b65a8528795/go.mod h1:PyTvJMnm3v2F0Oa654gEfTg2H9muPzYDA46lvaGrRy4= github.com/hashicorp/hcl/v2 v2.22.0 h1:hkZ3nCtqeJsDhPRFz5EA9iwcG1hNWGePOTw6oyul12M= github.com/hashicorp/hcl/v2 v2.22.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ= github.com/hashicorp/terraform-exec v0.21.0/go.mod h1:1PPeMYou+KDUSSeRE9szMZ/oHf4fYUmB923Wzbq1ICg= -github.com/hashicorp/terraform-json v0.22.1 h1:xft84GZR0QzjPVWs4lRUwvTcPnegqlyS7orfb5Ltvec= -github.com/hashicorp/terraform-json v0.22.1/go.mod h1:JbWSQCLFSXFFhg42T7l9iJwdGXBYV8fmmD6o/ML4p3A= +github.com/hashicorp/terraform-json v0.22.2-0.20241007092238-76bdbbf21572 h1:B7p7ZRTgmNNFZ6jQVz+FZ+/zf56047N5f6gmYKCRJOk= +github.com/hashicorp/terraform-json v0.22.2-0.20241007092238-76bdbbf21572/go.mod h1:MHdXbBAbSg0GvzuWazEGKAn/cyNfIB7mN6y7KJN6y2c= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= -github.com/hashicorp/terraform-schema v0.0.0-20240923145411-83cd24ebe35a h1:ras59xSJIQLYQjIX5mzmb/xAwMTyBAX5DqB7A2GYdA0= -github.com/hashicorp/terraform-schema v0.0.0-20240923145411-83cd24ebe35a/go.mod h1:FQ2G7fh5sxPXSm/OTqNQCT5vOV/C70QjHhwWEPnpzS8= +github.com/hashicorp/terraform-schema v0.0.0-20241029094833-06703fa106cc h1:U65FhhW390MM/SfBebI3/Hyd3/BBv2Dy1s20cvRg82U= +github.com/hashicorp/terraform-schema v0.0.0-20241029094833-06703fa106cc/go.mod h1:cA6LcD9EWWwgG3ZsZx+Fvyvgil6LYxTl3bknC8LF0B8= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= github.com/hexops/autogold v1.3.1 h1:YgxF9OHWbEIUjhDbpnLhgVsjUDsiHDTyDfy2lrfdlzo= diff --git a/internal/features/stacks/decoder/path_reader.go b/internal/features/stacks/decoder/path_reader.go index f3b649d33..c9628f71f 100644 --- a/internal/features/stacks/decoder/path_reader.go +++ b/internal/features/stacks/decoder/path_reader.go @@ -89,9 +89,6 @@ func stackPathContext(record *state.StackRecord, stateReader CombinedReader) (*d Variables: record.Meta.Variables, Outputs: record.Meta.Outputs, Filenames: record.Meta.Filenames, - Deployments: record.Meta.Deployments, - Stores: record.Meta.Stores, - OrchestrationRules: record.Meta.OrchestrationRules, } mergedSchema, err := sm.SchemaForStack(meta) @@ -158,9 +155,6 @@ func deployPathContext(record *state.StackRecord) (*decoder.PathContext, error) Variables: record.Meta.Variables, Outputs: record.Meta.Outputs, Filenames: record.Meta.Filenames, - Deployments: record.Meta.Deployments, - Stores: record.Meta.Stores, - OrchestrationRules: record.Meta.OrchestrationRules, } mergedSchema, err := sm.SchemaForDeployment(meta) diff --git a/internal/features/stacks/state/stack_store.go b/internal/features/stacks/state/stack_store.go index e861ca892..d16e69e43 100644 --- a/internal/features/stacks/state/stack_store.go +++ b/internal/features/stacks/state/stack_store.go @@ -301,9 +301,6 @@ func (s *StackStore) UpdateMetadata(path string, meta *tfstack.Meta, mErr error) Outputs: meta.Outputs, Filenames: meta.Filenames, ProviderRequirements: meta.ProviderRequirements, - Deployments: meta.Deployments, - Stores: meta.Stores, - OrchestrationRules: meta.OrchestrationRules, } record.MetaErr = mErr