Skip to content

Commit c12fbe8

Browse files
authored
Merge branch 'main' into bugfix/terraform-apply-cli-actions-output-missing
2 parents a62eddc + 2274026 commit c12fbe8

36 files changed

+5925
-5354
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
kind: BUG FIXES
2+
body: 'query: generate unique resource identifiers for results of expanded list resources'
3+
time: 2025-09-26T11:33:18.241184+02:00
4+
custom:
5+
Issue: "37681"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
kind: ENHANCEMENTS
2+
body: "query: support offline validation of query files via -query flag in the validate command"
3+
time: 2025-09-25T15:12:37.198573+02:00
4+
custom:
5+
Issue: "37671"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ require (
8282
golang.org/x/tools v0.36.0
8383
golang.org/x/tools/cmd/cover v0.1.0-deprecated
8484
google.golang.org/grpc v1.69.4
85-
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0
85+
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
8686
google.golang.org/protobuf v1.36.6
8787
honnef.co/go/tools v0.6.0
8888
)

go.sum

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,8 +1278,8 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG
12781278
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
12791279
google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A=
12801280
google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
1281-
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 h1:TLkBREm4nIsEcexnCjgQd5GQWaHcqMzwQV0TX9pq8S0=
1282-
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY=
1281+
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA=
1282+
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y=
12831283
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
12841284
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
12851285
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -1292,7 +1292,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
12921292
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
12931293
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
12941294
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
1295-
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
12961295
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
12971296
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
12981297
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=

internal/cloudplugin/cloudproto1/cloudproto1.pb.go

Lines changed: 0 additions & 113 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/cloudplugin/cloudproto1/cloudproto1_grpc.pb.go

Lines changed: 139 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/command/arguments/validate.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ type Validate struct {
2424

2525
// ViewType specifies which output format to use: human, JSON, or "raw".
2626
ViewType ViewType
27+
28+
// Query indicates that Terraform should also validate .tfquery files.
29+
Query bool
2730
}
2831

2932
// ParseValidate processes CLI arguments, returning a Validate value and errors.
@@ -40,6 +43,7 @@ func ParseValidate(args []string) (*Validate, tfdiags.Diagnostics) {
4043
cmdFlags.BoolVar(&jsonOutput, "json", false, "json")
4144
cmdFlags.StringVar(&validate.TestDirectory, "test-directory", "tests", "test-directory")
4245
cmdFlags.BoolVar(&validate.NoTests, "no-tests", false, "no-tests")
46+
cmdFlags.BoolVar(&validate.Query, "query", false, "query")
4347

4448
if err := cmdFlags.Parse(args); err != nil {
4549
diags = diags.Append(tfdiags.Sourceless(
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
terraform {
2+
required_providers {
3+
test = {
4+
source = "hashicorp/test"
5+
}
6+
}
7+
}
8+
9+
provider "test" {}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
variable "input" {
2+
type = string
3+
default = "foo"
4+
}
5+
6+
list "test_instance" "test" {
7+
provider = test
8+
9+
config {
10+
ami = var.input
11+
}
12+
}
13+
14+
list "test_instance" "test2" {
15+
provider = test
16+
17+
config {
18+
// this traversal is invalid for a list resource
19+
ami = list.test_instance.test.state.instance_type
20+
}
21+
}

0 commit comments

Comments
 (0)