From 33be99709349d75bad0b6446ff192c17158edc3a Mon Sep 17 00:00:00 2001 From: Daniel Banck Date: Tue, 10 Dec 2024 09:09:06 +0100 Subject: [PATCH] Fix incorrect validation for for-expressions (#1890) * Bump hcl-lang to `4f7c1c9` * Add changelog * Update changelog --- .changes/unreleased/BUG FIXES-20241209-151045.yaml | 6 ++++++ go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .changes/unreleased/BUG FIXES-20241209-151045.yaml diff --git a/.changes/unreleased/BUG FIXES-20241209-151045.yaml b/.changes/unreleased/BUG FIXES-20241209-151045.yaml new file mode 100644 index 000000000..de9fbfe01 --- /dev/null +++ b/.changes/unreleased/BUG FIXES-20241209-151045.yaml @@ -0,0 +1,6 @@ +kind: BUG FIXES +body: Fix incorrect validation of references by correctly detecting tuple and object expressions created from for-expressions +time: 2024-12-09T15:10:45.0655+01:00 +custom: + Issue: "1890" + Repository: terraform-ls diff --git a/go.mod b/go.mod index c0ad375ae..a1b886d72 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ 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-20241203131115-8d59b17219fd + github.com/hashicorp/hcl-lang v0.0.0-20241209140757-4f7c1c9bbc32 github.com/hashicorp/hcl/v2 v2.23.0 github.com/hashicorp/terraform-exec v0.21.0 github.com/hashicorp/terraform-json v0.23.0 diff --git a/go.sum b/go.sum index ac8fda213..b6c985e80 100644 --- a/go.sum +++ b/go.sum @@ -228,8 +228,8 @@ 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-20241203131115-8d59b17219fd h1:Ap3K7uO+Dnd2ZSl5vQvIh63Z/QWaI5eTgRYfdYtaxH8= -github.com/hashicorp/hcl-lang v0.0.0-20241203131115-8d59b17219fd/go.mod h1:5NUxE6UGpjm8iW/pY70BJWunDMkc73d7HTtvefU8B/c= +github.com/hashicorp/hcl-lang v0.0.0-20241209140757-4f7c1c9bbc32 h1:7vZlQmXm2ypWJyRBPeX1Mson/dsReRDw7yIoLQGL/8w= +github.com/hashicorp/hcl-lang v0.0.0-20241209140757-4f7c1c9bbc32/go.mod h1:IZQIEGz+2WgWElRh8Tkc8gxT9AzPXMrRBjn2+iBkqdc= github.com/hashicorp/hcl/v2 v2.23.0 h1:Fphj1/gCylPxHutVSEOf2fBOh1VE4AuLV7+kbJf3qos= github.com/hashicorp/hcl/v2 v2.23.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ=