Skip to content

Commit d25fab9

Browse files
authored
Merge branch 'main' into weekly-grouped-dependabot
2 parents fee4ddb + 9cafd72 commit d25fab9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+4437
-83
lines changed

.github/CODEOWNERS

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
* @hashicorp/terraform-devex
1+
* @hashicorp/terraform-core-plugins
22

33
# engineering and web presence get notified of, and can approve changes to web tooling, but not content.
44

5-
/website/ @hashicorp/web-presence @hashicorp/terraform-devex
5+
/website/ @hashicorp/web-presence @hashicorp/terraform-core-plugins
66
/website/data/
77
/website/public/
88
/website/content/
99

1010
# education and engineering get notified of, and can approve changes to web content.
1111

12-
/website/data/ @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-devex
13-
/website/public/ @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-devex
14-
/website/content/ @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-devex
15-
/website/docs/ @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-devex
16-
/website/img/ @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-devex
17-
/website/README.md @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-devex
12+
/website/data/ @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-core-plugins
13+
/website/public/ @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-core-plugins
14+
/website/content/ @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-core-plugins
15+
/website/docs/ @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-core-plugins
16+
/website/img/ @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-core-plugins
17+
/website/README.md @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-core-plugins

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ toolchain go1.23.7
66

77
require (
88
github.com/google/go-cmp v0.7.0
9-
github.com/hashicorp/terraform-plugin-go v0.27.0
9+
github.com/hashicorp/terraform-plugin-go v0.28.1-0.20250616135123-a19df43120ea
1010
github.com/hashicorp/terraform-plugin-log v0.9.0
1111
)
1212

@@ -16,7 +16,7 @@ require (
1616
github.com/hashicorp/go-hclog v1.5.0 // indirect
1717
github.com/hashicorp/go-plugin v1.6.3 // indirect
1818
github.com/hashicorp/go-uuid v1.0.3 // indirect
19-
github.com/hashicorp/terraform-registry-address v0.2.5 // indirect
19+
github.com/hashicorp/terraform-registry-address v0.3.0 // indirect
2020
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
2121
github.com/hashicorp/yamux v0.1.1 // indirect
2222
github.com/mattn/go-colorable v0.1.12 // indirect
@@ -25,10 +25,10 @@ require (
2525
github.com/oklog/run v1.0.0 // indirect
2626
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
2727
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
28-
golang.org/x/net v0.39.0 // indirect
29-
golang.org/x/sys v0.32.0 // indirect
30-
golang.org/x/text v0.24.0 // indirect
31-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
32-
google.golang.org/grpc v1.72.1 // indirect
28+
golang.org/x/net v0.41.0 // indirect
29+
golang.org/x/sys v0.33.0 // indirect
30+
golang.org/x/text v0.26.0 // indirect
31+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect
32+
google.golang.org/grpc v1.73.0 // indirect
3333
google.golang.org/protobuf v1.36.6 // indirect
3434
)

go.sum

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ github.com/hashicorp/go-plugin v1.6.3 h1:xgHB+ZUSYeuJi96WtxEjzi23uh7YQpznjGh0U0U
2121
github.com/hashicorp/go-plugin v1.6.3/go.mod h1:MRobyh+Wc/nYy1V4KAXUiYfzxoYhs7V1mlH1Z7iY2h0=
2222
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
2323
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
24-
github.com/hashicorp/terraform-plugin-go v0.27.0 h1:ujykws/fWIdsi6oTUT5Or4ukvEan4aN9lY+LOxVP8EE=
25-
github.com/hashicorp/terraform-plugin-go v0.27.0/go.mod h1:FDa2Bb3uumkTGSkTFpWSOwWJDwA7bf3vdP3ltLDTH6o=
24+
github.com/hashicorp/terraform-plugin-go v0.28.1-0.20250616135123-a19df43120ea h1:U9EAAeQtszGlR7mDS7rY77B/a4/XiMDB8HfAtqLAuAQ=
25+
github.com/hashicorp/terraform-plugin-go v0.28.1-0.20250616135123-a19df43120ea/go.mod h1:hL//wLEfYo0YVt0TC/VLzia/ADQQto3HEm4/jX2gkdY=
2626
github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0=
2727
github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow=
28-
github.com/hashicorp/terraform-registry-address v0.2.5 h1:2GTftHqmUhVOeuu9CW3kwDkRe4pcBDq0uuK5VJngU1M=
29-
github.com/hashicorp/terraform-registry-address v0.2.5/go.mod h1:PpzXWINwB5kuVS5CA7m1+eO2f1jKb5ZDIxrOPfpnGkg=
28+
github.com/hashicorp/terraform-registry-address v0.3.0 h1:HMpK3nqaGFPS9VmgRXrJL/dzHNdheGVKk5k7VlFxzCo=
29+
github.com/hashicorp/terraform-registry-address v0.3.0/go.mod h1:jRGCMiLaY9zii3GLC7hqpSnwhfnCN5yzvY0hh4iCGbM=
3030
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
3131
github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc=
3232
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
@@ -56,32 +56,32 @@ github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAh
5656
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
5757
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
5858
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
59-
go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
60-
go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
61-
go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
62-
go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
63-
go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
64-
go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
65-
go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
66-
go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
67-
go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
68-
go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
69-
golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
70-
golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
59+
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
60+
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
61+
go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
62+
go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
63+
go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY=
64+
go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg=
65+
go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o=
66+
go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w=
67+
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
68+
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
69+
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
70+
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
7171
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
7272
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
7373
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
7474
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
7575
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
7676
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
77-
golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20=
78-
golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
79-
golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0=
80-
golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=
81-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a h1:51aaUVRocpvUOSQKM6Q7VuoaktNIaMCLuhZB6DKksq4=
82-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a/go.mod h1:uRxBH1mhmO8PGhU89cMcHaXKZqO+OfakD8QQO0oYwlQ=
83-
google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA=
84-
google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
77+
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
78+
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
79+
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
80+
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
81+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 h1:e0AIkUUhxyBKh6ssZNrAMeqhA7RKUj42346d1y02i2g=
82+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
83+
google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok=
84+
google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc=
8585
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
8686
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
8787
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

internal/fwschemadata/data_description.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ const (
1212
// a plan-based value.
1313
DataDescriptionPlan DataDescription = "plan"
1414

15+
// DataDescriptionResource is used for Data that represents
16+
// a resource value.
17+
DataDescriptionResource DataDescription = "resource"
18+
1519
// DataDescriptionState is used for Data that represents
1620
// a state-based value.
1721
DataDescriptionState DataDescription = "state"

internal/fwserver/server.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"github.com/hashicorp/terraform-plugin-framework/function"
1515
"github.com/hashicorp/terraform-plugin-framework/internal/fwschema"
1616
"github.com/hashicorp/terraform-plugin-framework/internal/logging"
17+
"github.com/hashicorp/terraform-plugin-framework/list"
1718
"github.com/hashicorp/terraform-plugin-framework/provider"
1819
"github.com/hashicorp/terraform-plugin-framework/resource"
1920
)
@@ -113,6 +114,27 @@ type Server struct {
113114
// access from race conditions.
114115
functionFuncsMutex sync.Mutex
115116

117+
// listResourceFuncs is a map of known ListResource factory functions.
118+
listResourceFuncs map[string]func() list.ListResource
119+
120+
// listResourceFuncsDiags are the cached Diagnostics obtained while
121+
// populating listResourceFuncs.
122+
listResourceFuncsDiags diag.Diagnostics
123+
124+
// listResourceFuncsMutex is a mutex to protect concurrent listResourceFuncs
125+
// access from race conditions.
126+
listResourceFuncsMutex sync.Mutex
127+
128+
// listResourceSchemas is the cached ListResource Schemas for RPCs that
129+
// need to convert configuration data from the protocol. If not found, it
130+
// will be fetched from the [list.ListResource.ListResourceConfigSchema]
131+
// method.
132+
listResourceSchemas map[string]fwschema.Schema
133+
134+
// listResourceSchemasMutex is a mutex to protect concurrent
135+
// listResourceSchemas access from race conditions.
136+
listResourceSchemasMutex sync.RWMutex
137+
116138
// providerSchema is the cached Provider Schema for RPCs that need to
117139
// convert configuration data from the protocol. If not found, it will be
118140
// fetched from the Provider.GetSchema() method.

internal/fwserver/server_getmetadata.go

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type GetMetadataResponse struct {
2020
Diagnostics diag.Diagnostics
2121
EphemeralResources []EphemeralResourceMetadata
2222
Functions []FunctionMetadata
23+
ListResources []ListResourceMetadata
2324
Resources []ResourceMetadata
2425
ServerCapabilities *ServerCapabilities
2526
}
@@ -52,28 +53,39 @@ type ResourceMetadata struct {
5253
TypeName string
5354
}
5455

56+
// ListResourceMetadata is the framework server equivalent of the
57+
// tfprotov5.ListResourceMetadata and tfprotov6.ListResourceMetadata types.
58+
type ListResourceMetadata struct {
59+
// TypeName is the name of the list resource.
60+
TypeName string
61+
}
62+
5563
// GetMetadata implements the framework server GetMetadata RPC.
5664
func (s *Server) GetMetadata(ctx context.Context, req *GetMetadataRequest, resp *GetMetadataResponse) {
5765
resp.DataSources = []DataSourceMetadata{}
5866
resp.EphemeralResources = []EphemeralResourceMetadata{}
5967
resp.Functions = []FunctionMetadata{}
68+
resp.ListResources = []ListResourceMetadata{}
6069
resp.Resources = []ResourceMetadata{}
70+
6171
resp.ServerCapabilities = s.ServerCapabilities()
6272

6373
datasourceMetadatas, diags := s.DataSourceMetadatas(ctx)
64-
6574
resp.Diagnostics.Append(diags...)
6675

6776
ephemeralResourceMetadatas, diags := s.EphemeralResourceMetadatas(ctx)
68-
6977
resp.Diagnostics.Append(diags...)
7078

7179
functionMetadatas, diags := s.FunctionMetadatas(ctx)
72-
7380
resp.Diagnostics.Append(diags...)
7481

7582
resourceMetadatas, diags := s.ResourceMetadatas(ctx)
83+
resp.Diagnostics.Append(diags...)
7684

85+
// Metadata for list resources must be retrieved after metadata for managed
86+
// resources. Server.ListResourceFuncs checks that each list resource type
87+
// name matches a known managed resource type name.
88+
listResourceMetadatas, diags := s.ListResourceMetadatas(ctx)
7789
resp.Diagnostics.Append(diags...)
7890

7991
if resp.Diagnostics.HasError() {
@@ -83,5 +95,6 @@ func (s *Server) GetMetadata(ctx context.Context, req *GetMetadataRequest, resp
8395
resp.DataSources = datasourceMetadatas
8496
resp.EphemeralResources = ephemeralResourceMetadatas
8597
resp.Functions = functionMetadatas
98+
resp.ListResources = listResourceMetadatas
8699
resp.Resources = resourceMetadatas
87100
}

0 commit comments

Comments
 (0)