From 7db6bf83662771e01272f4dc8a74eb31fb817bb0 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Mon, 18 Aug 2025 17:34:57 -0400 Subject: [PATCH 01/19] Implement TF Actions plumbing --- go.mod | 21 +-- go.sum | 48 ++--- internal/conns/conns.go | 7 + internal/framework/action_test.go | 53 ++++++ internal/framework/action_with_configure.go | 30 ++++ internal/framework/action_with_model.go | 36 ++++ internal/generate/servicepackage/main.go | 35 ++++ .../service_package_gen.go.gtpl | 25 +++ internal/provider/framework/action_test.go | 156 ++++++++++++++++ internal/provider/framework/intercept.go | 51 +++++- internal/provider/framework/provider.go | 53 ++++++ internal/provider/framework/region.go | 45 +++++ internal/provider/framework/wrap.go | 170 ++++++++++++++++++ internal/types/service_package.go | 10 ++ 14 files changed, 704 insertions(+), 36 deletions(-) create mode 100644 internal/framework/action_test.go create mode 100644 internal/framework/action_with_configure.go create mode 100644 internal/framework/action_with_model.go create mode 100644 internal/provider/framework/action_test.go diff --git a/go.mod b/go.mod index 1716d28e64b5..329920911909 100644 --- a/go.mod +++ b/go.mod @@ -288,14 +288,14 @@ require ( github.com/hashicorp/go-version v1.7.0 github.com/hashicorp/hcl/v2 v2.23.0 github.com/hashicorp/terraform-json v0.26.0 - github.com/hashicorp/terraform-plugin-framework v1.15.1 + github.com/hashicorp/terraform-plugin-framework v1.16.0-alpha.1.0.20250728185851-cca5c5aac673 github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 github.com/hashicorp/terraform-plugin-framework-timeouts v0.5.0 github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0 github.com/hashicorp/terraform-plugin-framework-validators v0.18.0 - github.com/hashicorp/terraform-plugin-go v0.28.0 + github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1 github.com/hashicorp/terraform-plugin-log v0.9.0 - github.com/hashicorp/terraform-plugin-mux v0.20.0 + github.com/hashicorp/terraform-plugin-mux v0.20.1-0.20250717140231-ba534763859e github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0 github.com/hashicorp/terraform-plugin-testing v1.13.2 github.com/jaswdr/faker/v2 v2.8.0 @@ -337,7 +337,7 @@ require ( github.com/cloudflare/circl v1.6.1 // indirect github.com/evanphx/json-patch v0.5.2 // indirect github.com/fatih/color v1.18.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/uuid v1.6.0 // indirect @@ -348,7 +348,7 @@ require ( github.com/hashicorp/hc-install v0.9.2 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.23.0 // indirect - github.com/hashicorp/terraform-registry-address v0.2.5 // indirect + github.com/hashicorp/terraform-registry-address v0.3.0 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/huandu/xstrings v1.3.3 // indirect @@ -369,17 +369,18 @@ require ( github.com/zclconf/go-cty v1.16.3 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.61.0 // indirect - go.opentelemetry.io/otel v1.36.0 // indirect - go.opentelemetry.io/otel/metric v1.36.0 // indirect - go.opentelemetry.io/otel/trace v1.36.0 // indirect + go.opentelemetry.io/otel v1.37.0 // indirect + go.opentelemetry.io/otel/metric v1.37.0 // indirect + go.opentelemetry.io/otel/sdk v1.37.0 // indirect + go.opentelemetry.io/otel/trace v1.37.0 // indirect golang.org/x/exp v0.0.0-20220921023135-46d9e7742f1e // indirect golang.org/x/mod v0.27.0 // indirect golang.org/x/net v0.43.0 // indirect golang.org/x/sync v0.16.0 // indirect golang.org/x/sys v0.35.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 // indirect - google.golang.org/grpc v1.72.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b // indirect + google.golang.org/grpc v1.74.2 // indirect google.golang.org/protobuf v1.36.6 // indirect ) diff --git a/go.sum b/go.sum index 59c9e607fc31..9b1c746c96d3 100644 --- a/go.sum +++ b/go.sum @@ -600,8 +600,8 @@ github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH github.com/go-git/go-git/v5 v5.14.0 h1:/MD3lCrGjCen5WfEAzKg00MJJffKhC8gzS80ycmCi60= github.com/go-git/go-git/v5 v5.14.0/go.mod h1:Z5Xhoia5PcWA3NF8vRLURn9E5FRhSl7dGj9ItW3Wk5k= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= @@ -662,8 +662,8 @@ github.com/hashicorp/terraform-exec v0.23.0 h1:MUiBM1s0CNlRFsCLJuM5wXZrzA3MnPYEs github.com/hashicorp/terraform-exec v0.23.0/go.mod h1:mA+qnx1R8eePycfwKkCRk3Wy65mwInvlpAeOwmA7vlY= github.com/hashicorp/terraform-json v0.26.0 h1:+BnJavhRH+oyNWPnfzrfQwVWCZBFMvjdiH2Vi38Udz4= github.com/hashicorp/terraform-json v0.26.0/go.mod h1:eyWCeC3nrZamyrKLFnrvwpc3LQPIJsx8hWHQ/nu2/v4= -github.com/hashicorp/terraform-plugin-framework v1.15.1 h1:2mKDkwb8rlx/tvJTlIcpw0ykcmvdWv+4gY3SIgk8Pq8= -github.com/hashicorp/terraform-plugin-framework v1.15.1/go.mod h1:hxrNI/GY32KPISpWqlCoTLM9JZsGH3CyYlir09bD/fI= +github.com/hashicorp/terraform-plugin-framework v1.16.0-alpha.1.0.20250728185851-cca5c5aac673 h1:NNxkKysLXtHA0BkAMXUV+l/AZla1xyt2+PMiE6KpjM0= +github.com/hashicorp/terraform-plugin-framework v1.16.0-alpha.1.0.20250728185851-cca5c5aac673/go.mod h1:UrhvOHRFMGyYLn35rO3DtvcawLLt65BSQOcLLClRrcQ= github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 h1:SJXL5FfJJm17554Kpt9jFXngdM6fXbnUnZ6iT2IeiYA= github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0/go.mod h1:p0phD0IYhsu9bR4+6OetVvvH59I6LwjXGnTVEr8ox6E= github.com/hashicorp/terraform-plugin-framework-timeouts v0.5.0 h1:I/N0g/eLZ1ZkLZXUQ0oRSXa8YG/EF0CEuQP1wXdrzKw= @@ -672,16 +672,16 @@ github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0 h1:v3DapR8gsp3E github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0/go.mod h1:c3PnGE9pHBDfdEVG9t1S1C9ia5LW+gkFR0CygXlM8ak= github.com/hashicorp/terraform-plugin-framework-validators v0.18.0 h1:OQnlOt98ua//rCw+QhBbSqfW3QbwtVrcdWeQN5gI3Hw= github.com/hashicorp/terraform-plugin-framework-validators v0.18.0/go.mod h1:lZvZvagw5hsJwuY7mAY6KUz45/U6fiDR0CzQAwWD0CA= -github.com/hashicorp/terraform-plugin-go v0.28.0 h1:zJmu2UDwhVN0J+J20RE5huiF3XXlTYVIleaevHZgKPA= -github.com/hashicorp/terraform-plugin-go v0.28.0/go.mod h1:FDa2Bb3uumkTGSkTFpWSOwWJDwA7bf3vdP3ltLDTH6o= -github.com/hashicorp/terraform-plugin-mux v0.20.0 h1:3QpBnI9uCuL0Yy2Rq/kR9cOdmOFNhw88A2GoZtk5aXM= -github.com/hashicorp/terraform-plugin-mux v0.20.0/go.mod h1:wSIZwJjSYk86NOTX3fKUlThMT4EAV1XpBHz9SAvjQr4= +github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1 h1:xeHlRQYev3iMXwX2W7+D1bSfLRBs9jojZXqE6hmNxMI= +github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1/go.mod h1:5pww/UULn9C2tItq6o5sbScEkJxBUt9X9kI4DkeRsIw= +github.com/hashicorp/terraform-plugin-mux v0.20.1-0.20250717140231-ba534763859e h1:U8n8/pVVKdUT4njKquj5T4ym5wkzmaqycQAUAW5zv4Q= +github.com/hashicorp/terraform-plugin-mux v0.20.1-0.20250717140231-ba534763859e/go.mod h1:Rq0WRHKOt3KA5c4w2METfod6Pxvbk0xb58GlZNNG+Uw= github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0 h1:NFPMacTrY/IdcIcnUB+7hsore1ZaRWU9cnB6jFoBnIM= github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0/go.mod h1:QYmYnLfsosrxjCnGY1p9c7Zj6n9thnEE+7RObeYs3fA= github.com/hashicorp/terraform-plugin-testing v1.13.2 h1:mSotG4Odl020vRjIenA3rggwo6Kg6XCKIwtRhYgp+/M= github.com/hashicorp/terraform-plugin-testing v1.13.2/go.mod h1:WHQ9FDdiLoneey2/QHpGM/6SAYf4A7AZazVg7230pLE= -github.com/hashicorp/terraform-registry-address v0.2.5 h1:2GTftHqmUhVOeuu9CW3kwDkRe4pcBDq0uuK5VJngU1M= -github.com/hashicorp/terraform-registry-address v0.2.5/go.mod h1:PpzXWINwB5kuVS5CA7m1+eO2f1jKb5ZDIxrOPfpnGkg= +github.com/hashicorp/terraform-registry-address v0.3.0 h1:HMpK3nqaGFPS9VmgRXrJL/dzHNdheGVKk5k7VlFxzCo= +github.com/hashicorp/terraform-registry-address v0.3.0/go.mod h1:jRGCMiLaY9zii3GLC7hqpSnwhfnCN5yzvY0hh4iCGbM= 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/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= @@ -790,16 +790,16 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.61.0 h1:lR4WnQLBC9XyTwKrz0327rq2QnIdJNpaVIGuW2yMvME= go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.61.0/go.mod h1:UK49mXgwqIWFUDH8ibqTswbhy4fuwjEjj4VKMC7krUQ= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= +go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= +go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= +go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= +go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= @@ -858,10 +858,10 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 h1:IqsN8hx+lWLqlN+Sc3DoMy/watjofWiU8sRFgQ8fhKM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= -google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b h1:zPKJod4w6F1+nRGDI9ubnXYhU9NSWoFAijkHkUXeTK8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= +google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= diff --git a/internal/conns/conns.go b/internal/conns/conns.go index e2dc26434014..e59ca4c0feae 100644 --- a/internal/conns/conns.go +++ b/internal/conns/conns.go @@ -20,6 +20,13 @@ type ServicePackage interface { ServicePackageName() string } +// ServicePackageWithActions is an interface that extends ServicePackage with actions. +// Actions are imperative operations that can be invoked to perform Day-2 operations. +type ServicePackageWithActions interface { + ServicePackage + Actions(context.Context) []*types.ServicePackageAction +} + // ServicePackageWithEphemeralResources is an interface that extends ServicePackage with ephemeral resources. // Ephemeral resources are resources that are not part of the Terraform state, but are used to create other resources. type ServicePackageWithEphemeralResources interface { diff --git a/internal/framework/action_test.go b/internal/framework/action_test.go new file mode 100644 index 000000000000..a4f9206a3d04 --- /dev/null +++ b/internal/framework/action_test.go @@ -0,0 +1,53 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package framework + +import ( + "testing" + + "github.com/hashicorp/terraform-provider-aws/internal/conns" +) + +// Test that ActionWithConfigure can be instantiated and has the expected methods +func TestActionWithConfigureCompilation(t *testing.T) { + t.Parallel() + + // This test ensures our new types compile correctly + var action ActionWithConfigure + + // Test that it has the Meta method from withMeta + if action.Meta() != nil { + t.Error("Expected nil meta before configuration") + } + + // Test that it embeds withMeta correctly + action.meta = &conns.AWSClient{} + if action.Meta() == nil { + t.Error("Expected non-nil meta after setting") + } +} + +// Test that ActionWithModel can be instantiated +func TestActionWithModelCompilation(t *testing.T) { + t.Parallel() + + // Test model + type testModel struct { + Name string `tfsdk:"name"` + } + + // This test ensures our new generic type compiles correctly + var action ActionWithModel[testModel] + + // Test that it has the Meta method from ActionWithConfigure + if action.Meta() != nil { + t.Error("Expected nil meta before configuration") + } + + // Test that it embeds ActionWithConfigure correctly + action.meta = &conns.AWSClient{} + if action.Meta() == nil { + t.Error("Expected non-nil meta after setting") + } +} diff --git a/internal/framework/action_with_configure.go b/internal/framework/action_with_configure.go new file mode 100644 index 000000000000..d79695fab5f3 --- /dev/null +++ b/internal/framework/action_with_configure.go @@ -0,0 +1,30 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package framework + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/action" + "github.com/hashicorp/terraform-provider-aws/internal/conns" +) + +type ActionWithConfigure struct { + withMeta +} + +// Metadata should return the full name of the action, such as +// aws_lambda_invoke. +func (*ActionWithConfigure) Metadata(_ context.Context, request action.MetadataRequest, response *action.MetadataResponse) { + // This method is implemented in the wrappers. + panic("not implemented") // lintignore:R009 +} + +// Configure enables provider-level data or clients to be set in the +// provider-defined Action type. +func (a *ActionWithConfigure) Configure(_ context.Context, request action.ConfigureRequest, _ *action.ConfigureResponse) { + if v, ok := request.ProviderData.(*conns.AWSClient); ok { + a.meta = v + } +} diff --git a/internal/framework/action_with_model.go b/internal/framework/action_with_model.go new file mode 100644 index 000000000000..79145542ba79 --- /dev/null +++ b/internal/framework/action_with_model.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package framework + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/action/schema" + "github.com/hashicorp/terraform-plugin-framework/diag" + "github.com/hashicorp/terraform-plugin-framework/tfsdk" + "github.com/hashicorp/terraform-plugin-go/tftypes" +) + +// ActionWithModel is a structure to be embedded within an Action that has a corresponding model. +type ActionWithModel[T any] struct { + withModel[T] + ActionWithConfigure +} + +// ValidateModel validates the action's model against a schema. +func (a *ActionWithModel[T]) ValidateModel(ctx context.Context, schema *schema.UnlinkedSchema) diag.Diagnostics { + var diags diag.Diagnostics + state := tfsdk.State{ + Raw: tftypes.NewValue(schema.Type().TerraformType(ctx), nil), + Schema: schema, + } + + diags.Append(a.validateModel(ctx, &state)...) + + return diags +} + +type ActionValidateModel interface { + ValidateModel(ctx context.Context, schema *schema.UnlinkedSchema) diag.Diagnostics +} diff --git a/internal/generate/servicepackage/main.go b/internal/generate/servicepackage/main.go index c6819d4dafea..5cf445935f4c 100644 --- a/internal/generate/servicepackage/main.go +++ b/internal/generate/servicepackage/main.go @@ -62,6 +62,7 @@ func main() { v := &visitor{ g: g, + actions: make(map[string]ResourceDatum, 0), ephemeralResources: make(map[string]ResourceDatum, 0), frameworkDataSources: make(map[string]ResourceDatum, 0), frameworkResources: make(map[string]ResourceDatum, 0), @@ -94,6 +95,7 @@ func main() { GoV2Package: l.GoV2Package(), ProviderPackage: p, ProviderNameUpper: l.ProviderNameUpper(), + Actions: v.actions, EphemeralResources: v.ephemeralResources, FrameworkDataSources: v.frameworkDataSources, FrameworkResources: v.frameworkResources, @@ -102,6 +104,9 @@ func main() { } var imports []goImport + for resource := range maps.Values(v.actions) { + imports = append(imports, resource.goImports...) + } for resource := range maps.Values(v.ephemeralResources) { imports = append(imports, resource.goImports...) } @@ -232,6 +237,7 @@ type ServiceDatum struct { GoV2Package string // AWS SDK for Go v2 package name ProviderPackage string ProviderNameUpper string + Actions map[string]ResourceDatum EphemeralResources map[string]ResourceDatum FrameworkDataSources map[string]ResourceDatum FrameworkResources map[string]ResourceDatum @@ -260,6 +266,7 @@ type visitor struct { functionName string packageName string + actions map[string]ResourceDatum ephemeralResources map[string]ResourceDatum frameworkDataSources map[string]ResourceDatum frameworkResources map[string]ResourceDatum @@ -512,6 +519,34 @@ func (v *visitor) processFuncDecl(funcDecl *ast.FuncDecl) { } switch annotationName := m[1]; annotationName { + case "Action": + if len(args.Positional) == 0 { + v.errs = append(v.errs, fmt.Errorf("no type name: %s", fmt.Sprintf("%s.%s", v.packageName, v.functionName))) + continue + } + + typeName := args.Positional[0] + + if !validTypeName.MatchString(typeName) { + v.errs = append(v.errs, fmt.Errorf("invalid type name (%s): %s", typeName, fmt.Sprintf("%s.%s", v.packageName, v.functionName))) + continue + } + + if d.Name == "" { + v.errs = append(v.errs, fmt.Errorf("no friendly name: %s", fmt.Sprintf("%s.%s", v.packageName, v.functionName))) + continue + } + + if _, ok := v.actions[typeName]; ok { + v.errs = append(v.errs, fmt.Errorf("duplicate Action (%s): %s", typeName, fmt.Sprintf("%s.%s", v.packageName, v.functionName))) + } else { + v.actions[typeName] = d + } + + if d.HasV6_0SDKv2Fix { + v.errs = append(v.errs, fmt.Errorf("V60SDKv2Fix not supported for Actions: %s", fmt.Sprintf("%s.%s", v.packageName, v.functionName))) + } + case "EphemeralResource": if len(args.Positional) == 0 { v.errs = append(v.errs, fmt.Errorf("no type name: %s", fmt.Sprintf("%s.%s", v.packageName, v.functionName))) diff --git a/internal/generate/servicepackage/service_package_gen.go.gtpl b/internal/generate/servicepackage/service_package_gen.go.gtpl index 0304cab0e198..9495f00f192a 100644 --- a/internal/generate/servicepackage/service_package_gen.go.gtpl +++ b/internal/generate/servicepackage/service_package_gen.go.gtpl @@ -59,6 +59,31 @@ import ( type servicePackage struct {} +{{- if .Actions }} +func (p *servicePackage) Actions(ctx context.Context) []*inttypes.ServicePackageAction { + return []*inttypes.ServicePackageAction { +{{- range $key, $value := .Actions }} + {{- $regionOverrideEnabled := and (not $.IsGlobal) $value.RegionOverrideEnabled }} + { + Factory: {{ $value.FactoryName }}, + TypeName: "{{ $key }}", + Name: "{{ $value.Name }}", + {{- if and $regionOverrideEnabled $value.ValidateRegionOverrideInPartition }} + Region: unique.Make(inttypes.ResourceRegionDefault()), + {{- else if not $regionOverrideEnabled }} + Region: unique.Make(inttypes.ResourceRegionDisabled()), + {{- else }} + Region: unique.Make(inttypes.ServicePackageResourceRegion { + IsOverrideEnabled: {{ $regionOverrideEnabled }}, + IsValidateOverrideInPartition: {{ $value.ValidateRegionOverrideInPartition }}, + }), + {{- end }} + }, +{{- end }} + } +} +{{- end }} + {{- if .EphemeralResources }} func (p *servicePackage) EphemeralResources(ctx context.Context) []*inttypes.ServicePackageEphemeralResource { return []*inttypes.ServicePackageEphemeralResource { diff --git a/internal/provider/framework/action_test.go b/internal/provider/framework/action_test.go new file mode 100644 index 000000000000..824476e3dda0 --- /dev/null +++ b/internal/provider/framework/action_test.go @@ -0,0 +1,156 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package framework + +import ( + "context" + "testing" + + "github.com/hashicorp/terraform-plugin-framework/action" + "github.com/hashicorp/terraform-plugin-framework/action/schema" + "github.com/hashicorp/terraform-plugin-framework/diag" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/framework" +) + +// testAction implements action.Action for testing +type testAction struct{} + +func (t *testAction) Metadata(ctx context.Context, req action.MetadataRequest, resp *action.MetadataResponse) { + resp.TypeName = "aws_test_action" +} + +func (t *testAction) Schema(ctx context.Context, req action.SchemaRequest, resp *action.SchemaResponse) { + resp.Schema = schema.UnlinkedSchema{ + Description: "Test action for framework integration", + Attributes: map[string]schema.Attribute{ + "test_param": schema.StringAttribute{ + Required: true, + Description: "Test parameter", + }, + }, + } +} + +func (t *testAction) Invoke(ctx context.Context, req action.InvokeRequest, resp *action.InvokeResponse) { + // Test implementation - just validate we can access the config + var config testActionModel + resp.Diagnostics.Append(req.Config.Get(ctx, &config)...) + if resp.Diagnostics.HasError() { + return + } + + // Send progress update + resp.SendProgress(action.InvokeProgressEvent{ + Message: "Test action executed successfully", + }) +} + +// testActionModel represents the configuration model for the test action +type testActionModel struct { + TestParam types.String `tfsdk:"test_param"` +} + +// Implement ActionValidateModel interface +func (t *testAction) ValidateModel(ctx context.Context, schema *schema.UnlinkedSchema) diag.Diagnostics { + var diags diag.Diagnostics + // Basic validation - ensure required attributes exist + if _, ok := schema.Attributes["test_param"]; !ok { + diags.AddError("Missing required attribute", "test_param attribute is required") + } + return diags +} + +// Ensure testAction implements required interfaces +var ( + _ action.Action = (*testAction)(nil) + _ framework.ActionValidateModel = (*testAction)(nil) +) + +func TestWrappedAction_Basic(t *testing.T) { + ctx := context.Background() + + // Create test action + inner := &testAction{} + + // Create wrapped action with minimal options + opts := wrappedActionOptions{ + bootstrapContext: func(ctx context.Context, getAttribute getAttributeFunc, c *conns.AWSClient) (context.Context, diag.Diagnostics) { + return ctx, nil + }, + interceptors: interceptorInvocations{}, + typeName: "aws_test_action", + } + + wrapped := newWrappedAction(inner, opts) + + // Test Metadata + metaReq := action.MetadataRequest{ + ProviderTypeName: "aws", + } + var metaResp action.MetadataResponse + wrapped.Metadata(ctx, metaReq, &metaResp) + + if metaResp.TypeName != "aws_test_action" { + t.Errorf("Expected TypeName 'aws_test_action', got '%s'", metaResp.TypeName) + } + + // Test Schema + schemaReq := action.SchemaRequest{} + var schemaResp action.SchemaResponse + wrapped.Schema(ctx, schemaReq, &schemaResp) + + if schemaResp.Diagnostics.HasError() { + t.Errorf("Schema method returned errors: %v", schemaResp.Diagnostics) + } + + if unlinkedSchema, ok := schemaResp.Schema.(schema.UnlinkedSchema); ok { + if _, exists := unlinkedSchema.Attributes["test_param"]; !exists { + t.Error("Expected 'test_param' attribute in schema") + } + } else { + t.Error("Expected UnlinkedSchema type") + } +} + +func TestActionInterceptors_RegionInjection(t *testing.T) { + ctx := context.Background() + + // Create test action + inner := &testAction{} + + // Create wrapped action with region interceptor + opts := wrappedActionOptions{ + bootstrapContext: func(ctx context.Context, getAttribute getAttributeFunc, c *conns.AWSClient) (context.Context, diag.Diagnostics) { + return ctx, nil + }, + interceptors: interceptorInvocations{ + actionInjectRegionAttribute(), + }, + typeName: "aws_test_action", + } + + wrapped := newWrappedAction(inner, opts) + + // Test Schema with region injection + schemaReq := action.SchemaRequest{} + var schemaResp action.SchemaResponse + wrapped.Schema(ctx, schemaReq, &schemaResp) + + if schemaResp.Diagnostics.HasError() { + t.Errorf("Schema method returned errors: %v", schemaResp.Diagnostics) + } + + if unlinkedSchema, ok := schemaResp.Schema.(schema.UnlinkedSchema); ok { + if _, exists := unlinkedSchema.Attributes["region"]; !exists { + t.Error("Expected 'region' attribute to be injected into schema") + } + if _, exists := unlinkedSchema.Attributes["test_param"]; !exists { + t.Error("Expected original 'test_param' attribute to remain in schema") + } + } else { + t.Error("Expected UnlinkedSchema type") + } +} diff --git a/internal/provider/framework/intercept.go b/internal/provider/framework/intercept.go index 9d88fb5f6e6b..d70c408d7b38 100644 --- a/internal/provider/framework/intercept.go +++ b/internal/provider/framework/intercept.go @@ -8,6 +8,7 @@ import ( "slices" "github.com/aws/aws-sdk-go-v2/aws" + "github.com/hashicorp/terraform-plugin-framework/action" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/ephemeral" "github.com/hashicorp/terraform-plugin-framework/resource" @@ -269,9 +270,45 @@ const ( Finally // Interceptor is invoked after After or OnError ) +// An action interceptor is functionality invoked during the action's lifecycle. +// If a Before interceptor returns Diagnostics indicating an error occurred then +// no further interceptors in the chain are run and neither is the schema's method. +// In other cases all interceptors in the chain are run. +type actionInvokeInterceptor interface { + // invoke is invoked for an Invoke call. + invoke(context.Context, interceptorOptions[action.InvokeRequest, action.InvokeResponse]) +} + +// actionInvoke returns a slice of interceptors that run on action Invoke. +func (s interceptorInvocations) actionInvoke() []interceptorFunc[action.InvokeRequest, action.InvokeResponse] { + return tfslices.ApplyToAll(tfslices.Filter(s, func(e any) bool { + _, ok := e.(actionInvokeInterceptor) + return ok + }), func(e any) interceptorFunc[action.InvokeRequest, action.InvokeResponse] { + return e.(actionInvokeInterceptor).invoke + }) +} + +type actionSchemaInterceptor interface { + // schema is invoked for a Schema call. + schema(context.Context, interceptorOptions[action.SchemaRequest, action.SchemaResponse]) +} + +// actionSchema returns a slice of interceptors that run on action Schema. +func (s interceptorInvocations) actionSchema() []interceptorFunc[action.SchemaRequest, action.SchemaResponse] { + return tfslices.ApplyToAll(tfslices.Filter(s, func(e any) bool { + _, ok := e.(actionSchemaInterceptor) + return ok + }), func(e any) interceptorFunc[action.SchemaRequest, action.SchemaResponse] { + return e.(actionSchemaInterceptor).schema + }) +} + // interceptedRequest represents a Plugin Framework request type that can be intercepted. type interceptedRequest interface { - datasource.SchemaRequest | + action.SchemaRequest | + action.InvokeRequest | + datasource.SchemaRequest | datasource.ReadRequest | ephemeral.SchemaRequest | ephemeral.OpenRequest | @@ -288,7 +325,9 @@ type interceptedRequest interface { // interceptedResponse represents a Plugin Framework response type that can be intercepted. type interceptedResponse interface { - datasource.SchemaResponse | + action.SchemaResponse | + action.InvokeResponse | + datasource.SchemaResponse | datasource.ReadResponse | ephemeral.SchemaResponse | ephemeral.OpenResponse | @@ -397,3 +436,11 @@ func resourceModifyPlanHasError(response *resource.ModifyPlanResponse) bool { func resourceImportStateHasError(response *resource.ImportStateResponse) bool { return response.Diagnostics.HasError() } + +func actionSchemaHasError(response *action.SchemaResponse) bool { + return response.Diagnostics.HasError() +} + +func actionInvokeHasError(response *action.InvokeResponse) bool { + return response.Diagnostics.HasError() +} diff --git a/internal/provider/framework/provider.go b/internal/provider/framework/provider.go index 0745fe4329a6..36ee5ed98cb2 100644 --- a/internal/provider/framework/provider.go +++ b/internal/provider/framework/provider.go @@ -15,6 +15,8 @@ import ( "unique" "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework/action" + aschema "github.com/hashicorp/terraform-plugin-framework/action/schema" "github.com/hashicorp/terraform-plugin-framework/datasource" datasourceschema "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/ephemeral" @@ -42,11 +44,13 @@ var ( var ( _ provider.Provider = &frameworkProvider{} + _ provider.ProviderWithActions = &frameworkProvider{} _ provider.ProviderWithFunctions = &frameworkProvider{} _ provider.ProviderWithEphemeralResources = &frameworkProvider{} ) type frameworkProvider struct { + actions []func() action.Action dataSources []func() datasource.DataSource ephemeralResources []func() ephemeral.EphemeralResource primary interface{ Meta() any } @@ -60,6 +64,7 @@ func NewProvider(ctx context.Context, primary interface{ Meta() any }) (provider log.Printf("Creating Terraform AWS Provider (Framework-style)...") provider := &frameworkProvider{ + actions: make([]func() action.Action, 0), dataSources: make([]func() datasource.DataSource, 0), ephemeralResources: make([]func() ephemeral.EphemeralResource, 0), primary: primary, @@ -344,6 +349,7 @@ func (p *frameworkProvider) Configure(ctx context.Context, request provider.Conf response.DataSourceData = v response.ResourceData = v response.EphemeralResourceData = v + response.ActionData = v } // DataSources returns a slice of functions to instantiate each DataSource @@ -370,6 +376,14 @@ func (p *frameworkProvider) EphemeralResources(ctx context.Context) []func() eph return slices.Clone(p.ephemeralResources) } +// Actions returns a slice of functions to instantiate each Action +// implementation. +// +// All actions must have unique type names. +func (p *frameworkProvider) Actions(ctx context.Context) []func() action.Action { + return slices.Clone(p.actions) +} + // Functions returns a slice of functions to instantiate each Function // implementation. // @@ -409,6 +423,14 @@ func (p *frameworkProvider) initialize(ctx context.Context) { return newWrappedResource(resourceSpec, servicePackageName) }) } + + if v, ok := sp.(conns.ServicePackageWithActions); ok { + for _, actionSpec := range v.Actions(ctx) { + p.actions = append(p.actions, func() action.Action { //nolint:contextcheck // must be a func() + return newWrappedAction(actionSpec, servicePackageName) + }) + } + } } } @@ -460,6 +482,26 @@ func (p *frameworkProvider) validateResourceSchemas(ctx context.Context) error { } } + if v, ok := sp.(conns.ServicePackageWithActions); ok { + for _, actionSpec := range v.Actions(ctx) { + typeName := actionSpec.TypeName + inner, err := actionSpec.Factory(ctx) + + if err != nil { + errs = append(errs, fmt.Errorf("creating action type (%s): %w", typeName, err)) + continue + } + + schemaResponse := action.SchemaResponse{} + inner.Schema(ctx, action.SchemaRequest{}, &schemaResponse) + + if err := validateSchemaRegionForAction(actionSpec.Region, schemaResponse.Schema); err != nil { + errs = append(errs, fmt.Errorf("action type %q: %w", typeName, err)) + continue + } + } + } + for _, resourceSpec := range sp.FrameworkResources(ctx) { typeName := resourceSpec.TypeName inner, err := resourceSpec.Factory(ctx) @@ -519,6 +561,17 @@ func validateSchemaRegionForEphemeralResource(regionSpec unique.Handle[inttypes. return nil } +func validateSchemaRegionForAction(regionSpec unique.Handle[inttypes.ServicePackageResourceRegion], schemaIface any) error { + if !tfunique.IsHandleNil(regionSpec) && regionSpec.Value().IsOverrideEnabled { + if schema, ok := schemaIface.(aschema.UnlinkedSchema); ok { + if _, ok := schema.Attributes[names.AttrRegion]; ok { + return fmt.Errorf("configured for enhanced regions but defines `%s` attribute in schema", names.AttrRegion) + } + } + } + return nil +} + func validateSchemaRegionForResource(regionSpec unique.Handle[inttypes.ServicePackageResourceRegion], schema resourceschema.Schema) error { if !tfunique.IsHandleNil(regionSpec) && regionSpec.Value().IsOverrideEnabled { if _, ok := schema.Attributes[names.AttrRegion]; ok { diff --git a/internal/provider/framework/region.go b/internal/provider/framework/region.go index 9b132ad9a73e..721db9cb890a 100644 --- a/internal/provider/framework/region.go +++ b/internal/provider/framework/region.go @@ -7,6 +7,8 @@ import ( "context" "github.com/YakDriver/regexache" + "github.com/hashicorp/terraform-plugin-framework/action" + aschema "github.com/hashicorp/terraform-plugin-framework/action/schema" "github.com/hashicorp/terraform-plugin-framework/datasource" dsschema "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/diag" @@ -364,3 +366,46 @@ func (r resourceImportRegionNoDefaultInterceptor) importState(ctx context.Contex func resourceImportRegionNoDefault() resourceImportStateInterceptor { return &resourceImportRegionNoDefaultInterceptor{} } + +type actionInjectRegionAttributeInterceptor struct{} + +func (a actionInjectRegionAttributeInterceptor) schema(ctx context.Context, opts interceptorOptions[action.SchemaRequest, action.SchemaResponse]) { + switch response, when := opts.response, opts.when; when { + case After: + if schema, ok := response.Schema.(aschema.UnlinkedSchema); ok { + if _, exists := schema.Attributes[names.AttrRegion]; !exists { + // Inject a top-level "region" attribute. + if schema.Attributes == nil { + schema.Attributes = make(map[string]aschema.Attribute) + } + schema.Attributes[names.AttrRegion] = aschema.StringAttribute{ + Optional: true, + Description: names.TopLevelRegionAttributeDescription, + } + response.Schema = schema + } + } + } +} + +// actionInjectRegionAttribute injects a top-level "region" attribute into an action's schema. +func actionInjectRegionAttribute() actionSchemaInterceptor { + return &actionInjectRegionAttributeInterceptor{} +} + +type actionValidateRegionInterceptor struct { +} + +func (a actionValidateRegionInterceptor) invoke(ctx context.Context, opts interceptorOptions[action.InvokeRequest, action.InvokeResponse]) { + c := opts.c + + switch when := opts.when; when { + case Before: + opts.response.Diagnostics.Append(validateInContextRegionInPartition(ctx, c)...) + } +} + +// actionValidateRegion validates that the value of the top-level `region` attribute is in the configured AWS partition. +func actionValidateRegion() actionInvokeInterceptor { + return &actionValidateRegionInterceptor{} +} diff --git a/internal/provider/framework/wrap.go b/internal/provider/framework/wrap.go index 19b5c10034ee..3bd79cc39f2b 100644 --- a/internal/provider/framework/wrap.go +++ b/internal/provider/framework/wrap.go @@ -6,6 +6,8 @@ package framework import ( "context" + "github.com/hashicorp/terraform-plugin-framework/action" + aschema "github.com/hashicorp/terraform-plugin-framework/action/schema" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/ephemeral" @@ -29,6 +31,9 @@ import ( // Implemented by (Config|Plan|State).GetAttribute(). type getAttributeFunc func(context.Context, path.Path, any) diag.Diagnostics +// contextFunc represents a function that creates a context with metadata. +type contextFunc func(context.Context, getAttributeFunc, *conns.AWSClient) (context.Context, diag.Diagnostics) + // wrappedDataSource represents an interceptor dispatcher for a Plugin Framework data source. type wrappedDataSource struct { inner datasource.DataSourceWithConfigure @@ -354,6 +359,171 @@ func (w *wrappedEphemeralResource) ValidateConfig(ctx context.Context, request e } } +type wrappedActionOptions struct { + // bootstrapContext is run on all wrapped methods before any interceptors. + bootstrapContext contextFunc + interceptors interceptorInvocations + typeName string +} + +// wrappedAction represents an interceptor dispatcher for a Plugin Framework action. +type wrappedAction struct { + inner action.ActionWithConfigure + meta *conns.AWSClient + opts wrappedActionOptions +} + +func newWrappedAction(spec *inttypes.ServicePackageAction, servicePackageName string) action.ActionWithConfigure { + var isRegionOverrideEnabled bool + if regionSpec := spec.Region; !tfunique.IsHandleNil(regionSpec) && regionSpec.Value().IsOverrideEnabled { + isRegionOverrideEnabled = true + } + + var interceptors interceptorInvocations + + if isRegionOverrideEnabled { + v := spec.Region.Value() + + interceptors = append(interceptors, actionInjectRegionAttribute()) + if v.IsValidateOverrideInPartition { + interceptors = append(interceptors, actionValidateRegion()) + } + } + + inner, _ := spec.Factory(context.TODO()) + + opts := wrappedActionOptions{ + // bootstrapContext is run on all wrapped methods before any interceptors. + bootstrapContext: func(ctx context.Context, getAttribute getAttributeFunc, c *conns.AWSClient) (context.Context, diag.Diagnostics) { + var diags diag.Diagnostics + var overrideRegion string + + if isRegionOverrideEnabled && getAttribute != nil { + var target types.String + diags.Append(getAttribute(ctx, path.Root(names.AttrRegion), &target)...) + if diags.HasError() { + return ctx, diags + } + + overrideRegion = target.ValueString() + } + + ctx = conns.NewResourceContext(ctx, servicePackageName, spec.Name, overrideRegion) + if c != nil { + ctx = c.RegisterLogger(ctx) + ctx = fwflex.RegisterLogger(ctx) + ctx = logging.MaskSensitiveValuesByKey(ctx, logging.HTTPKeyRequestBody, logging.HTTPKeyResponseBody) + } + return ctx, diags + }, + interceptors: interceptors, + typeName: spec.TypeName, + } + + return &wrappedAction{ + inner: inner, + opts: opts, + } +} + +func (w *wrappedAction) Metadata(ctx context.Context, request action.MetadataRequest, response *action.MetadataResponse) { + // This method does not call down to the inner action. + response.TypeName = w.opts.typeName +} + +func (w *wrappedAction) Schema(ctx context.Context, request action.SchemaRequest, response *action.SchemaResponse) { + ctx, diags := w.opts.bootstrapContext(ctx, nil, w.meta) + response.Diagnostics.Append(diags...) + if response.Diagnostics.HasError() { + return + } + + f := func(ctx context.Context, request action.SchemaRequest, response *action.SchemaResponse) { + w.inner.Schema(ctx, request, response) + } + interceptedHandler(w.opts.interceptors.actionSchema(), f, actionSchemaHasError, w.meta)(ctx, request, response) + + // Validate the action's model against the schema. + if v, ok := w.inner.(framework.ActionValidateModel); ok { + if schema, ok := response.Schema.(aschema.UnlinkedSchema); ok { + response.Diagnostics.Append(v.ValidateModel(ctx, &schema)...) + if response.Diagnostics.HasError() { + response.Diagnostics.AddError("action model validation error", w.opts.typeName) + return + } + } else { + response.Diagnostics.AddError("unsupported action schema type", w.opts.typeName) + } + } else { + response.Diagnostics.AddError("missing framework.ActionValidateModel", w.opts.typeName) + } +} + +func (w *wrappedAction) Invoke(ctx context.Context, request action.InvokeRequest, response *action.InvokeResponse) { + ctx, diags := w.opts.bootstrapContext(ctx, request.Config.GetAttribute, w.meta) + response.Diagnostics.Append(diags...) + if response.Diagnostics.HasError() { + return + } + + f := func(ctx context.Context, request action.InvokeRequest, response *action.InvokeResponse) { + w.inner.Invoke(ctx, request, response) + } + interceptedHandler(w.opts.interceptors.actionInvoke(), f, actionInvokeHasError, w.meta)(ctx, request, response) +} + +func (w *wrappedAction) Configure(ctx context.Context, request action.ConfigureRequest, response *action.ConfigureResponse) { + if v, ok := request.ProviderData.(*conns.AWSClient); ok { + w.meta = v + } + + ctx, diags := w.opts.bootstrapContext(ctx, nil, w.meta) + response.Diagnostics.Append(diags...) + if response.Diagnostics.HasError() { + return + } + + w.inner.Configure(ctx, request, response) +} + +func (w *wrappedAction) ConfigValidators(ctx context.Context) []action.ConfigValidator { + if v, ok := w.inner.(action.ActionWithConfigValidators); ok { + ctx, diags := w.opts.bootstrapContext(ctx, nil, w.meta) + if diags.HasError() { + tflog.Warn(ctx, "wrapping ConfigValidators", map[string]any{ + "action": w.opts.typeName, + "bootstrapContext error": fwdiag.DiagnosticsString(diags), + }) + + return nil + } + + return v.ConfigValidators(ctx) + } + + return nil +} + +func (w *wrappedAction) ValidateConfig(ctx context.Context, request action.ValidateConfigRequest, response *action.ValidateConfigResponse) { + if v, ok := w.inner.(action.ActionWithValidateConfig); ok { + ctx, diags := w.opts.bootstrapContext(ctx, request.Config.GetAttribute, w.meta) + response.Diagnostics.Append(diags...) + if response.Diagnostics.HasError() { + return + } + + v.ValidateConfig(ctx, request, response) + } +} + +type wrappedResourceOptions struct { + // bootstrapContext is run on all wrapped methods before any interceptors. + bootstrapContext contextFunc + interceptors interceptorInvocations + typeName string + identity inttypes.Identity +} + // wrappedResource represents an interceptor dispatcher for a Plugin Framework resource. type wrappedResource struct { inner resource.ResourceWithConfigure diff --git a/internal/types/service_package.go b/internal/types/service_package.go index 2b1603fbf3d0..d783b86823e7 100644 --- a/internal/types/service_package.go +++ b/internal/types/service_package.go @@ -8,6 +8,7 @@ import ( "slices" "unique" + "github.com/hashicorp/terraform-plugin-framework/action" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/ephemeral" "github.com/hashicorp/terraform-plugin-framework/resource" @@ -42,6 +43,15 @@ type ServicePackageResourceTags struct { ResourceType string // Extra resourceType parameter value for UpdateTags etc. } +// ServicePackageAction represents a Terraform Plugin Framework action +// implemented by a service package. +type ServicePackageAction struct { + Factory func(context.Context) (action.ActionWithConfigure, error) + TypeName string + Name string + Region unique.Handle[ServicePackageResourceRegion] +} + // ServicePackageEphemeralResource represents a Terraform Plugin Framework ephemeral resource // implemented by a service package. type ServicePackageEphemeralResource struct { From c20b02bb87f6a5600c108f5eff3948e55dd49bda Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Mon, 18 Aug 2025 17:54:36 -0400 Subject: [PATCH 02/19] Make actions consistent --- internal/provider/framework/action_test.go | 156 --------------------- internal/provider/framework/wrap.go | 104 ++++++-------- 2 files changed, 46 insertions(+), 214 deletions(-) delete mode 100644 internal/provider/framework/action_test.go diff --git a/internal/provider/framework/action_test.go b/internal/provider/framework/action_test.go deleted file mode 100644 index 824476e3dda0..000000000000 --- a/internal/provider/framework/action_test.go +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package framework - -import ( - "context" - "testing" - - "github.com/hashicorp/terraform-plugin-framework/action" - "github.com/hashicorp/terraform-plugin-framework/action/schema" - "github.com/hashicorp/terraform-plugin-framework/diag" - "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/hashicorp/terraform-provider-aws/internal/conns" - "github.com/hashicorp/terraform-provider-aws/internal/framework" -) - -// testAction implements action.Action for testing -type testAction struct{} - -func (t *testAction) Metadata(ctx context.Context, req action.MetadataRequest, resp *action.MetadataResponse) { - resp.TypeName = "aws_test_action" -} - -func (t *testAction) Schema(ctx context.Context, req action.SchemaRequest, resp *action.SchemaResponse) { - resp.Schema = schema.UnlinkedSchema{ - Description: "Test action for framework integration", - Attributes: map[string]schema.Attribute{ - "test_param": schema.StringAttribute{ - Required: true, - Description: "Test parameter", - }, - }, - } -} - -func (t *testAction) Invoke(ctx context.Context, req action.InvokeRequest, resp *action.InvokeResponse) { - // Test implementation - just validate we can access the config - var config testActionModel - resp.Diagnostics.Append(req.Config.Get(ctx, &config)...) - if resp.Diagnostics.HasError() { - return - } - - // Send progress update - resp.SendProgress(action.InvokeProgressEvent{ - Message: "Test action executed successfully", - }) -} - -// testActionModel represents the configuration model for the test action -type testActionModel struct { - TestParam types.String `tfsdk:"test_param"` -} - -// Implement ActionValidateModel interface -func (t *testAction) ValidateModel(ctx context.Context, schema *schema.UnlinkedSchema) diag.Diagnostics { - var diags diag.Diagnostics - // Basic validation - ensure required attributes exist - if _, ok := schema.Attributes["test_param"]; !ok { - diags.AddError("Missing required attribute", "test_param attribute is required") - } - return diags -} - -// Ensure testAction implements required interfaces -var ( - _ action.Action = (*testAction)(nil) - _ framework.ActionValidateModel = (*testAction)(nil) -) - -func TestWrappedAction_Basic(t *testing.T) { - ctx := context.Background() - - // Create test action - inner := &testAction{} - - // Create wrapped action with minimal options - opts := wrappedActionOptions{ - bootstrapContext: func(ctx context.Context, getAttribute getAttributeFunc, c *conns.AWSClient) (context.Context, diag.Diagnostics) { - return ctx, nil - }, - interceptors: interceptorInvocations{}, - typeName: "aws_test_action", - } - - wrapped := newWrappedAction(inner, opts) - - // Test Metadata - metaReq := action.MetadataRequest{ - ProviderTypeName: "aws", - } - var metaResp action.MetadataResponse - wrapped.Metadata(ctx, metaReq, &metaResp) - - if metaResp.TypeName != "aws_test_action" { - t.Errorf("Expected TypeName 'aws_test_action', got '%s'", metaResp.TypeName) - } - - // Test Schema - schemaReq := action.SchemaRequest{} - var schemaResp action.SchemaResponse - wrapped.Schema(ctx, schemaReq, &schemaResp) - - if schemaResp.Diagnostics.HasError() { - t.Errorf("Schema method returned errors: %v", schemaResp.Diagnostics) - } - - if unlinkedSchema, ok := schemaResp.Schema.(schema.UnlinkedSchema); ok { - if _, exists := unlinkedSchema.Attributes["test_param"]; !exists { - t.Error("Expected 'test_param' attribute in schema") - } - } else { - t.Error("Expected UnlinkedSchema type") - } -} - -func TestActionInterceptors_RegionInjection(t *testing.T) { - ctx := context.Background() - - // Create test action - inner := &testAction{} - - // Create wrapped action with region interceptor - opts := wrappedActionOptions{ - bootstrapContext: func(ctx context.Context, getAttribute getAttributeFunc, c *conns.AWSClient) (context.Context, diag.Diagnostics) { - return ctx, nil - }, - interceptors: interceptorInvocations{ - actionInjectRegionAttribute(), - }, - typeName: "aws_test_action", - } - - wrapped := newWrappedAction(inner, opts) - - // Test Schema with region injection - schemaReq := action.SchemaRequest{} - var schemaResp action.SchemaResponse - wrapped.Schema(ctx, schemaReq, &schemaResp) - - if schemaResp.Diagnostics.HasError() { - t.Errorf("Schema method returned errors: %v", schemaResp.Diagnostics) - } - - if unlinkedSchema, ok := schemaResp.Schema.(schema.UnlinkedSchema); ok { - if _, exists := unlinkedSchema.Attributes["region"]; !exists { - t.Error("Expected 'region' attribute to be injected into schema") - } - if _, exists := unlinkedSchema.Attributes["test_param"]; !exists { - t.Error("Expected original 'test_param' attribute to remain in schema") - } - } else { - t.Error("Expected UnlinkedSchema type") - } -} diff --git a/internal/provider/framework/wrap.go b/internal/provider/framework/wrap.go index 3bd79cc39f2b..e0904e21bead 100644 --- a/internal/provider/framework/wrap.go +++ b/internal/provider/framework/wrap.go @@ -31,9 +31,6 @@ import ( // Implemented by (Config|Plan|State).GetAttribute(). type getAttributeFunc func(context.Context, path.Path, any) diag.Diagnostics -// contextFunc represents a function that creates a context with metadata. -type contextFunc func(context.Context, getAttributeFunc, *conns.AWSClient) (context.Context, diag.Diagnostics) - // wrappedDataSource represents an interceptor dispatcher for a Plugin Framework data source. type wrappedDataSource struct { inner datasource.DataSourceWithConfigure @@ -359,18 +356,13 @@ func (w *wrappedEphemeralResource) ValidateConfig(ctx context.Context, request e } } -type wrappedActionOptions struct { - // bootstrapContext is run on all wrapped methods before any interceptors. - bootstrapContext contextFunc - interceptors interceptorInvocations - typeName string -} - // wrappedAction represents an interceptor dispatcher for a Plugin Framework action. type wrappedAction struct { - inner action.ActionWithConfigure - meta *conns.AWSClient - opts wrappedActionOptions + inner action.ActionWithConfigure + meta *conns.AWSClient + servicePackageName string + spec *inttypes.ServicePackageAction + interceptors interceptorInvocations } func newWrappedAction(spec *inttypes.ServicePackageAction, servicePackageName string) action.ActionWithConfigure { @@ -392,47 +384,51 @@ func newWrappedAction(spec *inttypes.ServicePackageAction, servicePackageName st inner, _ := spec.Factory(context.TODO()) - opts := wrappedActionOptions{ - // bootstrapContext is run on all wrapped methods before any interceptors. - bootstrapContext: func(ctx context.Context, getAttribute getAttributeFunc, c *conns.AWSClient) (context.Context, diag.Diagnostics) { - var diags diag.Diagnostics - var overrideRegion string + return &wrappedAction{ + inner: inner, + servicePackageName: servicePackageName, + spec: spec, + interceptors: interceptors, + } +} - if isRegionOverrideEnabled && getAttribute != nil { - var target types.String - diags.Append(getAttribute(ctx, path.Root(names.AttrRegion), &target)...) - if diags.HasError() { - return ctx, diags - } +// context is run on all wrapped methods before any interceptors. +func (w *wrappedAction) context(ctx context.Context, getAttribute getAttributeFunc, c *conns.AWSClient) (context.Context, diag.Diagnostics) { + var diags diag.Diagnostics + var overrideRegion string - overrideRegion = target.ValueString() - } + var isRegionOverrideEnabled bool + if regionSpec := w.spec.Region; !tfunique.IsHandleNil(regionSpec) && regionSpec.Value().IsOverrideEnabled { + isRegionOverrideEnabled = true + } - ctx = conns.NewResourceContext(ctx, servicePackageName, spec.Name, overrideRegion) - if c != nil { - ctx = c.RegisterLogger(ctx) - ctx = fwflex.RegisterLogger(ctx) - ctx = logging.MaskSensitiveValuesByKey(ctx, logging.HTTPKeyRequestBody, logging.HTTPKeyResponseBody) - } + if isRegionOverrideEnabled && getAttribute != nil { + var target types.String + diags.Append(getAttribute(ctx, path.Root(names.AttrRegion), &target)...) + if diags.HasError() { return ctx, diags - }, - interceptors: interceptors, - typeName: spec.TypeName, + } + + overrideRegion = target.ValueString() } - return &wrappedAction{ - inner: inner, - opts: opts, + ctx = conns.NewResourceContext(ctx, w.servicePackageName, w.spec.Name, overrideRegion) + if c != nil { + ctx = c.RegisterLogger(ctx) + ctx = fwflex.RegisterLogger(ctx) + ctx = logging.MaskSensitiveValuesByKey(ctx, logging.HTTPKeyRequestBody, logging.HTTPKeyResponseBody) } + + return ctx, diags } func (w *wrappedAction) Metadata(ctx context.Context, request action.MetadataRequest, response *action.MetadataResponse) { // This method does not call down to the inner action. - response.TypeName = w.opts.typeName + response.TypeName = w.spec.TypeName } func (w *wrappedAction) Schema(ctx context.Context, request action.SchemaRequest, response *action.SchemaResponse) { - ctx, diags := w.opts.bootstrapContext(ctx, nil, w.meta) + ctx, diags := w.context(ctx, nil, w.meta) response.Diagnostics.Append(diags...) if response.Diagnostics.HasError() { return @@ -441,26 +437,26 @@ func (w *wrappedAction) Schema(ctx context.Context, request action.SchemaRequest f := func(ctx context.Context, request action.SchemaRequest, response *action.SchemaResponse) { w.inner.Schema(ctx, request, response) } - interceptedHandler(w.opts.interceptors.actionSchema(), f, actionSchemaHasError, w.meta)(ctx, request, response) + interceptedHandler(w.interceptors.actionSchema(), f, actionSchemaHasError, w.meta)(ctx, request, response) // Validate the action's model against the schema. if v, ok := w.inner.(framework.ActionValidateModel); ok { if schema, ok := response.Schema.(aschema.UnlinkedSchema); ok { response.Diagnostics.Append(v.ValidateModel(ctx, &schema)...) if response.Diagnostics.HasError() { - response.Diagnostics.AddError("action model validation error", w.opts.typeName) + response.Diagnostics.AddError("action model validation error", w.spec.TypeName) return } } else { - response.Diagnostics.AddError("unsupported action schema type", w.opts.typeName) + response.Diagnostics.AddError("unsupported action schema type", w.spec.TypeName) } } else { - response.Diagnostics.AddError("missing framework.ActionValidateModel", w.opts.typeName) + response.Diagnostics.AddError("missing framework.ActionValidateModel", w.spec.TypeName) } } func (w *wrappedAction) Invoke(ctx context.Context, request action.InvokeRequest, response *action.InvokeResponse) { - ctx, diags := w.opts.bootstrapContext(ctx, request.Config.GetAttribute, w.meta) + ctx, diags := w.context(ctx, request.Config.GetAttribute, w.meta) response.Diagnostics.Append(diags...) if response.Diagnostics.HasError() { return @@ -469,7 +465,7 @@ func (w *wrappedAction) Invoke(ctx context.Context, request action.InvokeRequest f := func(ctx context.Context, request action.InvokeRequest, response *action.InvokeResponse) { w.inner.Invoke(ctx, request, response) } - interceptedHandler(w.opts.interceptors.actionInvoke(), f, actionInvokeHasError, w.meta)(ctx, request, response) + interceptedHandler(w.interceptors.actionInvoke(), f, actionInvokeHasError, w.meta)(ctx, request, response) } func (w *wrappedAction) Configure(ctx context.Context, request action.ConfigureRequest, response *action.ConfigureResponse) { @@ -477,7 +473,7 @@ func (w *wrappedAction) Configure(ctx context.Context, request action.ConfigureR w.meta = v } - ctx, diags := w.opts.bootstrapContext(ctx, nil, w.meta) + ctx, diags := w.context(ctx, nil, w.meta) response.Diagnostics.Append(diags...) if response.Diagnostics.HasError() { return @@ -488,10 +484,10 @@ func (w *wrappedAction) Configure(ctx context.Context, request action.ConfigureR func (w *wrappedAction) ConfigValidators(ctx context.Context) []action.ConfigValidator { if v, ok := w.inner.(action.ActionWithConfigValidators); ok { - ctx, diags := w.opts.bootstrapContext(ctx, nil, w.meta) + ctx, diags := w.context(ctx, nil, w.meta) if diags.HasError() { tflog.Warn(ctx, "wrapping ConfigValidators", map[string]any{ - "action": w.opts.typeName, + "action": w.spec.TypeName, "bootstrapContext error": fwdiag.DiagnosticsString(diags), }) @@ -506,7 +502,7 @@ func (w *wrappedAction) ConfigValidators(ctx context.Context) []action.ConfigVal func (w *wrappedAction) ValidateConfig(ctx context.Context, request action.ValidateConfigRequest, response *action.ValidateConfigResponse) { if v, ok := w.inner.(action.ActionWithValidateConfig); ok { - ctx, diags := w.opts.bootstrapContext(ctx, request.Config.GetAttribute, w.meta) + ctx, diags := w.context(ctx, request.Config.GetAttribute, w.meta) response.Diagnostics.Append(diags...) if response.Diagnostics.HasError() { return @@ -516,14 +512,6 @@ func (w *wrappedAction) ValidateConfig(ctx context.Context, request action.Valid } } -type wrappedResourceOptions struct { - // bootstrapContext is run on all wrapped methods before any interceptors. - bootstrapContext contextFunc - interceptors interceptorInvocations - typeName string - identity inttypes.Identity -} - // wrappedResource represents an interceptor dispatcher for a Plugin Framework resource. type wrappedResource struct { inner resource.ResourceWithConfigure From 3b263bdcddf62692ce6b1d95ad84e4916efb0a58 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 16 Sep 2025 16:20:05 -0400 Subject: [PATCH 03/19] Update dependencies --- go.mod | 24 +++++++++++----------- go.sum | 64 +++++++++++++++++++++++++++++++--------------------------- 2 files changed, 46 insertions(+), 42 deletions(-) diff --git a/go.mod b/go.mod index 442e3b6be43c..271e43a4e0d2 100644 --- a/go.mod +++ b/go.mod @@ -274,7 +274,7 @@ require ( github.com/aws/smithy-go v1.23.0 github.com/beevik/etree v1.6.0 github.com/cedar-policy/cedar-go v1.2.6 - github.com/davecgh/go-spew v1.1.1 + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/dlclark/regexp2 v1.11.5 github.com/gertd/go-pluralize v0.2.1 github.com/goccy/go-yaml v1.18.0 @@ -290,15 +290,15 @@ require ( github.com/hashicorp/go-uuid v1.0.3 github.com/hashicorp/go-version v1.7.0 github.com/hashicorp/hcl/v2 v2.23.0 - github.com/hashicorp/terraform-json v0.26.0 - github.com/hashicorp/terraform-plugin-framework v1.16.0-alpha.1.0.20250728185851-cca5c5aac673 + github.com/hashicorp/terraform-json v0.27.1 + github.com/hashicorp/terraform-plugin-framework v1.16.0-beta.1.0.20250916190936-6af91641ed1e github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 github.com/hashicorp/terraform-plugin-framework-timeouts v0.5.0 github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0 github.com/hashicorp/terraform-plugin-framework-validators v0.18.0 - github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1 + github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250915194700-c3810b1245c0 github.com/hashicorp/terraform-plugin-log v0.9.0 - github.com/hashicorp/terraform-plugin-mux v0.20.1-0.20250717140231-ba534763859e + github.com/hashicorp/terraform-plugin-mux v0.21.0-alpha.1.0.20250916191442-c551d8bf1c4f github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0 github.com/hashicorp/terraform-plugin-testing v1.13.3 github.com/jaswdr/faker/v2 v2.8.0 @@ -345,21 +345,21 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect - github.com/hashicorp/go-plugin v1.6.3 // indirect + github.com/hashicorp/go-plugin v1.7.0 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/hc-install v0.9.2 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.23.0 // indirect - github.com/hashicorp/terraform-registry-address v0.3.0 // indirect + github.com/hashicorp/terraform-registry-address v0.4.0 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect - github.com/hashicorp/yamux v0.1.1 // indirect + github.com/hashicorp/yamux v0.1.2 // indirect github.com/huandu/xstrings v1.3.3 // indirect github.com/imdario/mergo v0.3.15 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/oklog/run v1.0.0 // indirect + github.com/oklog/run v1.1.0 // indirect github.com/posener/complete v1.2.3 // indirect github.com/spf13/cast v1.3.1 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect @@ -368,7 +368,7 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - github.com/zclconf/go-cty v1.16.3 // indirect + github.com/zclconf/go-cty v1.16.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.63.0 // indirect go.opentelemetry.io/otel v1.38.0 // indirect @@ -381,8 +381,8 @@ require ( golang.org/x/sys v0.36.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b // indirect - google.golang.org/grpc v1.74.2 // indirect - google.golang.org/protobuf v1.36.6 // indirect + google.golang.org/grpc v1.75.1 // indirect + google.golang.org/protobuf v1.36.9 // indirect ) replace github.com/hashicorp/terraform-plugin-log => github.com/gdavison/terraform-plugin-log v0.0.0-20230928191232-6c653d8ef8fb diff --git a/go.sum b/go.sum index de3d58194b79..a777bd6d8da9 100644 --- a/go.sum +++ b/go.sum @@ -573,8 +573,8 @@ github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= -github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= +github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= +github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= github.com/cedar-policy/cedar-go v1.2.6 h1:q6f1sRxhoBG7lnK/fH6oBG33ruf2yIpcfcPXNExANa0= github.com/cedar-policy/cedar-go v1.2.6/go.mod h1:h5+3CVW1oI5LXVskJG+my9TFCYI5yjh/+Ul3EJie6MI= github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= @@ -582,8 +582,9 @@ github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZ github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= @@ -649,8 +650,8 @@ github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.6.3 h1:xgHB+ZUSYeuJi96WtxEjzi23uh7YQpznjGh0U0UUrwg= -github.com/hashicorp/go-plugin v1.6.3/go.mod h1:MRobyh+Wc/nYy1V4KAXUiYfzxoYhs7V1mlH1Z7iY2h0= +github.com/hashicorp/go-plugin v1.7.0 h1:YghfQH/0QmPNc/AZMTFE3ac8fipZyZECHdDPshfk+mA= +github.com/hashicorp/go-plugin v1.7.0/go.mod h1:BExt6KEaIYx804z8k4gRzRLEvxKVb+kn0NMcihqOqb8= github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -666,10 +667,10 @@ github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.23.0 h1:MUiBM1s0CNlRFsCLJuM5wXZrzA3MnPYEsiXmzATMW/I= github.com/hashicorp/terraform-exec v0.23.0/go.mod h1:mA+qnx1R8eePycfwKkCRk3Wy65mwInvlpAeOwmA7vlY= -github.com/hashicorp/terraform-json v0.26.0 h1:+BnJavhRH+oyNWPnfzrfQwVWCZBFMvjdiH2Vi38Udz4= -github.com/hashicorp/terraform-json v0.26.0/go.mod h1:eyWCeC3nrZamyrKLFnrvwpc3LQPIJsx8hWHQ/nu2/v4= -github.com/hashicorp/terraform-plugin-framework v1.16.0-alpha.1.0.20250728185851-cca5c5aac673 h1:NNxkKysLXtHA0BkAMXUV+l/AZla1xyt2+PMiE6KpjM0= -github.com/hashicorp/terraform-plugin-framework v1.16.0-alpha.1.0.20250728185851-cca5c5aac673/go.mod h1:UrhvOHRFMGyYLn35rO3DtvcawLLt65BSQOcLLClRrcQ= +github.com/hashicorp/terraform-json v0.27.1 h1:zWhEracxJW6lcjt/JvximOYyc12pS/gaKSy/wzzE7nY= +github.com/hashicorp/terraform-json v0.27.1/go.mod h1:GzPLJ1PLdUG5xL6xn1OXWIjteQRT2CNT9o/6A9mi9hE= +github.com/hashicorp/terraform-plugin-framework v1.16.0-beta.1.0.20250916190936-6af91641ed1e h1:VkFgxpJMRY63DWPzvf6MxeFnOBsEGODgMG4xpkaE16k= +github.com/hashicorp/terraform-plugin-framework v1.16.0-beta.1.0.20250916190936-6af91641ed1e/go.mod h1:xpHIPcOnVhIlkrBIcKm5ho9zm4dfrQamVGHLpnF58Pw= github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 h1:SJXL5FfJJm17554Kpt9jFXngdM6fXbnUnZ6iT2IeiYA= github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0/go.mod h1:p0phD0IYhsu9bR4+6OetVvvH59I6LwjXGnTVEr8ox6E= github.com/hashicorp/terraform-plugin-framework-timeouts v0.5.0 h1:I/N0g/eLZ1ZkLZXUQ0oRSXa8YG/EF0CEuQP1wXdrzKw= @@ -678,20 +679,20 @@ github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0 h1:v3DapR8gsp3E github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0/go.mod h1:c3PnGE9pHBDfdEVG9t1S1C9ia5LW+gkFR0CygXlM8ak= github.com/hashicorp/terraform-plugin-framework-validators v0.18.0 h1:OQnlOt98ua//rCw+QhBbSqfW3QbwtVrcdWeQN5gI3Hw= github.com/hashicorp/terraform-plugin-framework-validators v0.18.0/go.mod h1:lZvZvagw5hsJwuY7mAY6KUz45/U6fiDR0CzQAwWD0CA= -github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1 h1:xeHlRQYev3iMXwX2W7+D1bSfLRBs9jojZXqE6hmNxMI= -github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1/go.mod h1:5pww/UULn9C2tItq6o5sbScEkJxBUt9X9kI4DkeRsIw= -github.com/hashicorp/terraform-plugin-mux v0.20.1-0.20250717140231-ba534763859e h1:U8n8/pVVKdUT4njKquj5T4ym5wkzmaqycQAUAW5zv4Q= -github.com/hashicorp/terraform-plugin-mux v0.20.1-0.20250717140231-ba534763859e/go.mod h1:Rq0WRHKOt3KA5c4w2METfod6Pxvbk0xb58GlZNNG+Uw= +github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250915194700-c3810b1245c0 h1:4dh8RXeFIH1v4mOgv70OvrbZWC5vDEWiEXIRFIA63S0= +github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250915194700-c3810b1245c0/go.mod h1:vYZbIyvxyy0FWSmDHChCqKvI40cFTDGSb3D8D70i9GM= +github.com/hashicorp/terraform-plugin-mux v0.21.0-alpha.1.0.20250916191442-c551d8bf1c4f h1:x/dzKatYbZCyAQIj7U1ugm5DAsqYFqQli9Tf/TXdkRk= +github.com/hashicorp/terraform-plugin-mux v0.21.0-alpha.1.0.20250916191442-c551d8bf1c4f/go.mod h1:RLrZoJfYzEMYpQcUvhD5gdNrOBqMf1QHpe+JHcfdcUY= github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0 h1:NFPMacTrY/IdcIcnUB+7hsore1ZaRWU9cnB6jFoBnIM= github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0/go.mod h1:QYmYnLfsosrxjCnGY1p9c7Zj6n9thnEE+7RObeYs3fA= github.com/hashicorp/terraform-plugin-testing v1.13.3 h1:QLi/khB8Z0a5L54AfPrHukFpnwsGL8cwwswj4RZduCo= github.com/hashicorp/terraform-plugin-testing v1.13.3/go.mod h1:WHQ9FDdiLoneey2/QHpGM/6SAYf4A7AZazVg7230pLE= -github.com/hashicorp/terraform-registry-address v0.3.0 h1:HMpK3nqaGFPS9VmgRXrJL/dzHNdheGVKk5k7VlFxzCo= -github.com/hashicorp/terraform-registry-address v0.3.0/go.mod h1:jRGCMiLaY9zii3GLC7hqpSnwhfnCN5yzvY0hh4iCGbM= +github.com/hashicorp/terraform-registry-address v0.4.0 h1:S1yCGomj30Sao4l5BMPjTGZmCNzuv7/GDTDX99E9gTk= +github.com/hashicorp/terraform-registry-address v0.4.0/go.mod h1:LRS1Ay0+mAiRkUyltGT+UHWkIqTFvigGn/LbMshfflE= 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/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= -github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= +github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= @@ -702,8 +703,8 @@ github.com/jaswdr/faker/v2 v2.8.0/go.mod h1:jZq+qzNQr8/P+5fHd9t3txe2GNPnthrTfoht github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94= +github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -741,14 +742,15 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4= github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/otp v1.5.0 h1:NMMR+WrmaqXU4EzdGJEE1aUUI0AMRzsp96fFFWNPwxs= @@ -788,8 +790,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1: github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zclconf/go-cty v1.16.3 h1:osr++gw2T61A8KVYHoQiFbFd1Lh3JOCXc/jFLJXKTxk= -github.com/zclconf/go-cty v1.16.3/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.16.4 h1:QGXaag7/7dCzb+odlGrgr+YmYZFaOCMW6DEpS+UD1eE= +github.com/zclconf/go-cty v1.16.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= @@ -802,8 +804,8 @@ go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgf go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= +go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= +go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -861,17 +863,19 @@ golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b h1:zPKJod4w6F1+nRGDI9ubnXYhU9NSWoFAijkHkUXeTK8= google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= +google.golang.org/grpc v1.75.1 h1:/ODCNEuf9VghjgO3rqLcfg8fiOP0nSluljWFlDxELLI= +google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw= +google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From b0c39cdfe008a45d37290c7cf3cdc04e1dac9760 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 16 Sep 2025 17:28:06 -0400 Subject: [PATCH 04/19] Update for action simplification --- internal/framework/action_with_model.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/framework/action_with_model.go b/internal/framework/action_with_model.go index 79145542ba79..2722dc3fe69f 100644 --- a/internal/framework/action_with_model.go +++ b/internal/framework/action_with_model.go @@ -19,7 +19,7 @@ type ActionWithModel[T any] struct { } // ValidateModel validates the action's model against a schema. -func (a *ActionWithModel[T]) ValidateModel(ctx context.Context, schema *schema.UnlinkedSchema) diag.Diagnostics { +func (a *ActionWithModel[T]) ValidateModel(ctx context.Context, schema *schema.Schema) diag.Diagnostics { var diags diag.Diagnostics state := tfsdk.State{ Raw: tftypes.NewValue(schema.Type().TerraformType(ctx), nil), @@ -32,5 +32,5 @@ func (a *ActionWithModel[T]) ValidateModel(ctx context.Context, schema *schema.U } type ActionValidateModel interface { - ValidateModel(ctx context.Context, schema *schema.UnlinkedSchema) diag.Diagnostics + ValidateModel(ctx context.Context, schema *schema.Schema) diag.Diagnostics } From 98aa073c08e9c213c367fd274acbdac5a83026e1 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 16 Sep 2025 17:29:37 -0400 Subject: [PATCH 05/19] Remove unnecessary check --- internal/generate/servicepackage/main.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/internal/generate/servicepackage/main.go b/internal/generate/servicepackage/main.go index 5cf445935f4c..8c7b965a3f7c 100644 --- a/internal/generate/servicepackage/main.go +++ b/internal/generate/servicepackage/main.go @@ -543,10 +543,6 @@ func (v *visitor) processFuncDecl(funcDecl *ast.FuncDecl) { v.actions[typeName] = d } - if d.HasV6_0SDKv2Fix { - v.errs = append(v.errs, fmt.Errorf("V60SDKv2Fix not supported for Actions: %s", fmt.Sprintf("%s.%s", v.packageName, v.functionName))) - } - case "EphemeralResource": if len(args.Positional) == 0 { v.errs = append(v.errs, fmt.Errorf("no type name: %s", fmt.Sprintf("%s.%s", v.packageName, v.functionName))) From dd6f08a5b9afc417b2bdc379b27f3982d7cbea4d Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 16 Sep 2025 17:30:45 -0400 Subject: [PATCH 06/19] Update provider for simplified actions --- internal/provider/framework/provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/provider/framework/provider.go b/internal/provider/framework/provider.go index 36ee5ed98cb2..2c70f3bd53da 100644 --- a/internal/provider/framework/provider.go +++ b/internal/provider/framework/provider.go @@ -563,7 +563,7 @@ func validateSchemaRegionForEphemeralResource(regionSpec unique.Handle[inttypes. func validateSchemaRegionForAction(regionSpec unique.Handle[inttypes.ServicePackageResourceRegion], schemaIface any) error { if !tfunique.IsHandleNil(regionSpec) && regionSpec.Value().IsOverrideEnabled { - if schema, ok := schemaIface.(aschema.UnlinkedSchema); ok { + if schema, ok := schemaIface.(aschema.Schema); ok { if _, ok := schema.Attributes[names.AttrRegion]; ok { return fmt.Errorf("configured for enhanced regions but defines `%s` attribute in schema", names.AttrRegion) } From f123fbd9bf97679fcf9004fe901ac58a7b537d20 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 16 Sep 2025 17:31:32 -0400 Subject: [PATCH 07/19] Update region injection for simplified actions --- internal/provider/framework/region.go | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/internal/provider/framework/region.go b/internal/provider/framework/region.go index 721db9cb890a..8243c4668777 100644 --- a/internal/provider/framework/region.go +++ b/internal/provider/framework/region.go @@ -372,17 +372,14 @@ type actionInjectRegionAttributeInterceptor struct{} func (a actionInjectRegionAttributeInterceptor) schema(ctx context.Context, opts interceptorOptions[action.SchemaRequest, action.SchemaResponse]) { switch response, when := opts.response, opts.when; when { case After: - if schema, ok := response.Schema.(aschema.UnlinkedSchema); ok { - if _, exists := schema.Attributes[names.AttrRegion]; !exists { - // Inject a top-level "region" attribute. - if schema.Attributes == nil { - schema.Attributes = make(map[string]aschema.Attribute) - } - schema.Attributes[names.AttrRegion] = aschema.StringAttribute{ - Optional: true, - Description: names.TopLevelRegionAttributeDescription, - } - response.Schema = schema + if _, exists := response.Schema.Attributes[names.AttrRegion]; !exists { + // Inject a top-level "region" attribute. + if response.Schema.Attributes == nil { + response.Schema.Attributes = make(map[string]aschema.Attribute) + } + response.Schema.Attributes[names.AttrRegion] = aschema.StringAttribute{ + Optional: true, + Description: names.TopLevelRegionAttributeDescription, } } } From 8d5084d6b13831df410194d07fba928fec608266 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 16 Sep 2025 17:32:21 -0400 Subject: [PATCH 08/19] Update wrapped actions for simplified actions --- internal/provider/framework/wrap.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/internal/provider/framework/wrap.go b/internal/provider/framework/wrap.go index e0904e21bead..acb0de29adcc 100644 --- a/internal/provider/framework/wrap.go +++ b/internal/provider/framework/wrap.go @@ -7,7 +7,6 @@ import ( "context" "github.com/hashicorp/terraform-plugin-framework/action" - aschema "github.com/hashicorp/terraform-plugin-framework/action/schema" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/ephemeral" @@ -441,14 +440,10 @@ func (w *wrappedAction) Schema(ctx context.Context, request action.SchemaRequest // Validate the action's model against the schema. if v, ok := w.inner.(framework.ActionValidateModel); ok { - if schema, ok := response.Schema.(aschema.UnlinkedSchema); ok { - response.Diagnostics.Append(v.ValidateModel(ctx, &schema)...) - if response.Diagnostics.HasError() { - response.Diagnostics.AddError("action model validation error", w.spec.TypeName) - return - } - } else { - response.Diagnostics.AddError("unsupported action schema type", w.spec.TypeName) + response.Diagnostics.Append(v.ValidateModel(ctx, &response.Schema)...) + if response.Diagnostics.HasError() { + response.Diagnostics.AddError("action model validation error", w.spec.TypeName) + return } } else { response.Diagnostics.AddError("missing framework.ActionValidateModel", w.spec.TypeName) From 3b274550f60224a305b7fa15f524c2b33655ee93 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 16 Sep 2025 21:06:26 -0400 Subject: [PATCH 09/19] Update tfproviderdocs --- .ci/tools/go.mod | 8 ++++---- .ci/tools/go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.ci/tools/go.mod b/.ci/tools/go.mod index b075bdd7bd94..8413b6482070 100644 --- a/.ci/tools/go.mod +++ b/.ci/tools/go.mod @@ -3,7 +3,7 @@ module github.com/hashicorp/terraform-provider-aws/tools go 1.24.6 require ( - github.com/YakDriver/tfproviderdocs v0.22.0 + github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917010138-53a933aef5c1 github.com/client9/misspell v0.3.4 github.com/golangci/golangci-lint/v2 v2.4.0 github.com/hashicorp/copywrite v0.22.0 @@ -190,7 +190,7 @@ require ( github.com/hashicorp/hcl/v2 v2.24.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.17.2 // indirect - github.com/hashicorp/terraform-json v0.25.0 // indirect + github.com/hashicorp/terraform-json v0.27.0 // indirect github.com/hashicorp/terraform-registry-address v0.2.4 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect @@ -349,9 +349,9 @@ require ( github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.3.0 // indirect github.com/ykadowak/zerologlint v0.1.5 // indirect - github.com/yuin/goldmark v1.7.12 // indirect + github.com/yuin/goldmark v1.7.13 // indirect github.com/yuin/goldmark-meta v1.1.0 // indirect - github.com/zclconf/go-cty v1.16.3 // indirect + github.com/zclconf/go-cty v1.16.4 // indirect github.com/zclconf/go-cty-yaml v1.1.0 // indirect github.com/zeebo/errs v1.4.0 // indirect gitlab.com/bosi/decorder v0.4.2 // indirect diff --git a/.ci/tools/go.sum b/.ci/tools/go.sum index 24f84517c275..193e7b73b199 100644 --- a/.ci/tools/go.sum +++ b/.ci/tools/go.sum @@ -700,8 +700,8 @@ github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/ github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= -github.com/YakDriver/tfproviderdocs v0.22.0 h1:JstF9U96wtdHV7Ujccv/Xrs7ejuwSKDFrc34bONsBOE= -github.com/YakDriver/tfproviderdocs v0.22.0/go.mod h1:M4DS8iRhrRuyWixpFA6QdpAwHHeom9ORcGVTctjROLw= +github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917010138-53a933aef5c1 h1:moyTxzqH04hNRjno6k4jOKovIVTrWdTJYPHF3YxCfUg= +github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917010138-53a933aef5c1/go.mod h1:SYOG1OK0JEAjkdSgYhMzDVRDuzF8qHAJewiNlrGba/Q= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= @@ -1366,8 +1366,8 @@ github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOn github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/terraform-exec v0.17.2 h1:EU7i3Fh7vDUI9nNRdMATCEfnm9axzTnad8zszYZ73Go= github.com/hashicorp/terraform-exec v0.17.2/go.mod h1:tuIbsL2l4MlwwIZx9HPM+LOV9vVyEfBYu2GsO1uH3/8= -github.com/hashicorp/terraform-json v0.25.0 h1:rmNqc/CIfcWawGiwXmRuiXJKEiJu1ntGoxseG1hLhoQ= -github.com/hashicorp/terraform-json v0.25.0/go.mod h1:sMKS8fiRDX4rVlR6EJUMudg1WcanxCMoWwTLkgZP/vc= +github.com/hashicorp/terraform-json v0.27.0 h1:REIlFzMMkIyTbhq69NC30bYiUYLv7iVhwM8ObnLo0p8= +github.com/hashicorp/terraform-json v0.27.0/go.mod h1:GzPLJ1PLdUG5xL6xn1OXWIjteQRT2CNT9o/6A9mi9hE= github.com/hashicorp/terraform-registry-address v0.2.4 h1:JXu/zHB2Ymg/TGVCRu10XqNa4Sh2bWcqCNyKWjnCPJA= github.com/hashicorp/terraform-registry-address v0.2.4/go.mod h1:tUNYTVyCtU4OIGXXMDp7WNcJ+0W1B4nmstVDgHMjfAU= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= @@ -1948,15 +1948,15 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark v1.7.12 h1:YwGP/rrea2/CnCtUHgjuolG/PnMxdQtPMO5PvaE2/nY= -github.com/yuin/goldmark v1.7.12/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= +github.com/yuin/goldmark v1.7.13 h1:GPddIs617DnBLFFVJFgpo1aBfe/4xcvMc3SB5t/D0pA= +github.com/yuin/goldmark v1.7.13/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc= github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0= github.com/zalando/go-keyring v0.2.3 h1:v9CUu9phlABObO4LPWycf+zwMG7nlbb3t/B5wa97yms= github.com/zalando/go-keyring v0.2.3/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk= github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.16.3 h1:osr++gw2T61A8KVYHoQiFbFd1Lh3JOCXc/jFLJXKTxk= -github.com/zclconf/go-cty v1.16.3/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.16.4 h1:QGXaag7/7dCzb+odlGrgr+YmYZFaOCMW6DEpS+UD1eE= +github.com/zclconf/go-cty v1.16.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= github.com/zclconf/go-cty-yaml v1.1.0 h1:nP+jp0qPHv2IhUVqmQSzjvqAWcObN0KBkUl2rWBdig0= From 8242fbed0e3bcd94ad464d5860bdd80d51d2738b Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 16 Sep 2025 22:00:30 -0400 Subject: [PATCH 10/19] Clean up makefile --- GNUmakefile | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 1a29d65342b7..62dcfed8f288 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -23,16 +23,45 @@ TEST_COUNT ?= 1 # - docs/makefile-cheat-sheet.md # - docs/continuous-integration.md +# VARIABLE REFERENCE: +# Service-specific variables (interchangeable for user convenience): +# PKG= - Service name (e.g., ses, lambda, s3) - traditional usage +# K= - Service name (e.g., ses, lambda, s3) - shorter alias +# +# Test-specific variables: +# T= - Test name pattern (e.g., TestAccLambda) - preferred +# TESTS= - Test name pattern - legacy alias for T +# +# Derived variables (set automatically based on above): +# PKG_NAME - Full package path (e.g., internal/service/ses) +# SVC_DIR - Service directory path (e.g., ./internal/service/ses) +# TEST - Test path pattern (e.g., ./internal/service/ses/...) +# +# Examples: +# make quick-fix PKG=ses # Fix code in SES service +# make quick-fix K=lambda # Same as above, but shorter (both work) +# make t T=TestAccRole PKG=iam # Run specific test in IAM service + +# Variable consolidation for backward compatibility and user convenience: +# - PKG and K both refer to service names (e.g., 'ses', 'lambda') +# - If one is provided, automatically set the other for consistency +# - This allows 'make quick-fix PKG=ses' and 'make quick-fix K=ses' to work identically ifneq ($(origin PKG), undefined) PKG_NAME = internal/service/$(PKG) SVC_DIR = ./internal/service/$(PKG) TEST = ./$(PKG_NAME)/... + # Auto-set K for compatibility + K = $(PKG) endif ifneq ($(origin K), undefined) PKG_NAME = internal/service/$(K) - SVC_DIR = ./internal/service/$(PKG) + SVC_DIR = ./internal/service/$(K) TEST = ./$(PKG_NAME)/... + # Auto-set PKG for compatibility (only if not already set) + ifeq ($(origin PKG), undefined) + PKG = $(K) + endif endif ifneq ($(origin TESTS), undefined) @@ -383,9 +412,11 @@ provider-lint: ## [CI] ProviderLint Checks / providerlint -XS002=false \ $(SVC_DIR)/... ./internal/provider/... -quick-fix: fmt testacc-lint-fix fix-imports modern-fix semgrep-fix ## Some quick fixes +quick-fix-heading: ## Just a heading for quick-fix @echo "make: Quick fixes..." +quick-fix: quick-fix-heading fmt testacc-lint-fix fix-imports modern-fix semgrep-fix website-terrafmt-fix ## Some quick fixes + provider-markdown-lint: ## [CI] Provider Check / markdown-lint @echo "make: Provider Check / markdown-lint..." @docker run --rm \ @@ -838,6 +869,15 @@ website-terrafmt: ## [CI] Website Checks / terrafmt @echo "make: Website Checks / terrafmt..." @terrafmt diff ./website --check --pattern '*.markdown' +website-terrafmt-fix: ## [CI] Fix Website / terrafmt + @echo "make: Fix Website / terrafmt..." + @echo "make: terrafmt fix website/docs root files..." + @find ./website/docs -maxdepth 1 -type f -name '*.markdown' -exec terrafmt fmt {} \; + @for dir in $$(find ./website/docs -maxdepth 1 -type d ! -name docs ! -name cdktf | sort); do \ + echo "make: Fixing $$dir with terrafmt..."; \ + terrafmt fmt $$dir --pattern '*.markdown'; \ + done + website-tflint: tflint-init ## [CI] Website Checks / tflint @echo "make: Website Checks / tflint..." @exit_code=0 ; \ @@ -941,6 +981,7 @@ yamllint: ## [CI] YAML Linting / yamllint provider-lint \ provider-markdown-lint \ quick-fix \ + quick-fix-heading \ sane \ sanity \ semgrep \ @@ -989,5 +1030,6 @@ yamllint: ## [CI] YAML Linting / yamllint website-markdown-lint \ website-misspell \ website-terrafmt \ + website-terrafmt-fix \ website-tflint \ yamllint From 0d877930a4f045773a48382c8aef5d8b64366a9e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 16 Sep 2025 23:43:58 -0400 Subject: [PATCH 11/19] Update tfproviderdocs --- .ci/tools/go.mod | 2 +- .ci/tools/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/tools/go.mod b/.ci/tools/go.mod index 8413b6482070..ce442100ba45 100644 --- a/.ci/tools/go.mod +++ b/.ci/tools/go.mod @@ -3,7 +3,7 @@ module github.com/hashicorp/terraform-provider-aws/tools go 1.24.6 require ( - github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917010138-53a933aef5c1 + github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917030306-80db8b673343 github.com/client9/misspell v0.3.4 github.com/golangci/golangci-lint/v2 v2.4.0 github.com/hashicorp/copywrite v0.22.0 diff --git a/.ci/tools/go.sum b/.ci/tools/go.sum index 193e7b73b199..9e8c9150c8cc 100644 --- a/.ci/tools/go.sum +++ b/.ci/tools/go.sum @@ -702,6 +702,8 @@ github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXx github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917010138-53a933aef5c1 h1:moyTxzqH04hNRjno6k4jOKovIVTrWdTJYPHF3YxCfUg= github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917010138-53a933aef5c1/go.mod h1:SYOG1OK0JEAjkdSgYhMzDVRDuzF8qHAJewiNlrGba/Q= +github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917030306-80db8b673343 h1:zHO07rRViz2GVCQgnsF9qjDC1SBZDKT2WlanOOiTwNI= +github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917030306-80db8b673343/go.mod h1:SYOG1OK0JEAjkdSgYhMzDVRDuzF8qHAJewiNlrGba/Q= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= From 7f8310636a592ac19bf1e2a73846d7661eddc372 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 16 Sep 2025 23:44:16 -0400 Subject: [PATCH 12/19] Update tfproviderdocs --- .ci/tools/go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/.ci/tools/go.sum b/.ci/tools/go.sum index 9e8c9150c8cc..3f9399b70da1 100644 --- a/.ci/tools/go.sum +++ b/.ci/tools/go.sum @@ -700,8 +700,6 @@ github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/ github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= -github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917010138-53a933aef5c1 h1:moyTxzqH04hNRjno6k4jOKovIVTrWdTJYPHF3YxCfUg= -github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917010138-53a933aef5c1/go.mod h1:SYOG1OK0JEAjkdSgYhMzDVRDuzF8qHAJewiNlrGba/Q= github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917030306-80db8b673343 h1:zHO07rRViz2GVCQgnsF9qjDC1SBZDKT2WlanOOiTwNI= github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917030306-80db8b673343/go.mod h1:SYOG1OK0JEAjkdSgYhMzDVRDuzF8qHAJewiNlrGba/Q= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= From 610eb235b920610a0674d95d04cbf32bfa41df23 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 00:12:15 -0400 Subject: [PATCH 13/19] Fixes req'd by new tfproviderdocs --- website/docs/d/ce_cost_category.html.markdown | 2 +- website/docs/d/elasticache_subnet_group.html.markdown | 2 +- website/docs/d/media_convert_queue.html.markdown | 2 +- website/docs/d/memorydb_acl.html.markdown | 2 +- website/docs/d/memorydb_cluster.html.markdown | 2 +- website/docs/d/memorydb_parameter_group.html.markdown | 2 +- website/docs/d/memorydb_snapshot.html.markdown | 2 +- website/docs/d/memorydb_subnet_group.html.markdown | 2 +- website/docs/d/memorydb_user.html.markdown | 2 +- .../d/securityhub_standards_control_associations.html.markdown | 2 +- website/docs/d/workspaces_workspace.html.markdown | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/website/docs/d/ce_cost_category.html.markdown b/website/docs/d/ce_cost_category.html.markdown index 3d97fb2bbffe..d613a8f5f5af 100644 --- a/website/docs/d/ce_cost_category.html.markdown +++ b/website/docs/d/ce_cost_category.html.markdown @@ -6,7 +6,7 @@ description: |- Provides details about a specific CostExplorer Cost Category Definition --- -# Resource: aws_ce_cost_category +# Data Source: aws_ce_cost_category Provides details about a specific CostExplorer Cost Category. diff --git a/website/docs/d/elasticache_subnet_group.html.markdown b/website/docs/d/elasticache_subnet_group.html.markdown index a89f273ebef0..d15f392bede7 100644 --- a/website/docs/d/elasticache_subnet_group.html.markdown +++ b/website/docs/d/elasticache_subnet_group.html.markdown @@ -6,7 +6,7 @@ description: |- Provides information about a ElastiCache Subnet Group. --- -# Resource: aws_elasticache_subnet_group +# Data Source: aws_elasticache_subnet_group Provides information about a ElastiCache Subnet Group. diff --git a/website/docs/d/media_convert_queue.html.markdown b/website/docs/d/media_convert_queue.html.markdown index 7be378a8b627..ea852617f32d 100644 --- a/website/docs/d/media_convert_queue.html.markdown +++ b/website/docs/d/media_convert_queue.html.markdown @@ -6,7 +6,7 @@ description: |- Retrieve information about a AWS Elemental MediaConvert Queue. --- -# Resource: aws_media_convert_queue +# Data Source: aws_media_convert_queue Retrieve information about a AWS Elemental MediaConvert Queue. diff --git a/website/docs/d/memorydb_acl.html.markdown b/website/docs/d/memorydb_acl.html.markdown index c5f25e576e0e..6ff3a37bf226 100644 --- a/website/docs/d/memorydb_acl.html.markdown +++ b/website/docs/d/memorydb_acl.html.markdown @@ -6,7 +6,7 @@ description: |- Provides information about a MemoryDB ACL. --- -# Resource: aws_memorydb_acl +# Data Source: aws_memorydb_acl Provides information about a MemoryDB ACL. diff --git a/website/docs/d/memorydb_cluster.html.markdown b/website/docs/d/memorydb_cluster.html.markdown index 6072bad7ff5e..ed8625225db2 100644 --- a/website/docs/d/memorydb_cluster.html.markdown +++ b/website/docs/d/memorydb_cluster.html.markdown @@ -6,7 +6,7 @@ description: |- Provides information about a MemoryDB Cluster. --- -# Resource: aws_memorydb_cluster +# Data Source: aws_memorydb_cluster Provides information about a MemoryDB Cluster. diff --git a/website/docs/d/memorydb_parameter_group.html.markdown b/website/docs/d/memorydb_parameter_group.html.markdown index 4baf30a72579..8bfa4cef86a1 100644 --- a/website/docs/d/memorydb_parameter_group.html.markdown +++ b/website/docs/d/memorydb_parameter_group.html.markdown @@ -6,7 +6,7 @@ description: |- Provides information about a MemoryDB Parameter Group. --- -# Resource: aws_memorydb_parameter_group +# Data Source: aws_memorydb_parameter_group Provides information about a MemoryDB Parameter Group. diff --git a/website/docs/d/memorydb_snapshot.html.markdown b/website/docs/d/memorydb_snapshot.html.markdown index cd7bb1163722..aef058242a8c 100644 --- a/website/docs/d/memorydb_snapshot.html.markdown +++ b/website/docs/d/memorydb_snapshot.html.markdown @@ -6,7 +6,7 @@ description: |- Provides information about a MemoryDB Snapshot. --- -# Resource: aws_memorydb_snapshot +# Data Source: aws_memorydb_snapshot Provides information about a MemoryDB Snapshot. diff --git a/website/docs/d/memorydb_subnet_group.html.markdown b/website/docs/d/memorydb_subnet_group.html.markdown index d743f1fb9a9e..84c4971e3e20 100644 --- a/website/docs/d/memorydb_subnet_group.html.markdown +++ b/website/docs/d/memorydb_subnet_group.html.markdown @@ -6,7 +6,7 @@ description: |- Provides information about a MemoryDB Subnet Group. --- -# Resource: aws_memorydb_subnet_group +# Data Source: aws_memorydb_subnet_group Provides information about a MemoryDB Subnet Group. diff --git a/website/docs/d/memorydb_user.html.markdown b/website/docs/d/memorydb_user.html.markdown index 85418ec2a082..63f6ca1406e1 100644 --- a/website/docs/d/memorydb_user.html.markdown +++ b/website/docs/d/memorydb_user.html.markdown @@ -6,7 +6,7 @@ description: |- Provides information about a MemoryDB User. --- -# Resource: aws_memorydb_user +# Data Source: aws_memorydb_user Provides information about a MemoryDB User. diff --git a/website/docs/d/securityhub_standards_control_associations.html.markdown b/website/docs/d/securityhub_standards_control_associations.html.markdown index 7439e1232168..d7b6baf90562 100644 --- a/website/docs/d/securityhub_standards_control_associations.html.markdown +++ b/website/docs/d/securityhub_standards_control_associations.html.markdown @@ -6,7 +6,7 @@ description: |- Terraform data source for managing an AWS Security Hub Standards Control Associations. --- -# Resource: aws_securityhub_standards_control_associations +# Data Source: aws_securityhub_standards_control_associations Terraform data source for managing an AWS Security Hub Standards Control Associations. diff --git a/website/docs/d/workspaces_workspace.html.markdown b/website/docs/d/workspaces_workspace.html.markdown index 0677b374d607..3d66b3105fe3 100644 --- a/website/docs/d/workspaces_workspace.html.markdown +++ b/website/docs/d/workspaces_workspace.html.markdown @@ -6,7 +6,7 @@ description: |- Get information about a WorkSpace in AWS Workspaces Service. --- -# Resource: aws_workspaces_workspace +# Data Source: aws_workspaces_workspace Use this data source to get information about a workspace in [AWS Workspaces](https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces.html) Service. From 11bdcbfa2f1ad39405a50506e4d4bd9784daf015 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 01:09:59 -0400 Subject: [PATCH 14/19] Update tfproviders --- .ci/tools/go.mod | 2 +- .ci/tools/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/tools/go.mod b/.ci/tools/go.mod index ce442100ba45..fe3a93de59d4 100644 --- a/.ci/tools/go.mod +++ b/.ci/tools/go.mod @@ -3,7 +3,7 @@ module github.com/hashicorp/terraform-provider-aws/tools go 1.24.6 require ( - github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917030306-80db8b673343 + github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917035923-5f2822711faa github.com/client9/misspell v0.3.4 github.com/golangci/golangci-lint/v2 v2.4.0 github.com/hashicorp/copywrite v0.22.0 diff --git a/.ci/tools/go.sum b/.ci/tools/go.sum index 3f9399b70da1..77f0bf25179f 100644 --- a/.ci/tools/go.sum +++ b/.ci/tools/go.sum @@ -700,8 +700,8 @@ github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/ github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= -github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917030306-80db8b673343 h1:zHO07rRViz2GVCQgnsF9qjDC1SBZDKT2WlanOOiTwNI= -github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917030306-80db8b673343/go.mod h1:SYOG1OK0JEAjkdSgYhMzDVRDuzF8qHAJewiNlrGba/Q= +github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917035923-5f2822711faa h1:OAC1w6z9FhMYWEl1gf0CLhHHCmEx5GpZu6b/05XdKkw= +github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917035923-5f2822711faa/go.mod h1:SYOG1OK0JEAjkdSgYhMzDVRDuzF8qHAJewiNlrGba/Q= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= From 7d4ba49e4f2d740219c4b8d4e6fc88af30b7c8a3 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 01:30:20 -0400 Subject: [PATCH 15/19] Update tfproviderdocs to release --- .ci/tools/go.mod | 2 +- .ci/tools/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/tools/go.mod b/.ci/tools/go.mod index fe3a93de59d4..72c5b585fb5c 100644 --- a/.ci/tools/go.mod +++ b/.ci/tools/go.mod @@ -3,7 +3,7 @@ module github.com/hashicorp/terraform-provider-aws/tools go 1.24.6 require ( - github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917035923-5f2822711faa + github.com/YakDriver/tfproviderdocs v0.23.0 github.com/client9/misspell v0.3.4 github.com/golangci/golangci-lint/v2 v2.4.0 github.com/hashicorp/copywrite v0.22.0 diff --git a/.ci/tools/go.sum b/.ci/tools/go.sum index 77f0bf25179f..7df8e6cd1f90 100644 --- a/.ci/tools/go.sum +++ b/.ci/tools/go.sum @@ -700,8 +700,8 @@ github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/ github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= -github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917035923-5f2822711faa h1:OAC1w6z9FhMYWEl1gf0CLhHHCmEx5GpZu6b/05XdKkw= -github.com/YakDriver/tfproviderdocs v0.22.1-0.20250917035923-5f2822711faa/go.mod h1:SYOG1OK0JEAjkdSgYhMzDVRDuzF8qHAJewiNlrGba/Q= +github.com/YakDriver/tfproviderdocs v0.23.0 h1:q7u8eYf1A23+GV2pgLNM67SQy200A6Icva1pB7ZQQuA= +github.com/YakDriver/tfproviderdocs v0.23.0/go.mod h1:n0ZCrOfASYMh/OmwI05/+mb74uph4GQGW+B/+UzFG2s= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= From ce848dc67d742671350a61be161f4e72e01f4fc6 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 02:02:38 -0400 Subject: [PATCH 16/19] Update tfproviderdocs to main --- .ci/tools/go.mod | 2 +- .ci/tools/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/tools/go.mod b/.ci/tools/go.mod index 72c5b585fb5c..0493a6b31b69 100644 --- a/.ci/tools/go.mod +++ b/.ci/tools/go.mod @@ -3,7 +3,7 @@ module github.com/hashicorp/terraform-provider-aws/tools go 1.24.6 require ( - github.com/YakDriver/tfproviderdocs v0.23.0 + github.com/YakDriver/tfproviderdocs v0.23.1-0.20250917060104-fa9e40e1a0ae github.com/client9/misspell v0.3.4 github.com/golangci/golangci-lint/v2 v2.4.0 github.com/hashicorp/copywrite v0.22.0 diff --git a/.ci/tools/go.sum b/.ci/tools/go.sum index 7df8e6cd1f90..fdb697b8937f 100644 --- a/.ci/tools/go.sum +++ b/.ci/tools/go.sum @@ -700,8 +700,8 @@ github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/ github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= -github.com/YakDriver/tfproviderdocs v0.23.0 h1:q7u8eYf1A23+GV2pgLNM67SQy200A6Icva1pB7ZQQuA= -github.com/YakDriver/tfproviderdocs v0.23.0/go.mod h1:n0ZCrOfASYMh/OmwI05/+mb74uph4GQGW+B/+UzFG2s= +github.com/YakDriver/tfproviderdocs v0.23.1-0.20250917060104-fa9e40e1a0ae h1:hcA72xt01UWyeL6vtKYJS0a71RCB9HUJCMMH40lGRu8= +github.com/YakDriver/tfproviderdocs v0.23.1-0.20250917060104-fa9e40e1a0ae/go.mod h1:n0ZCrOfASYMh/OmwI05/+mb74uph4GQGW+B/+UzFG2s= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= From 6af186ddeaf114dd4db9b8b7db0b5beabd0f2792 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 02:21:33 -0400 Subject: [PATCH 17/19] Bad import section --- .../d/iam_server_certificate.html.markdown | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/website/docs/d/iam_server_certificate.html.markdown b/website/docs/d/iam_server_certificate.html.markdown index 589a4411e6d9..c18c07f929dc 100644 --- a/website/docs/d/iam_server_certificate.html.markdown +++ b/website/docs/d/iam_server_certificate.html.markdown @@ -51,22 +51,3 @@ This data source exports the following attributes in addition to the arguments a * `upload_date` is the date when the server certificate was uploaded * `certificate_body` is the public key certificate (PEM-encoded). This is useful when [configuring back-end instance authentication](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-create-https-ssl-load-balancer.html) policy for load balancer * `certificate_chain` is the public key certificate chain (PEM-encoded) if exists, empty otherwise - -## Import - -In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import an IAM server certificate using `name`. For example: - -```terraform -import { - to = aws_iam_server_certificate.example - id = "example" -} -``` - -Using `terraform import`, import an IAM server certificate using `name`. For example: - -```console -% terraform import aws_iam_server_certificate.example example -``` - -Import will read in the certificate body, certificate chain (if it exists), ID, name, path, and ARN. It will not retrieve the private key which is not available through the AWS API. From 177847305a86739cc961c7d26555add9600960a3 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 02:27:48 -0400 Subject: [PATCH 18/19] Update tfproviderdocs to release --- .ci/tools/go.mod | 2 +- .ci/tools/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/tools/go.mod b/.ci/tools/go.mod index 0493a6b31b69..e090e6e1847c 100644 --- a/.ci/tools/go.mod +++ b/.ci/tools/go.mod @@ -3,7 +3,7 @@ module github.com/hashicorp/terraform-provider-aws/tools go 1.24.6 require ( - github.com/YakDriver/tfproviderdocs v0.23.1-0.20250917060104-fa9e40e1a0ae + github.com/YakDriver/tfproviderdocs v0.23.1 github.com/client9/misspell v0.3.4 github.com/golangci/golangci-lint/v2 v2.4.0 github.com/hashicorp/copywrite v0.22.0 diff --git a/.ci/tools/go.sum b/.ci/tools/go.sum index fdb697b8937f..99690185e0e2 100644 --- a/.ci/tools/go.sum +++ b/.ci/tools/go.sum @@ -700,8 +700,8 @@ github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/ github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= -github.com/YakDriver/tfproviderdocs v0.23.1-0.20250917060104-fa9e40e1a0ae h1:hcA72xt01UWyeL6vtKYJS0a71RCB9HUJCMMH40lGRu8= -github.com/YakDriver/tfproviderdocs v0.23.1-0.20250917060104-fa9e40e1a0ae/go.mod h1:n0ZCrOfASYMh/OmwI05/+mb74uph4GQGW+B/+UzFG2s= +github.com/YakDriver/tfproviderdocs v0.23.1 h1:WlwEmm0A/ePEHpXyxUq2xf56+LUFmJtIWBKq7DvFjI0= +github.com/YakDriver/tfproviderdocs v0.23.1/go.mod h1:n0ZCrOfASYMh/OmwI05/+mb74uph4GQGW+B/+UzFG2s= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= From b5b8ea1f12a82b3a996a5fc3d96f6424e46c1e83 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 09:42:04 -0400 Subject: [PATCH 19/19] Update actionesque dependencies --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 271e43a4e0d2..026dbb81080e 100644 --- a/go.mod +++ b/go.mod @@ -290,15 +290,15 @@ require ( github.com/hashicorp/go-uuid v1.0.3 github.com/hashicorp/go-version v1.7.0 github.com/hashicorp/hcl/v2 v2.23.0 - github.com/hashicorp/terraform-json v0.27.1 - github.com/hashicorp/terraform-plugin-framework v1.16.0-beta.1.0.20250916190936-6af91641ed1e + github.com/hashicorp/terraform-json v0.27.2 + github.com/hashicorp/terraform-plugin-framework v1.16.0 github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 github.com/hashicorp/terraform-plugin-framework-timeouts v0.5.0 github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0 github.com/hashicorp/terraform-plugin-framework-validators v0.18.0 - github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250915194700-c3810b1245c0 + github.com/hashicorp/terraform-plugin-go v0.29.0 github.com/hashicorp/terraform-plugin-log v0.9.0 - github.com/hashicorp/terraform-plugin-mux v0.21.0-alpha.1.0.20250916191442-c551d8bf1c4f + github.com/hashicorp/terraform-plugin-mux v0.21.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0 github.com/hashicorp/terraform-plugin-testing v1.13.3 github.com/jaswdr/faker/v2 v2.8.0 diff --git a/go.sum b/go.sum index a777bd6d8da9..45428faddc78 100644 --- a/go.sum +++ b/go.sum @@ -667,10 +667,10 @@ github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.23.0 h1:MUiBM1s0CNlRFsCLJuM5wXZrzA3MnPYEsiXmzATMW/I= github.com/hashicorp/terraform-exec v0.23.0/go.mod h1:mA+qnx1R8eePycfwKkCRk3Wy65mwInvlpAeOwmA7vlY= -github.com/hashicorp/terraform-json v0.27.1 h1:zWhEracxJW6lcjt/JvximOYyc12pS/gaKSy/wzzE7nY= -github.com/hashicorp/terraform-json v0.27.1/go.mod h1:GzPLJ1PLdUG5xL6xn1OXWIjteQRT2CNT9o/6A9mi9hE= -github.com/hashicorp/terraform-plugin-framework v1.16.0-beta.1.0.20250916190936-6af91641ed1e h1:VkFgxpJMRY63DWPzvf6MxeFnOBsEGODgMG4xpkaE16k= -github.com/hashicorp/terraform-plugin-framework v1.16.0-beta.1.0.20250916190936-6af91641ed1e/go.mod h1:xpHIPcOnVhIlkrBIcKm5ho9zm4dfrQamVGHLpnF58Pw= +github.com/hashicorp/terraform-json v0.27.2 h1:BwGuzM6iUPqf9JYM/Z4AF1OJ5VVJEEzoKST/tRDBJKU= +github.com/hashicorp/terraform-json v0.27.2/go.mod h1:GzPLJ1PLdUG5xL6xn1OXWIjteQRT2CNT9o/6A9mi9hE= +github.com/hashicorp/terraform-plugin-framework v1.16.0 h1:tP0f+yJg0Z672e7levixDe5EpWwrTrNryPM9kDMYIpE= +github.com/hashicorp/terraform-plugin-framework v1.16.0/go.mod h1:0xFOxLy5lRzDTayc4dzK/FakIgBhNf/lC4499R9cV4Y= github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 h1:SJXL5FfJJm17554Kpt9jFXngdM6fXbnUnZ6iT2IeiYA= github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0/go.mod h1:p0phD0IYhsu9bR4+6OetVvvH59I6LwjXGnTVEr8ox6E= github.com/hashicorp/terraform-plugin-framework-timeouts v0.5.0 h1:I/N0g/eLZ1ZkLZXUQ0oRSXa8YG/EF0CEuQP1wXdrzKw= @@ -679,10 +679,10 @@ github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0 h1:v3DapR8gsp3E github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0/go.mod h1:c3PnGE9pHBDfdEVG9t1S1C9ia5LW+gkFR0CygXlM8ak= github.com/hashicorp/terraform-plugin-framework-validators v0.18.0 h1:OQnlOt98ua//rCw+QhBbSqfW3QbwtVrcdWeQN5gI3Hw= github.com/hashicorp/terraform-plugin-framework-validators v0.18.0/go.mod h1:lZvZvagw5hsJwuY7mAY6KUz45/U6fiDR0CzQAwWD0CA= -github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250915194700-c3810b1245c0 h1:4dh8RXeFIH1v4mOgv70OvrbZWC5vDEWiEXIRFIA63S0= -github.com/hashicorp/terraform-plugin-go v0.29.0-beta.1.0.20250915194700-c3810b1245c0/go.mod h1:vYZbIyvxyy0FWSmDHChCqKvI40cFTDGSb3D8D70i9GM= -github.com/hashicorp/terraform-plugin-mux v0.21.0-alpha.1.0.20250916191442-c551d8bf1c4f h1:x/dzKatYbZCyAQIj7U1ugm5DAsqYFqQli9Tf/TXdkRk= -github.com/hashicorp/terraform-plugin-mux v0.21.0-alpha.1.0.20250916191442-c551d8bf1c4f/go.mod h1:RLrZoJfYzEMYpQcUvhD5gdNrOBqMf1QHpe+JHcfdcUY= +github.com/hashicorp/terraform-plugin-go v0.29.0 h1:1nXKl/nSpaYIUBU1IG/EsDOX0vv+9JxAltQyDMpq5mU= +github.com/hashicorp/terraform-plugin-go v0.29.0/go.mod h1:vYZbIyvxyy0FWSmDHChCqKvI40cFTDGSb3D8D70i9GM= +github.com/hashicorp/terraform-plugin-mux v0.21.0 h1:QsEYnzSD2c3zT8zUrUGqaFGhV/Z8zRUlU7FY3ZPJFfw= +github.com/hashicorp/terraform-plugin-mux v0.21.0/go.mod h1:Qpt8+6AD7NmL0DS7ASkN0EXpDQ2J/FnnIgeUr1tzr5A= github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0 h1:NFPMacTrY/IdcIcnUB+7hsore1ZaRWU9cnB6jFoBnIM= github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0/go.mod h1:QYmYnLfsosrxjCnGY1p9c7Zj6n9thnEE+7RObeYs3fA= github.com/hashicorp/terraform-plugin-testing v1.13.3 h1:QLi/khB8Z0a5L54AfPrHukFpnwsGL8cwwswj4RZduCo=