From 95705ee734b9a9617ef7ad41bbec07ad4644278b Mon Sep 17 00:00:00 2001 From: Alican Sungur Date: Tue, 15 Jul 2025 21:16:21 +0100 Subject: [PATCH 01/57] don't return if user is not member --- internal/service/elasticache/user_group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/elasticache/user_group.go b/internal/service/elasticache/user_group.go index c55bd6b8b993..a5413c1df313 100644 --- a/internal/service/elasticache/user_group.go +++ b/internal/service/elasticache/user_group.go @@ -173,7 +173,7 @@ func resourceUserGroupUpdate(ctx context.Context, d *schema.ResourceData, meta a _, err := conn.ModifyUserGroup(ctx, input) - if err != nil { + if err != nil && !errs.IsAErrorMessageContains[*awstypes.InvalidParameterValueException](err, "is not a member of user group") { return sdkdiag.AppendErrorf(diags, "updating ElastiCache User Group (%q): %s", d.Id(), err) } From e7fc8e82754e47620d71606c13e7506461f18278 Mon Sep 17 00:00:00 2001 From: Alican Sungur Date: Tue, 22 Jul 2025 16:57:29 +0100 Subject: [PATCH 02/57] add changelog --- .changelog/43383.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/43383.txt diff --git a/.changelog/43383.txt b/.changelog/43383.txt new file mode 100644 index 000000000000..ef077fb3ab93 --- /dev/null +++ b/.changelog/43383.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_elasticache_user_group: Fix `User is not a member of user group` errors updates where the user gets deleted before the attempt. +``` From 3b6bc637934caaa6c5017139dd7e47ea47615e6a Mon Sep 17 00:00:00 2001 From: Alican Sungur Date: Wed, 23 Jul 2025 21:02:07 +0100 Subject: [PATCH 03/57] add rotation test to repliace the error Revert "add rotation test to repliace the error" This reverts commit 392c135fcea75b3f991a851cd8c4a0395f55a0e9. Reapply "add rotation test to repliace the error" This reverts commit c9d3032179cd48d3bc880e2e0e47e4c9a1dc153a. --- .../service/elasticache/user_group_test.go | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/internal/service/elasticache/user_group_test.go b/internal/service/elasticache/user_group_test.go index ee676f46ddc3..12b7d5fddb3b 100644 --- a/internal/service/elasticache/user_group_test.go +++ b/internal/service/elasticache/user_group_test.go @@ -59,6 +59,24 @@ func TestAccElastiCacheUserGroup_update(t *testing.T) { ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, CheckDestroy: testAccCheckUserGroupDestroy(ctx, t), Steps: []resource.TestStep{ + { + Config: testAccUserGroupConfig_basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckUserGroupExists(ctx, t, resourceName, &userGroup), + resource.TestCheckResourceAttr(resourceName, "user_ids.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user_group_id", rName), + resource.TestCheckResourceAttr(resourceName, names.AttrEngine, "redis"), + ), + }, + { + Config: testAccUserGroupConfig_rotate(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckUserGroupExists(ctx, t, resourceName, &userGroup), + resource.TestCheckResourceAttr(resourceName, "user_ids.#", "2"), + resource.TestCheckResourceAttr(resourceName, "user_group_id", rName), + resource.TestCheckResourceAttr(resourceName, names.AttrEngine, "redis"), + ), + }, { Config: testAccUserGroupConfig_basic(rName), Check: resource.ComposeTestCheckFunc( @@ -246,6 +264,32 @@ resource "aws_elasticache_user_group" "test" { `, rName)) } +func testAccUserGroupConfig_rotate(rName string) string { + return acctest.ConfigCompose(acctest.ConfigAvailableAZsNoOptIn(), fmt.Sprintf(` +resource "aws_elasticache_user" "test1" { + user_id = "%[1]s-1" + user_name = "default" + access_string = "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember" + engine = "REDIS" + passwords = ["password123456789"] +} + +resource "aws_elasticache_user" "test2" { + user_id = "%[1]s-3" + user_name = "username1" + access_string = "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember" + engine = "REDIS" + passwords = ["password123456789"] +} + +resource "aws_elasticache_user_group" "test" { + user_group_id = %[1]q + engine = "REDIS" + user_ids = [aws_elasticache_user.test1.user_id, aws_elasticache_user.test2.user_id] +} +`, rName)) +} + func testAccUserGroupConfig_multiple(rName string) string { return acctest.ConfigCompose(acctest.ConfigAvailableAZsNoOptIn(), fmt.Sprintf(` resource "aws_elasticache_user" "test1" { From 52a2902d6114e3d9182b2afccc73cbb0b19d02af Mon Sep 17 00:00:00 2001 From: Asim Date: Thu, 7 Aug 2025 18:33:22 +0100 Subject: [PATCH 04/57] odb nwk peering resource, data source and acc test cases --- examples/odb/odb_network_peering.tf | 10 + .../service/odb/network_peering_connection.go | 449 ++++++++++++++++++ .../network_peering_connection_data_source.go | 140 ++++++ ...ork_peering_connection_data_source_test.go | 212 +++++++++ .../odb/network_peering_connection_test.go | 312 ++++++++++++ internal/service/odb/tags_gen.go | 128 +++++ names/data/names_data.hcl | 29 ++ 7 files changed, 1280 insertions(+) create mode 100644 examples/odb/odb_network_peering.tf create mode 100644 internal/service/odb/network_peering_connection.go create mode 100644 internal/service/odb/network_peering_connection_data_source.go create mode 100644 internal/service/odb/network_peering_connection_data_source_test.go create mode 100644 internal/service/odb/network_peering_connection_test.go create mode 100644 internal/service/odb/tags_gen.go diff --git a/examples/odb/odb_network_peering.tf b/examples/odb/odb_network_peering.tf new file mode 100644 index 000000000000..8744170d0f0d --- /dev/null +++ b/examples/odb/odb_network_peering.tf @@ -0,0 +1,10 @@ +# Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +resource "aws_odb_network_peering_connection" "test" { + display_name = "my_odb_net_peering" + odb_network_id = "" + peer_network_id = "" + tags = { + "env"="dev" + } +} \ No newline at end of file diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go new file mode 100644 index 000000000000..7e971912c8c5 --- /dev/null +++ b/internal/service/odb/network_peering_connection.go @@ -0,0 +1,449 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +package odb + +import ( + "context" + "errors" + "github.com/hashicorp/terraform-provider-aws/internal/enum" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "strings" + "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" + + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" + "github.com/hashicorp/terraform-provider-aws/internal/framework" + "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" + fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/sweep" + sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// Function annotations are used for resource registration to the Provider. DO NOT EDIT. +// @FrameworkResource("aws_odb_network_peering_connection", name="Network Peering Connection") +// @Tags(identifierAttribute="arn") +func newResourceNetworkPeeringConnection(_ context.Context) (resource.ResourceWithConfigure, error) { + r := &resourceNetworkPeeringConnection{} + + r.SetDefaultCreateTimeout(24 * time.Hour) + r.SetDefaultUpdateTimeout(24 * time.Hour) + r.SetDefaultDeleteTimeout(24 * time.Hour) + + return r, nil +} + +const ( + ResNameNetworkPeeringConnection = "Network Peering Connection" +) + +var OdbNetworkPeeringConnection = newResourceNetworkPeeringConnection + +type resourceNetworkPeeringConnection struct { + framework.ResourceWithModel[odbNetworkPeeringConnectionResourceModel] + framework.WithTimeouts +} + +func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + resp.Schema = schema.Schema{ + Description: "Information about an ODB network. Also refer odb_network_peering resource : A peering connection between an ODB network and either another ODB network or a customer-owned VPC.", + Attributes: map[string]schema.Attribute{ + names.AttrARN: framework.ARNAttributeComputedOnly(), + names.AttrID: framework.IDAttribute(), + "odb_network_id": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + Description: "Required field. The unique identifier of the ODB network that initiates the peering connection. " + + "A sample ID is odbpcx-abcdefgh12345678. Changing this will force terraform to create new resource.", + }, + "peer_network_id": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + Description: "Required field. The unique identifier of the ODB peering connection. Changing this will force terraform to create new resource", + }, + + "display_name": schema.StringAttribute{ + Description: "Display name of the odb network peering connection. Changing this will force terraform to create new resource", + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + + "status": schema.StringAttribute{ + Description: "Status of the odb network peering connection.", + CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), + Computed: true, + }, + "status_reason": schema.StringAttribute{ + Description: "The reason for the current status of the ODB peering connection..", + Computed: true, + }, + + "odb_network_arn": schema.StringAttribute{ + Description: "ARN of the odb network peering connection.", + Computed: true, + }, + + "peer_network_arn": schema.StringAttribute{ + Description: "ARN of the peer network peering connection.", + Computed: true, + }, + "odb_peering_connection_type": schema.StringAttribute{ + Description: "Type of the odb peering connection.", + Computed: true, + }, + "created_at": schema.StringAttribute{ + Description: "Created time of the odb network peering connection.", + Computed: true, + }, + "percent_progress": schema.Float32Attribute{ + Description: "Progress of the odb network peering connection.", + Computed: true, + }, + names.AttrTags: tftags.TagsAttribute(), + names.AttrTagsAll: tftags.TagsAttributeComputedOnly(), + }, + Blocks: map[string]schema.Block{ + names.AttrTimeouts: timeouts.Block(ctx, timeouts.Opts{ + Create: true, + Update: true, + Delete: true, + }), + }, + } +} + +func (r *resourceNetworkPeeringConnection) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + conn := r.Meta().ODBClient(ctx) + + var plan odbNetworkPeeringConnectionResourceModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.CreateOdbPeeringConnectionInput{ + OdbNetworkId: plan.OdbNetworkId.ValueStringPointer(), + PeerNetworkId: plan.PeerNetworkId.ValueStringPointer(), + DisplayName: plan.DisplayName.ValueStringPointer(), + Tags: getTagsIn(ctx), + } + + out, err := conn.CreateOdbPeeringConnection(ctx, &input) + if err != nil { + + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + if out == nil || out.OdbPeeringConnectionId == nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), nil), + errors.New("empty output").Error(), + ) + return + } + + resp.Diagnostics.Append(flex.Flatten(ctx, out, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + createTimeout := r.CreateTimeout(ctx, plan.Timeouts) + createdPeeredConnection, err := waitNetworkPeeringConnectionCreated(ctx, conn, plan.OdbPeeringConnectionId.ValueString(), createTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + plan.CreatedAt = types.StringValue(createdPeeredConnection.CreatedAt.Format(time.RFC3339)) + resp.Diagnostics.Append(flex.Flatten(ctx, createdPeeredConnection, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) +} + +func (r *resourceNetworkPeeringConnection) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + conn := r.Meta().ODBClient(ctx) + var state odbNetworkPeeringConnectionResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + out, err := findNetworkPeeringConnectionByID(ctx, conn, state.OdbPeeringConnectionId.ValueString()) + if tfresource.NotFound(err) { + resp.Diagnostics.Append(fwdiag.NewResourceNotFoundWarningDiagnostic(err)) + resp.State.RemoveResource(ctx) + return + } + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + + odbNetworks, err := conn.ListOdbNetworks(ctx, &odb.ListOdbNetworksInput{}) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + + var odbNetworkId *string = nil + for _, tempOdbNetwork := range odbNetworks.OdbNetworks { + if *tempOdbNetwork.OdbNetworkArn == *out.OdbNetworkArn { + odbNetworkId = tempOdbNetwork.OdbNetworkId + } + } + if odbNetworkId == nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + + peerVpcId := strings.Split(*out.PeerNetworkArn, "/")[1] + state.PeerNetworkId = types.StringValue(peerVpcId) + state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) + state.OdbNetworkId = types.StringValue(*odbNetworkId) + + resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("CreatedAt"), + flex.WithIgnoredFieldNamesAppend("PeerNetworkId"), flex.WithIgnoredFieldNamesAppend("OdbNetworkId"))...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) +} + +func (r *resourceNetworkPeeringConnection) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + conn := r.Meta().ODBClient(ctx) + + var plan, state odbNetworkPeeringConnectionResourceModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) + updatedOdbNetPeeringConn, err := waitNetworkPeeringConnectionUpdated(ctx, conn, plan.OdbPeeringConnectionId.ValueString(), updateTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetworkPeeringConnection, plan.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + plan.CreatedAt = types.StringValue(updatedOdbNetPeeringConn.CreatedAt.Format(time.RFC3339)) + resp.Diagnostics.Append(flex.Flatten(ctx, updatedOdbNetPeeringConn, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) +} + +func (r *resourceNetworkPeeringConnection) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + conn := r.Meta().ODBClient(ctx) + var state odbNetworkPeeringConnectionResourceModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.DeleteOdbPeeringConnectionInput{ + OdbPeeringConnectionId: state.OdbPeeringConnectionId.ValueStringPointer(), + } + + _, err := conn.DeleteOdbPeeringConnection(ctx, &input) + + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return + } + + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionDeleting, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + + deleteTimeout := r.DeleteTimeout(ctx, state.Timeouts) + _, err = waitNetworkPeeringConnectionDeleted(ctx, conn, state.OdbPeeringConnectionId.ValueString(), deleteTimeout) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForDeletion, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.String(), err), + err.Error(), + ) + return + } +} + +func (r *resourceNetworkPeeringConnection) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + resource.ImportStatePassthroughID(ctx, path.Root(names.AttrID), req, resp) +} + +func waitNetworkPeeringConnectionCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbPeeringConnection, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusProvisioning), + Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), + Refresh: statusNetworkPeeringConnection(ctx, conn, id), + Timeout: timeout, + NotFoundChecks: 20, + ContinuousTargetOccurence: 2, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.OdbPeeringConnection); ok { + return out, err + } + + return nil, err +} + +func waitNetworkPeeringConnectionUpdated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbPeeringConnection, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusUpdating), + Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), + Refresh: statusNetworkPeeringConnection(ctx, conn, id), + Timeout: timeout, + NotFoundChecks: 20, + ContinuousTargetOccurence: 2, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.OdbPeeringConnection); ok { + return out, err + } + + return nil, err +} + +func waitNetworkPeeringConnectionDeleted(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbPeeringConnection, error) { + stateConf := &retry.StateChangeConf{ + Pending: enum.Slice(odbtypes.ResourceStatusTerminating), + Target: []string{}, + Refresh: statusNetworkPeeringConnection(ctx, conn, id), + Timeout: timeout, + } + + outputRaw, err := stateConf.WaitForStateContext(ctx) + if out, ok := outputRaw.(*odbtypes.OdbPeeringConnection); ok { + return out, err + } + + return nil, err +} + +func statusNetworkPeeringConnection(ctx context.Context, conn *odb.Client, id string) retry.StateRefreshFunc { + return func() (any, string, error) { + out, err := findNetworkPeeringConnectionByID(ctx, conn, id) + if tfresource.NotFound(err) { + return nil, "", nil + } + + if err != nil { + return nil, "", err + } + + return out, string(out.Status), nil + } +} + +func findNetworkPeeringConnectionByID(ctx context.Context, conn *odb.Client, id string) (*odbtypes.OdbPeeringConnection, error) { + input := odb.GetOdbPeeringConnectionInput{ + OdbPeeringConnectionId: &id, + } + + out, err := conn.GetOdbPeeringConnection(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + + return nil, err + } + + if out == nil || out.OdbPeeringConnection == nil { + return nil, tfresource.NewEmptyResultError(&input) + } + + return out.OdbPeeringConnection, nil +} + +type odbNetworkPeeringConnectionResourceModel struct { + framework.WithRegionModel + OdbNetworkId types.String `tfsdk:"odb_network_id"` + PeerNetworkId types.String `tfsdk:"peer_network_id"` + OdbPeeringConnectionId types.String `tfsdk:"id"` + DisplayName types.String `tfsdk:"display_name"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + OdbPeeringConnectionArn types.String `tfsdk:"arn"` + OdbNetworkArn types.String `tfsdk:"odb_network_arn"` + PeerNetworkArn types.String `tfsdk:"peer_network_arn"` + OdbPeeringConnectionType types.String `tfsdk:"odb_peering_connection_type"` + CreatedAt types.String `tfsdk:"created_at"` + PercentProgress types.Float32 `tfsdk:"percent_progress"` + Timeouts timeouts.Value `tfsdk:"timeouts"` + Tags tftags.Map `tfsdk:"tags"` + TagsAll tftags.Map `tfsdk:"tags_all"` +} + +func sweepNetworkPeeringConnections(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) { + input := odb.ListOdbPeeringConnectionsInput{} + conn := client.ODBClient(ctx) + var sweepResources []sweep.Sweepable + + pages := odb.NewListOdbPeeringConnectionsPaginator(conn, &input) + for pages.HasMorePages() { + page, err := pages.NextPage(ctx) + if err != nil { + return nil, err + } + + for _, v := range page.OdbPeeringConnections { + sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceNetworkPeeringConnection, client, + sweepfw.NewAttribute(names.AttrID, aws.ToString(v.OdbPeeringConnectionId))), + ) + } + } + + return sweepResources, nil +} diff --git a/internal/service/odb/network_peering_connection_data_source.go b/internal/service/odb/network_peering_connection_data_source.go new file mode 100644 index 000000000000..4afce23fad10 --- /dev/null +++ b/internal/service/odb/network_peering_connection_data_source.go @@ -0,0 +1,140 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +package odb + +import ( + "context" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "time" + + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/framework" + "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" + fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// Function annotations are used for datasource registration to the Provider. DO NOT EDIT. +// @FrameworkDataSource("aws_odb_network_peering_connection", name="Network Peering Connection") +func newDataSourceNetworkPeeringConnection(context.Context) (datasource.DataSourceWithConfigure, error) { + return &dataSourceNetworkPeeringConnection{}, nil +} + +const ( + DSNameNetworkPeeringConnection = "Network Peering Connection Data Source" +) + +type dataSourceNetworkPeeringConnection struct { + framework.DataSourceWithModel[odbNetworkPeeringConnectionDataSourceModel] +} + +func (d *dataSourceNetworkPeeringConnection) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + names.AttrID: schema.StringAttribute{ + Description: "Network Peering Connection identifier.", + Required: true, + }, + "display_name": schema.StringAttribute{ + Description: "Display name of the odb network peering connection.", + Computed: true, + }, + "status": schema.StringAttribute{ + Description: "Status of the odb network peering connection.", + CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), + Computed: true, + }, + "status_reason": schema.StringAttribute{ + Description: "Status of the odb network peering connection.", + Computed: true, + }, + + "odb_network_arn": schema.StringAttribute{ + Description: "ARN of the odb network peering connection.", + Computed: true, + }, + + names.AttrARN: framework.ARNAttributeComputedOnly(), + + "peer_network_arn": schema.StringAttribute{ + Description: "ARN of the peer network peering connection.", + Computed: true, + }, + "odb_peering_connection_type": schema.StringAttribute{ + Description: "Type of the odb peering connection.", + Computed: true, + }, + "created_at": schema.StringAttribute{ + Description: "Created time of the odb network peering connection.", + Computed: true, + }, + "percent_progress": schema.Float32Attribute{ + Description: "Progress of the odb network peering connection.", + Computed: true, + }, + names.AttrTags: tftags.TagsAttributeComputedOnly(), + }, + } +} + +func (d *dataSourceNetworkPeeringConnection) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + + conn := d.Meta().ODBClient(ctx) + var data odbNetworkPeeringConnectionDataSourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + input := odb.GetOdbPeeringConnectionInput{ + OdbPeeringConnectionId: data.OdbPeeringConnectionId.ValueStringPointer(), + } + out, err := conn.GetOdbPeeringConnection(ctx, &input) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameNetworkPeeringConnection, data.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + tagsRead, err := listTags(ctx, conn, *out.OdbPeeringConnection.OdbPeeringConnectionArn) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, DSNameNetworkPeeringConnection, data.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + if tagsRead != nil { + data.Tags = tftags.FlattenStringValueMap(ctx, tagsRead.Map()) + } + if out.OdbPeeringConnection.CreatedAt != nil { + data.CreatedAt = types.StringValue(out.OdbPeeringConnection.CreatedAt.Format(time.RFC3339)) + } + resp.Diagnostics.Append(flex.Flatten(ctx, out.OdbPeeringConnection, &data, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) + if resp.Diagnostics.HasError() { + return + } + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +type odbNetworkPeeringConnectionDataSourceModel struct { + framework.WithRegionModel + OdbPeeringConnectionId types.String `tfsdk:"id"` + DisplayName types.String `tfsdk:"display_name"` + Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` + StatusReason types.String `tfsdk:"status_reason"` + OdbPeeringConnectionArn types.String `tfsdk:"arn"` + OdbNetworkArn types.String `tfsdk:"odb_network_arn"` + PeerNetworkArn types.String `tfsdk:"peer_network_arn"` + OdbPeeringConnectionType types.String `tfsdk:"odb_peering_connection_type"` + CreatedAt types.String `tfsdk:"created_at"` + PercentProgress types.Float32 `tfsdk:"percent_progress"` + Tags tftags.Map `tfsdk:"tags"` +} diff --git a/internal/service/odb/network_peering_connection_data_source_test.go b/internal/service/odb/network_peering_connection_data_source_test.go new file mode 100644 index 000000000000..89fb0cd0a381 --- /dev/null +++ b/internal/service/odb/network_peering_connection_data_source_test.go @@ -0,0 +1,212 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +package odb_test + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" + "testing" +) + +type odbPeeringDataSourceTest struct { + odbNetDisplayNamePrefix string + odbNetworkPeeringDisplayNamePrefix string + vpcNamePrefix string +} + +var odbPeeringDSTest = odbPeeringDataSourceTest{ + odbNetDisplayNamePrefix: "tf", + odbNetworkPeeringDisplayNamePrefix: "tf", + vpcNamePrefix: "tf", +} + +func TestPrintOdbPeeringResourceUnitTest(t *testing.T) { + odbNetDispName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetDisplayNamePrefix) + odbNetPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetworkPeeringDisplayNamePrefix) + //vpcNamePrefix := sdkacctest.RandomWithPrefix(odbPeeringDSTest.vpcNamePrefix) + + fmt.Println(odbPeeringDSTest.basicVpcHardCoded("vpc-084bc7dd335e156cc", odbNetDispName, odbNetPeeringDisplayName)) +} + +// Acceptance test access AWS and cost money to run. +func TestAccODBNetworkPeeringConnectionDataSource_basic(t *testing.T) { + + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + networkPeeringResource := "aws_odb_network_peering_connection.test" + networkPerringDataSource := "data.aws_odb_network_peering_connection.test" + odbNetPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetworkPeeringDisplayNamePrefix) + //odbNetDispName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetDisplayNamePrefix) + //vpcName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.vpcNamePrefix) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbPeeringDSTest.testAccCheckCloudOdbNetworkPeeringDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbPeeringDSTest.basicHardCoded("vpc-084bc7dd335e156cc", "odbnet_c91byo6y6m", odbNetPeeringDisplayName), + + //odbPeeringDSTest.basicPeeringConfig(vpcName, odbNetDispName, odbNetPeeringDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrPair(networkPeeringResource, "id", networkPerringDataSource, "id"), + ), + }, + }, + }) +} + +func (odbPeeringDataSourceTest) testAccCheckCloudOdbNetworkPeeringDestroy(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_network_peering_connection" { + continue + } + _, err := odbPeeringDSTest.findOdbPeering(ctx, conn, rs.Primary.ID) + + if err != nil { + if tfresource.NotFound(err) { + return nil + } + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameNetworkPeeringConnection, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameNetworkPeeringConnection, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func (odbPeeringDataSourceTest) findOdbPeering(ctx context.Context, conn *odb.Client, id string) (output *odb.GetOdbPeeringConnectionOutput, err error) { + input := odb.GetOdbPeeringConnectionInput{ + OdbPeeringConnectionId: &id, + } + out, err := conn.GetOdbPeeringConnection(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + + return nil, err + } + if out == nil { + return nil, errors.New("odb Network Peering Connection resource can not be nil") + } + return out, nil +} +func (odbPeeringDataSourceTest) basicPeeringConfig(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { + + testData := fmt.Sprintf(` + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + instance_tenancy = "default" + + tags = { + Name = %[1]q + } +} + +resource "aws_odb_network" "test" { + display_name = %[2]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + +resource "aws_odb_network_peering_connection" "test" { + display_name = %[3]q + odb_network_id = aws_odb_network.test.id + peer_network_id = aws_vpc.test.id + +} + +data "aws_odb_network_peering_connection" "test" { + id=aws_odb_network_peering_connection.test.id +} + +`, vpcName, odbNetDisplayName, odbPeeringDisplayName) + //fmt.Println(testData) + return testData +} + +func (odbPeeringDataSourceTest) basicVpcHardCoded(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { + + testData := fmt.Sprintf(` + + +resource "aws_odb_network" "test" { + display_name = %[2]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + + +resource "aws_odb_network_peering_connection" "test" { + peer_network_id = %[1]q + odb_network_id = aws_odb_network.test.id + display_name = %[3]q + +} + +data "aws_odb_network_peering_connection" "test" { + id=aws_odb_network_peering_connection.test.id +} + +`, vpcName, odbNetDisplayName, odbPeeringDisplayName) + //fmt.Println(testData) + return testData +} + +func (odbPeeringDataSourceTest) basicHardCoded(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { + + testData := fmt.Sprintf(` + + + + +resource "aws_odb_network_peering_connection" "test" { + peer_network_id = %[1]q + odb_network_id = %[2]q + display_name = %[3]q + +} + +data "aws_odb_network_peering_connection" "test" { + id=aws_odb_network_peering_connection.test.id +} + +`, vpcName, odbNetDisplayName, odbPeeringDisplayName) + //fmt.Println(testData) + return testData +} diff --git a/internal/service/odb/network_peering_connection_test.go b/internal/service/odb/network_peering_connection_test.go new file mode 100644 index 000000000000..c6203ef2bede --- /dev/null +++ b/internal/service/odb/network_peering_connection_test.go @@ -0,0 +1,312 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +package odb_test + +import ( + "context" + "errors" + "fmt" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-provider-aws/internal/errs" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "testing" + + "github.com/aws/aws-sdk-go-v2/service/odb" + sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-aws/internal/acctest" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/names" + + tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" +) + +type odbNwkPeeringResourceTest struct { + vpcNamePrefix string + odbPeeringDisplayNamePrefix string + odbNwkDisplayNamePrefix string +} + +var odbNwkPeeringTestResource = odbNwkPeeringResourceTest{ + vpcNamePrefix: "odb-vpc", + odbPeeringDisplayNamePrefix: "odb-peering", + odbNwkDisplayNamePrefix: "odb-net", +} + +func TestPrint(t *testing.T) { + odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbPeeringDisplayNamePrefix) + vpcName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.vpcNamePrefix) + odbNetName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbNwkDisplayNamePrefix) + s := odbNwkPeeringTestResource.basicConfig(vpcName, odbPeeringDisplayName, odbNetName) + fmt.Println(s) + +} + +func TestAccODBNetworkPeeringConnection_basic(t *testing.T) { + ctx := acctest.Context(t) + + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var odbPeeringResource odb.GetOdbPeeringConnectionOutput + odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbPeeringDisplayNamePrefix) + vpcName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.vpcNamePrefix) + odbNetName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbNwkDisplayNamePrefix) + resourceName := "aws_odb_network_peering_connection.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + odbNwkPeeringTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbNwkPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbNwkPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBNetworkPeeringConnectionAddRemoveTag(t *testing.T) { + ctx := acctest.Context(t) + + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var odbPeeringResource odb.GetOdbPeeringConnectionOutput + odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbPeeringDisplayNamePrefix) + vpcName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.vpcNamePrefix) + odbNetName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbNwkDisplayNamePrefix) + resourceName := "aws_odb_network_peering_connection.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + odbNwkPeeringTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbNwkPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbNwkPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: odbNwkPeeringTestResource.basicConfigNoTag(vpcName, odbNetName, odbPeeringDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccODBNetworkPeeringConnection_disappears(t *testing.T) { + ctx := acctest.Context(t) + if testing.Short() { + t.Skip("skipping long-running test in short mode") + } + + var odbPeering odb.GetOdbPeeringConnectionOutput + odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbPeeringDisplayNamePrefix) + vpcName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.vpcNamePrefix) + odbNetDisplayName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbPeeringDisplayNamePrefix) + resourceName := "aws_odb_network_peering_connection.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + odbNwkPeeringTestResource.testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: odbNwkPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: odbNwkPeeringTestResource.basicConfig(vpcName, odbNetDisplayName, odbPeeringDisplayName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeering), + acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.OdbNetworkPeeringConnection, resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func (odbNwkPeeringResourceTest) testAccCheckNetworkPeeringConnectionDestroy(ctx context.Context) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_odb_network_peering_connection" { + continue + } + + _, err := odbNwkPeeringTestResource.findOdbPeering(ctx, conn, rs.Primary.ID) + if tfresource.NotFound(err) { + return nil + } + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, err) + } + + return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, errors.New("not destroyed")) + } + + return nil + } +} + +func testAccCheckNetworkPeeringConnectionExists(ctx context.Context, name string, odbPeeringConnection *odb.GetOdbPeeringConnectionOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, name, errors.New("not found")) + } + + if rs.Primary.ID == "" { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, name, errors.New("not set")) + } + + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + resp, err := odbNwkPeeringTestResource.findOdbPeering(ctx, conn, rs.Primary.ID) + if err != nil { + return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, err) + } + + *odbPeeringConnection = *resp + + return nil + } +} + +func (odbNwkPeeringResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { + conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) + + input := &odb.ListOdbPeeringConnectionsInput{} + + _, err := conn.ListOdbPeeringConnections(ctx, input) + + if acctest.PreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} + +func (odbNwkPeeringResourceTest) findOdbPeering(ctx context.Context, conn *odb.Client, id string) (output *odb.GetOdbPeeringConnectionOutput, err error) { + input := odb.GetOdbPeeringConnectionInput{ + OdbPeeringConnectionId: &id, + } + out, err := conn.GetOdbPeeringConnection(ctx, &input) + if err != nil { + if errs.IsA[*odbtypes.ResourceNotFoundException](err) { + return nil, &retry.NotFoundError{ + LastError: err, + LastRequest: &input, + } + } + return nil, err + } + if out == nil { + return nil, errors.New("odb Network Peering Connection resource can not be nil") + } + return out, nil +} + +func (odbNwkPeeringResourceTest) basicConfig(vpcName, odbNetName, odbPeeringName string) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + instance_tenancy = "default" + + tags = { + Name = %[1]q + } +} + +resource "aws_odb_network" "test" { + display_name = %[2]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + +resource "aws_odb_network_peering_connection" "test" { + display_name = %[3]q + odb_network_id = aws_odb_network.test.id + peer_network_id = aws_vpc.test.id + tags = { + "env"="dev" + } +} +`, vpcName, odbNetName, odbPeeringName) +} + +func (odbNwkPeeringResourceTest) basicConfigNoTag(vpcName, odbNetName, odbPeeringName string) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + instance_tenancy = "default" + + tags = { + Name = %[1]q + } +} + +resource "aws_odb_network" "test" { + display_name = %[2]q + availability_zone_id = "use1-az6" + client_subnet_cidr = "10.2.0.0/24" + backup_subnet_cidr = "10.2.1.0/24" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" +} + +resource "aws_odb_network_peering_connection" "test" { + display_name = %[3]q + odb_network_id = aws_odb_network.test.id + peer_network_id = aws_vpc.test.id + +} +`, vpcName, odbNetName, odbPeeringName) +} diff --git a/internal/service/odb/tags_gen.go b/internal/service/odb/tags_gen.go new file mode 100644 index 000000000000..3ae4f0f73d8e --- /dev/null +++ b/internal/service/odb/tags_gen.go @@ -0,0 +1,128 @@ +// Code generated by internal/generate/tags/main.go; DO NOT EDIT. +package odb + +import ( + "context" + + "github.com/YakDriver/smarterr" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + "github.com/hashicorp/terraform-plugin-log/tflog" + "github.com/hashicorp/terraform-provider-aws/internal/conns" + "github.com/hashicorp/terraform-provider-aws/internal/logging" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" + "github.com/hashicorp/terraform-provider-aws/internal/types/option" + "github.com/hashicorp/terraform-provider-aws/names" +) + +// listTags lists odb service tags. +// The identifier is typically the Amazon Resource Name (ARN), although +// it may also be a different identifier depending on the service. +func listTags(ctx context.Context, conn *odb.Client, identifier string, optFns ...func(*odb.Options)) (tftags.KeyValueTags, error) { + input := odb.ListTagsForResourceInput{ + ResourceArn: aws.String(identifier), + } + + output, err := conn.ListTagsForResource(ctx, &input, optFns...) + + if err != nil { + return tftags.New(ctx, nil), smarterr.NewError(err) + } + + return keyValueTags(ctx, output.Tags), nil +} + +// ListTags lists odb service tags and set them in Context. +// It is called from outside this package. +func (p *servicePackage) ListTags(ctx context.Context, meta any, identifier string) error { + tags, err := listTags(ctx, meta.(*conns.AWSClient).ODBClient(ctx), identifier) + + if err != nil { + return smarterr.NewError(err) + } + + if inContext, ok := tftags.FromContext(ctx); ok { + inContext.TagsOut = option.Some(tags) + } + + return nil +} + +// map[string]string handling + +// svcTags returns odb service tags. +func svcTags(tags tftags.KeyValueTags) map[string]string { + return tags.Map() +} + +// keyValueTags creates tftags.KeyValueTags from odb service tags. +func keyValueTags(ctx context.Context, tags map[string]string) tftags.KeyValueTags { + return tftags.New(ctx, tags) +} + +// getTagsIn returns odb service tags from Context. +// nil is returned if there are no input tags. +func getTagsIn(ctx context.Context) map[string]string { + if inContext, ok := tftags.FromContext(ctx); ok { + if tags := svcTags(inContext.TagsIn.UnwrapOrDefault()); len(tags) > 0 { + return tags + } + } + + return nil +} + +// setTagsOut sets odb service tags in Context. +func setTagsOut(ctx context.Context, tags map[string]string) { + if inContext, ok := tftags.FromContext(ctx); ok { + inContext.TagsOut = option.Some(keyValueTags(ctx, tags)) + } +} + +// updateTags updates odb service tags. +// The identifier is typically the Amazon Resource Name (ARN), although +// it may also be a different identifier depending on the service. +func updateTags(ctx context.Context, conn *odb.Client, identifier string, oldTagsMap, newTagsMap any, optFns ...func(*odb.Options)) error { + oldTags := tftags.New(ctx, oldTagsMap) + newTags := tftags.New(ctx, newTagsMap) + + ctx = tflog.SetField(ctx, logging.KeyResourceId, identifier) + + removedTags := oldTags.Removed(newTags) + removedTags = removedTags.IgnoreSystem(names.ODB) + if len(removedTags) > 0 { + input := odb.UntagResourceInput{ + ResourceArn: aws.String(identifier), + TagKeys: removedTags.Keys(), + } + + _, err := conn.UntagResource(ctx, &input, optFns...) + + if err != nil { + return smarterr.NewError(err) + } + } + + updatedTags := oldTags.Updated(newTags) + updatedTags = updatedTags.IgnoreSystem(names.ODB) + if len(updatedTags) > 0 { + input := odb.TagResourceInput{ + ResourceArn: aws.String(identifier), + Tags: svcTags(updatedTags), + } + + _, err := conn.TagResource(ctx, &input, optFns...) + + if err != nil { + return smarterr.NewError(err) + } + } + + return nil +} + +// UpdateTags updates odb service tags. +// It is called from outside this package. +func (p *servicePackage) UpdateTags(ctx context.Context, meta any, identifier string, oldTags, newTags any) error { + return updateTags(ctx, meta.(*conns.AWSClient).ODBClient(ctx), identifier, oldTags, newTags) +} diff --git a/names/data/names_data.hcl b/names/data/names_data.hcl index 6a83a3386cfa..ce6cc5f76534 100644 --- a/names/data/names_data.hcl +++ b/names/data/names_data.hcl @@ -9441,4 +9441,33 @@ service "evs" { provider_package_correct = "evs" doc_prefix = ["evs_"] brand = "Amazon" +} +service "odb" { + sdk { + id = "ODB" + arn_namespace = "odb" + } + names { + provider_name_upper = "ODB" + human_friendly = "Oracle Database@AWS" + } + endpoint_info { + endpoint_api_call = "ListGiVersions" + endpoint_region_overrides = { + "aws" = "us-east-1" + } + } + go_packages { + v1_package = "" + v2_package = "odb" + } + client{ + skip_client_generate = true + } + resource_prefix{ + correct = "aws_odb_" + } + provider_package_correct = "odb" + doc_prefix = ["odb_"] + brand = "AWS" } \ No newline at end of file From 62a82bab799c4cfb83f8ce9d9de39743431e83ee Mon Sep 17 00:00:00 2001 From: Asim Date: Thu, 7 Aug 2025 19:07:58 +0100 Subject: [PATCH 05/57] odb nwk peering data source test case --- ...ork_peering_connection_data_source_test.go | 73 +------------------ .../odb/network_peering_connection_test.go | 3 - 2 files changed, 3 insertions(+), 73 deletions(-) diff --git a/internal/service/odb/network_peering_connection_data_source_test.go b/internal/service/odb/network_peering_connection_data_source_test.go index 89fb0cd0a381..91e2558d508d 100644 --- a/internal/service/odb/network_peering_connection_data_source_test.go +++ b/internal/service/odb/network_peering_connection_data_source_test.go @@ -34,14 +34,6 @@ var odbPeeringDSTest = odbPeeringDataSourceTest{ vpcNamePrefix: "tf", } -func TestPrintOdbPeeringResourceUnitTest(t *testing.T) { - odbNetDispName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetDisplayNamePrefix) - odbNetPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetworkPeeringDisplayNamePrefix) - //vpcNamePrefix := sdkacctest.RandomWithPrefix(odbPeeringDSTest.vpcNamePrefix) - - fmt.Println(odbPeeringDSTest.basicVpcHardCoded("vpc-084bc7dd335e156cc", odbNetDispName, odbNetPeeringDisplayName)) -} - // Acceptance test access AWS and cost money to run. func TestAccODBNetworkPeeringConnectionDataSource_basic(t *testing.T) { @@ -52,8 +44,8 @@ func TestAccODBNetworkPeeringConnectionDataSource_basic(t *testing.T) { networkPeeringResource := "aws_odb_network_peering_connection.test" networkPerringDataSource := "data.aws_odb_network_peering_connection.test" odbNetPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetworkPeeringDisplayNamePrefix) - //odbNetDispName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetDisplayNamePrefix) - //vpcName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.vpcNamePrefix) + odbNetDispName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetDisplayNamePrefix) + vpcName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.vpcNamePrefix) resource.Test(t, resource.TestCase{ PreCheck: func() { @@ -64,9 +56,7 @@ func TestAccODBNetworkPeeringConnectionDataSource_basic(t *testing.T) { CheckDestroy: odbPeeringDSTest.testAccCheckCloudOdbNetworkPeeringDestroy(ctx), Steps: []resource.TestStep{ { - Config: odbPeeringDSTest.basicHardCoded("vpc-084bc7dd335e156cc", "odbnet_c91byo6y6m", odbNetPeeringDisplayName), - - //odbPeeringDSTest.basicPeeringConfig(vpcName, odbNetDispName, odbNetPeeringDisplayName), + Config: odbPeeringDSTest.basicPeeringConfig(vpcName, odbNetDispName, odbNetPeeringDisplayName), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrPair(networkPeeringResource, "id", networkPerringDataSource, "id"), ), @@ -125,8 +115,6 @@ func (odbPeeringDataSourceTest) basicPeeringConfig(vpcName, odbNetDisplayName, o resource "aws_vpc" "test" { cidr_block = "10.0.0.0/16" - instance_tenancy = "default" - tags = { Name = %[1]q } @@ -153,60 +141,5 @@ data "aws_odb_network_peering_connection" "test" { } `, vpcName, odbNetDisplayName, odbPeeringDisplayName) - //fmt.Println(testData) - return testData -} - -func (odbPeeringDataSourceTest) basicVpcHardCoded(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { - - testData := fmt.Sprintf(` - - -resource "aws_odb_network" "test" { - display_name = %[2]q - availability_zone_id = "use1-az6" - client_subnet_cidr = "10.2.0.0/24" - backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" -} - - -resource "aws_odb_network_peering_connection" "test" { - peer_network_id = %[1]q - odb_network_id = aws_odb_network.test.id - display_name = %[3]q - -} - -data "aws_odb_network_peering_connection" "test" { - id=aws_odb_network_peering_connection.test.id -} - -`, vpcName, odbNetDisplayName, odbPeeringDisplayName) - //fmt.Println(testData) - return testData -} - -func (odbPeeringDataSourceTest) basicHardCoded(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { - - testData := fmt.Sprintf(` - - - - -resource "aws_odb_network_peering_connection" "test" { - peer_network_id = %[1]q - odb_network_id = %[2]q - display_name = %[3]q - -} - -data "aws_odb_network_peering_connection" "test" { - id=aws_odb_network_peering_connection.test.id -} - -`, vpcName, odbNetDisplayName, odbPeeringDisplayName) - //fmt.Println(testData) return testData } diff --git a/internal/service/odb/network_peering_connection_test.go b/internal/service/odb/network_peering_connection_test.go index c6203ef2bede..5d2b4c58ba7c 100644 --- a/internal/service/odb/network_peering_connection_test.go +++ b/internal/service/odb/network_peering_connection_test.go @@ -255,8 +255,6 @@ func (odbNwkPeeringResourceTest) basicConfig(vpcName, odbNetName, odbPeeringName return fmt.Sprintf(` resource "aws_vpc" "test" { cidr_block = "10.0.0.0/16" - instance_tenancy = "default" - tags = { Name = %[1]q } @@ -286,7 +284,6 @@ func (odbNwkPeeringResourceTest) basicConfigNoTag(vpcName, odbNetName, odbPeerin return fmt.Sprintf(` resource "aws_vpc" "test" { cidr_block = "10.0.0.0/16" - instance_tenancy = "default" tags = { Name = %[1]q From d308aa08a0e1457c151b237f9edbbaf515b513c6 Mon Sep 17 00:00:00 2001 From: Asim Date: Thu, 7 Aug 2025 19:18:22 +0100 Subject: [PATCH 06/57] change log added --- .changelog/43757.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changelog/43757.txt diff --git a/.changelog/43757.txt b/.changelog/43757.txt new file mode 100644 index 000000000000..bc206c047806 --- /dev/null +++ b/.changelog/43757.txt @@ -0,0 +1,7 @@ +```release-note:new-resource +aws_odb_network_peering_connection +``` + +```release-note:new-data-source +aws_odb_network_peering_connection +``` \ No newline at end of file From ab226e39991932a88e21315c1a219acc4a562141 Mon Sep 17 00:00:00 2001 From: Asim Date: Thu, 7 Aug 2025 20:24:07 +0100 Subject: [PATCH 07/57] removed print statement --- internal/service/odb/network_peering_connection_test.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/internal/service/odb/network_peering_connection_test.go b/internal/service/odb/network_peering_connection_test.go index 5d2b4c58ba7c..795cf004d087 100644 --- a/internal/service/odb/network_peering_connection_test.go +++ b/internal/service/odb/network_peering_connection_test.go @@ -36,15 +36,6 @@ var odbNwkPeeringTestResource = odbNwkPeeringResourceTest{ odbNwkDisplayNamePrefix: "odb-net", } -func TestPrint(t *testing.T) { - odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbPeeringDisplayNamePrefix) - vpcName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.vpcNamePrefix) - odbNetName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbNwkDisplayNamePrefix) - s := odbNwkPeeringTestResource.basicConfig(vpcName, odbPeeringDisplayName, odbNetName) - fmt.Println(s) - -} - func TestAccODBNetworkPeeringConnection_basic(t *testing.T) { ctx := acctest.Context(t) From 39fdf5454a053b16abb62c90fe54a456042c7b98 Mon Sep 17 00:00:00 2001 From: Asim Date: Sat, 9 Aug 2025 19:33:14 +0100 Subject: [PATCH 08/57] service package changes --- internal/service/odb/service_package.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 internal/service/odb/service_package.go diff --git a/internal/service/odb/service_package.go b/internal/service/odb/service_package.go new file mode 100644 index 000000000000..32a962a8ab63 --- /dev/null +++ b/internal/service/odb/service_package.go @@ -0,0 +1,21 @@ +//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. + +package odb + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/odb" + "github.com/hashicorp/terraform-provider-aws/names" +) + +func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) (*odb.Client, error) { + cfg := *(config["aws_sdkv2_config"].(*aws.Config)) + + return odb.NewFromConfig(cfg, + odb.WithEndpointResolverV2(newEndpointResolverV2()), + withBaseEndpoint(config[names.AttrEndpoint].(string)), + func(o *odb.Options) { + }, + ), nil +} From 11f604ea618ddf52d36774b8469c61e2d1614726 Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 11 Aug 2025 16:06:15 +0100 Subject: [PATCH 09/57] odb network id from ARN --- .../service/odb/network_peering_connection.go | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go index 7e971912c8c5..c9a6a301ea11 100644 --- a/internal/service/odb/network_peering_connection.go +++ b/internal/service/odb/network_peering_connection.go @@ -21,6 +21,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/aws/aws-sdk-go-v2/aws/arn" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-provider-aws/internal/conns" @@ -212,7 +213,7 @@ func (r *resourceNetworkPeeringConnection) Read(ctx context.Context, req resourc return } - odbNetworks, err := conn.ListOdbNetworks(ctx, &odb.ListOdbNetworksInput{}) + odbNetworkARNParsed, err := arn.Parse(*out.OdbNetworkArn) if err != nil { resp.Diagnostics.AddError( create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), @@ -221,24 +222,17 @@ func (r *resourceNetworkPeeringConnection) Read(ctx context.Context, req resourc return } - var odbNetworkId *string = nil - for _, tempOdbNetwork := range odbNetworks.OdbNetworks { - if *tempOdbNetwork.OdbNetworkArn == *out.OdbNetworkArn { - odbNetworkId = tempOdbNetwork.OdbNetworkId - } - } - if odbNetworkId == nil { + peerVpcARN, err := arn.Parse(*out.PeerNetworkArn) + if err != nil { resp.Diagnostics.AddError( create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), err.Error(), ) return } - - peerVpcId := strings.Split(*out.PeerNetworkArn, "/")[1] - state.PeerNetworkId = types.StringValue(peerVpcId) + state.PeerNetworkId = types.StringValue(strings.Split(peerVpcARN.Resource, "/")[1]) state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) - state.OdbNetworkId = types.StringValue(*odbNetworkId) + state.OdbNetworkId = types.StringValue(strings.Split(odbNetworkARNParsed.Resource, "/")[1]) resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("CreatedAt"), flex.WithIgnoredFieldNamesAppend("PeerNetworkId"), flex.WithIgnoredFieldNamesAppend("OdbNetworkId"))...) @@ -267,8 +261,28 @@ func (r *resourceNetworkPeeringConnection) Update(ctx context.Context, req resou ) return } - plan.CreatedAt = types.StringValue(updatedOdbNetPeeringConn.CreatedAt.Format(time.RFC3339)) - resp.Diagnostics.Append(flex.Flatten(ctx, updatedOdbNetPeeringConn, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) + odbNetworkARNParsed, err := arn.Parse(*updatedOdbNetPeeringConn.OdbNetworkArn) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + + peerVpcARN, err := arn.Parse(*updatedOdbNetPeeringConn.PeerNetworkArn) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), + err.Error(), + ) + return + } + state.PeerNetworkId = types.StringValue(strings.Split(peerVpcARN.Resource, "/")[1]) + state.CreatedAt = types.StringValue(updatedOdbNetPeeringConn.CreatedAt.Format(time.RFC3339)) + state.OdbNetworkId = types.StringValue(strings.Split(odbNetworkARNParsed.Resource, "/")[1]) + resp.Diagnostics.Append(flex.Flatten(ctx, updatedOdbNetPeeringConn, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"), flex.WithIgnoredFieldNamesAppend("CreatedAt"), + flex.WithIgnoredFieldNamesAppend("PeerNetworkId"), flex.WithIgnoredFieldNamesAppend("OdbNetworkId"))...) if resp.Diagnostics.HasError() { return } From 7db6bf83662771e01272f4dc8a74eb31fb817bb0 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Mon, 18 Aug 2025 17:34:57 -0400 Subject: [PATCH 10/57] 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 11/57] 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 30819be57d9c505dd88f0e0ab6659c7a8c65b734 Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 1 Sep 2025 15:41:45 +0100 Subject: [PATCH 12/57] fixed linters --- .../service/odb/network_peering_connection.go | 52 ++----------------- .../network_peering_connection_data_source.go | 6 +-- ...ork_peering_connection_data_source_test.go | 11 ++-- .../odb/network_peering_connection_test.go | 30 ++++------- internal/service/odb/service_package.go | 21 -------- internal/service/odb/service_package_gen.go | 22 +++++++- names/data/names_data.hcl | 29 ----------- 7 files changed, 38 insertions(+), 133 deletions(-) delete mode 100644 internal/service/odb/service_package.go diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go index c9a6a301ea11..ed3b6f70fd1e 100644 --- a/internal/service/odb/network_peering_connection.go +++ b/internal/service/odb/network_peering_connection.go @@ -1,38 +1,32 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. +//Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. package odb import ( "context" "errors" - "github.com/hashicorp/terraform-provider-aws/internal/enum" - tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" "strings" "time" - "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/arn" "github.com/aws/aws-sdk-go-v2/service/odb" odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" - "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" - - "github.com/aws/aws-sdk-go-v2/aws/arn" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-provider-aws/internal/conns" "github.com/hashicorp/terraform-provider-aws/internal/create" + "github.com/hashicorp/terraform-provider-aws/internal/enum" "github.com/hashicorp/terraform-provider-aws/internal/errs" "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag" "github.com/hashicorp/terraform-provider-aws/internal/framework" "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" - "github.com/hashicorp/terraform-provider-aws/internal/sweep" - sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -137,23 +131,19 @@ func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resou func (r *resourceNetworkPeeringConnection) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { conn := r.Meta().ODBClient(ctx) - var plan odbNetworkPeeringConnectionResourceModel resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) if resp.Diagnostics.HasError() { return } - input := odb.CreateOdbPeeringConnectionInput{ OdbNetworkId: plan.OdbNetworkId.ValueStringPointer(), PeerNetworkId: plan.PeerNetworkId.ValueStringPointer(), DisplayName: plan.DisplayName.ValueStringPointer(), Tags: getTagsIn(ctx), } - out, err := conn.CreateOdbPeeringConnection(ctx, &input) if err != nil { - resp.Diagnostics.AddError( create.ProblemStandardMessage(names.ODB, create.ErrActionCreating, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), err), err.Error(), @@ -167,12 +157,10 @@ func (r *resourceNetworkPeeringConnection) Create(ctx context.Context, req resou ) return } - resp.Diagnostics.Append(flex.Flatten(ctx, out, &plan)...) if resp.Diagnostics.HasError() { return } - createTimeout := r.CreateTimeout(ctx, plan.Timeouts) createdPeeredConnection, err := waitNetworkPeeringConnectionCreated(ctx, conn, plan.OdbPeeringConnectionId.ValueString(), createTimeout) if err != nil { @@ -187,7 +175,6 @@ func (r *resourceNetworkPeeringConnection) Create(ctx context.Context, req resou if resp.Diagnostics.HasError() { return } - resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) } @@ -244,14 +231,12 @@ func (r *resourceNetworkPeeringConnection) Read(ctx context.Context, req resourc func (r *resourceNetworkPeeringConnection) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { conn := r.Meta().ODBClient(ctx) - var plan, state odbNetworkPeeringConnectionResourceModel resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) resp.Diagnostics.Append(req.State.Get(ctx, &state)...) if resp.Diagnostics.HasError() { return } - updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) updatedOdbNetPeeringConn, err := waitNetworkPeeringConnectionUpdated(ctx, conn, plan.OdbPeeringConnectionId.ValueString(), updateTimeout) if err != nil { @@ -269,7 +254,6 @@ func (r *resourceNetworkPeeringConnection) Update(ctx context.Context, req resou ) return } - peerVpcARN, err := arn.Parse(*updatedOdbNetPeeringConn.PeerNetworkArn) if err != nil { resp.Diagnostics.AddError( @@ -300,14 +284,11 @@ func (r *resourceNetworkPeeringConnection) Delete(ctx context.Context, req resou input := odb.DeleteOdbPeeringConnectionInput{ OdbPeeringConnectionId: state.OdbPeeringConnectionId.ValueStringPointer(), } - _, err := conn.DeleteOdbPeeringConnection(ctx, &input) - if err != nil { if errs.IsA[*odbtypes.ResourceNotFoundException](err) { return } - resp.Diagnostics.AddError( create.ProblemStandardMessage(names.ODB, create.ErrActionDeleting, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), err.Error(), @@ -378,7 +359,6 @@ func waitNetworkPeeringConnectionDeleted(ctx context.Context, conn *odb.Client, if out, ok := outputRaw.(*odbtypes.OdbPeeringConnection); ok { return out, err } - return nil, err } @@ -388,11 +368,9 @@ func statusNetworkPeeringConnection(ctx context.Context, conn *odb.Client, id st if tfresource.NotFound(err) { return nil, "", nil } - if err != nil { return nil, "", err } - return out, string(out.Status), nil } } @@ -439,25 +417,3 @@ type odbNetworkPeeringConnectionResourceModel struct { Tags tftags.Map `tfsdk:"tags"` TagsAll tftags.Map `tfsdk:"tags_all"` } - -func sweepNetworkPeeringConnections(ctx context.Context, client *conns.AWSClient) ([]sweep.Sweepable, error) { - input := odb.ListOdbPeeringConnectionsInput{} - conn := client.ODBClient(ctx) - var sweepResources []sweep.Sweepable - - pages := odb.NewListOdbPeeringConnectionsPaginator(conn, &input) - for pages.HasMorePages() { - page, err := pages.NextPage(ctx) - if err != nil { - return nil, err - } - - for _, v := range page.OdbPeeringConnections { - sweepResources = append(sweepResources, sweepfw.NewSweepResource(newResourceNetworkPeeringConnection, client, - sweepfw.NewAttribute(names.AttrID, aws.ToString(v.OdbPeeringConnectionId))), - ) - } - } - - return sweepResources, nil -} diff --git a/internal/service/odb/network_peering_connection_data_source.go b/internal/service/odb/network_peering_connection_data_source.go index 4afce23fad10..4bdc2acdae4a 100644 --- a/internal/service/odb/network_peering_connection_data_source.go +++ b/internal/service/odb/network_peering_connection_data_source.go @@ -1,15 +1,13 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. +//Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. package odb import ( "context" - tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" "time" "github.com/aws/aws-sdk-go-v2/service/odb" odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" @@ -17,6 +15,7 @@ import ( "github.com/hashicorp/terraform-provider-aws/internal/framework" "github.com/hashicorp/terraform-provider-aws/internal/framework/flex" fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" + tftags "github.com/hashicorp/terraform-provider-aws/internal/tags" "github.com/hashicorp/terraform-provider-aws/names" ) @@ -84,7 +83,6 @@ func (d *dataSourceNetworkPeeringConnection) Schema(ctx context.Context, req dat } func (d *dataSourceNetworkPeeringConnection) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - conn := d.Meta().ODBClient(ctx) var data odbNetworkPeeringConnectionDataSourceModel resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) diff --git a/internal/service/odb/network_peering_connection_data_source_test.go b/internal/service/odb/network_peering_connection_data_source_test.go index 91e2558d508d..0948c2662e73 100644 --- a/internal/service/odb/network_peering_connection_data_source_test.go +++ b/internal/service/odb/network_peering_connection_data_source_test.go @@ -1,4 +1,4 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. +//Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. package odb_test @@ -6,6 +6,8 @@ import ( "context" "errors" "fmt" + "testing" + "github.com/aws/aws-sdk-go-v2/service/odb" odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" @@ -19,7 +21,6 @@ import ( tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "github.com/hashicorp/terraform-provider-aws/names" - "testing" ) type odbPeeringDataSourceTest struct { @@ -36,7 +37,6 @@ var odbPeeringDSTest = odbPeeringDataSourceTest{ // Acceptance test access AWS and cost money to run. func TestAccODBNetworkPeeringConnectionDataSource_basic(t *testing.T) { - ctx := acctest.Context(t) if testing.Short() { t.Skip("skipping long-running test in short mode") @@ -46,7 +46,6 @@ func TestAccODBNetworkPeeringConnectionDataSource_basic(t *testing.T) { odbNetPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetworkPeeringDisplayNamePrefix) odbNetDispName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetDisplayNamePrefix) vpcName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.vpcNamePrefix) - resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) @@ -68,7 +67,6 @@ func TestAccODBNetworkPeeringConnectionDataSource_basic(t *testing.T) { func (odbPeeringDataSourceTest) testAccCheckCloudOdbNetworkPeeringDestroy(ctx context.Context) resource.TestCheckFunc { return func(s *terraform.State) error { conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - for _, rs := range s.RootModule().Resources { if rs.Type != "aws_odb_network_peering_connection" { continue @@ -81,10 +79,8 @@ func (odbPeeringDataSourceTest) testAccCheckCloudOdbNetworkPeeringDestroy(ctx co } return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameNetworkPeeringConnection, rs.Primary.ID, err) } - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.DSNameNetworkPeeringConnection, rs.Primary.ID, errors.New("not destroyed")) } - return nil } } @@ -110,7 +106,6 @@ func (odbPeeringDataSourceTest) findOdbPeering(ctx context.Context, conn *odb.Cl return out, nil } func (odbPeeringDataSourceTest) basicPeeringConfig(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { - testData := fmt.Sprintf(` resource "aws_vpc" "test" { diff --git a/internal/service/odb/network_peering_connection_test.go b/internal/service/odb/network_peering_connection_test.go index 795cf004d087..e9a1ce4665db 100644 --- a/internal/service/odb/network_peering_connection_test.go +++ b/internal/service/odb/network_peering_connection_test.go @@ -1,4 +1,4 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. +//Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. package odb_test @@ -6,22 +6,21 @@ import ( "context" "errors" "fmt" - odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-provider-aws/internal/errs" - "github.com/hashicorp/terraform-provider-aws/internal/tfresource" "testing" "github.com/aws/aws-sdk-go-v2/service/odb" + odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/acctest" "github.com/hashicorp/terraform-provider-aws/internal/conns" "github.com/hashicorp/terraform-provider-aws/internal/create" - "github.com/hashicorp/terraform-provider-aws/names" - + "github.com/hashicorp/terraform-provider-aws/internal/errs" tfodb "github.com/hashicorp/terraform-provider-aws/internal/service/odb" + "github.com/hashicorp/terraform-provider-aws/internal/tfresource" + "github.com/hashicorp/terraform-provider-aws/names" ) type odbNwkPeeringResourceTest struct { @@ -75,7 +74,7 @@ func TestAccODBNetworkPeeringConnection_basic(t *testing.T) { }) } -func TestAccODBNetworkPeeringConnectionAddRemoveTag(t *testing.T) { +func TestAccODBNetworkPeeringConnection_tagging(t *testing.T) { ctx := acctest.Context(t) if testing.Short() { @@ -162,12 +161,10 @@ func TestAccODBNetworkPeeringConnection_disappears(t *testing.T) { func (odbNwkPeeringResourceTest) testAccCheckNetworkPeeringConnectionDestroy(ctx context.Context) resource.TestCheckFunc { return func(s *terraform.State) error { conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - for _, rs := range s.RootModule().Resources { if rs.Type != "aws_odb_network_peering_connection" { continue } - _, err := odbNwkPeeringTestResource.findOdbPeering(ctx, conn, rs.Primary.ID) if tfresource.NotFound(err) { return nil @@ -175,10 +172,8 @@ func (odbNwkPeeringResourceTest) testAccCheckNetworkPeeringConnectionDestroy(ctx if err != nil { return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, err) } - return create.Error(names.ODB, create.ErrActionCheckingDestroyed, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, errors.New("not destroyed")) } - return nil } } @@ -189,31 +184,24 @@ func testAccCheckNetworkPeeringConnectionExists(ctx context.Context, name string if !ok { return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, name, errors.New("not found")) } - if rs.Primary.ID == "" { return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, name, errors.New("not set")) } - conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) resp, err := odbNwkPeeringTestResource.findOdbPeering(ctx, conn, rs.Primary.ID) if err != nil { return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, err) } - *odbPeeringConnection = *resp - return nil } } func (odbNwkPeeringResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - - input := &odb.ListOdbPeeringConnectionsInput{} - - _, err := conn.ListOdbPeeringConnections(ctx, input) - + input := odb.ListOdbPeeringConnectionsInput{} + _, err := conn.ListOdbPeeringConnections(ctx, &input) if acctest.PreCheckSkipError(err) { t.Skipf("skipping acceptance testing: %s", err) } diff --git a/internal/service/odb/service_package.go b/internal/service/odb/service_package.go deleted file mode 100644 index 32a962a8ab63..000000000000 --- a/internal/service/odb/service_package.go +++ /dev/null @@ -1,21 +0,0 @@ -//Copyright © 2025, Oracle and/or its affiliates. All rights reserved. - -package odb - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/odb" - "github.com/hashicorp/terraform-provider-aws/names" -) - -func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) (*odb.Client, error) { - cfg := *(config["aws_sdkv2_config"].(*aws.Config)) - - return odb.NewFromConfig(cfg, - odb.WithEndpointResolverV2(newEndpointResolverV2()), - withBaseEndpoint(config[names.AttrEndpoint].(string)), - func(o *odb.Options) { - }, - ), nil -} diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go index a44c1aa78cb0..882a5b38bf0a 100644 --- a/internal/service/odb/service_package_gen.go +++ b/internal/service/odb/service_package_gen.go @@ -4,6 +4,7 @@ package odb import ( "context" + "unique" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/retry" @@ -18,11 +19,28 @@ import ( type servicePackage struct{} func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.ServicePackageFrameworkDataSource { - return []*inttypes.ServicePackageFrameworkDataSource{} + return []*inttypes.ServicePackageFrameworkDataSource{ + { + Factory: newDataSourceNetworkPeeringConnection, + TypeName: "aws_odb_network_peering_connection", + Name: "Network Peering Connection", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, + } } func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.ServicePackageFrameworkResource { - return []*inttypes.ServicePackageFrameworkResource{} + return []*inttypes.ServicePackageFrameworkResource{ + { + Factory: newResourceNetworkPeeringConnection, + TypeName: "aws_odb_network_peering_connection", + Name: "Network Peering Connection", + Tags: unique.Make(inttypes.ServicePackageResourceTags{ + IdentifierAttribute: names.AttrARN, + }), + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, + } } func (p *servicePackage) SDKDataSources(ctx context.Context) []*inttypes.ServicePackageSDKDataSource { diff --git a/names/data/names_data.hcl b/names/data/names_data.hcl index df75c89019b2..da2600fbf852 100644 --- a/names/data/names_data.hcl +++ b/names/data/names_data.hcl @@ -9520,33 +9520,4 @@ service "evs" { provider_package_correct = "evs" doc_prefix = ["evs_"] brand = "Amazon" -} -service "odb" { - sdk { - id = "ODB" - arn_namespace = "odb" - } - names { - provider_name_upper = "ODB" - human_friendly = "Oracle Database@AWS" - } - endpoint_info { - endpoint_api_call = "ListGiVersions" - endpoint_region_overrides = { - "aws" = "us-east-1" - } - } - go_packages { - v1_package = "" - v2_package = "odb" - } - client{ - skip_client_generate = true - } - resource_prefix{ - correct = "aws_odb_" - } - provider_package_correct = "odb" - doc_prefix = ["odb_"] - brand = "AWS" } \ No newline at end of file From 453b286e744c3b63ccb226c2da2d5f97f1058d71 Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 1 Sep 2025 15:43:19 +0100 Subject: [PATCH 13/57] fixed linters --- internal/service/odb/network_peering_connection.go | 8 ++++---- .../service/odb/network_peering_connection_data_source.go | 8 ++++---- .../odb/network_peering_connection_data_source_test.go | 2 +- internal/service/odb/network_peering_connection_test.go | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go index ed3b6f70fd1e..da46342827ed 100644 --- a/internal/service/odb/network_peering_connection.go +++ b/internal/service/odb/network_peering_connection.go @@ -77,7 +77,7 @@ func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resou Description: "Required field. The unique identifier of the ODB peering connection. Changing this will force terraform to create new resource", }, - "display_name": schema.StringAttribute{ + names.AttrDisplayName: schema.StringAttribute{ Description: "Display name of the odb network peering connection. Changing this will force terraform to create new resource", Required: true, PlanModifiers: []planmodifier.String{ @@ -85,12 +85,12 @@ func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resou }, }, - "status": schema.StringAttribute{ + names.AttrStatus: schema.StringAttribute{ Description: "Status of the odb network peering connection.", CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), Computed: true, }, - "status_reason": schema.StringAttribute{ + names.AttrStatusReason: schema.StringAttribute{ Description: "The reason for the current status of the ODB peering connection..", Computed: true, }, @@ -108,7 +108,7 @@ func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resou Description: "Type of the odb peering connection.", Computed: true, }, - "created_at": schema.StringAttribute{ + names.AttrCreatedAt: schema.StringAttribute{ Description: "Created time of the odb network peering connection.", Computed: true, }, diff --git a/internal/service/odb/network_peering_connection_data_source.go b/internal/service/odb/network_peering_connection_data_source.go index 4bdc2acdae4a..a26aff2571b3 100644 --- a/internal/service/odb/network_peering_connection_data_source.go +++ b/internal/service/odb/network_peering_connection_data_source.go @@ -40,16 +40,16 @@ func (d *dataSourceNetworkPeeringConnection) Schema(ctx context.Context, req dat Description: "Network Peering Connection identifier.", Required: true, }, - "display_name": schema.StringAttribute{ + names.AttrDisplayName: schema.StringAttribute{ Description: "Display name of the odb network peering connection.", Computed: true, }, - "status": schema.StringAttribute{ + names.AttrStatus: schema.StringAttribute{ Description: "Status of the odb network peering connection.", CustomType: fwtypes.StringEnumType[odbtypes.ResourceStatus](), Computed: true, }, - "status_reason": schema.StringAttribute{ + names.AttrStatusReason: schema.StringAttribute{ Description: "Status of the odb network peering connection.", Computed: true, }, @@ -69,7 +69,7 @@ func (d *dataSourceNetworkPeeringConnection) Schema(ctx context.Context, req dat Description: "Type of the odb peering connection.", Computed: true, }, - "created_at": schema.StringAttribute{ + names.AttrCreatedAt: schema.StringAttribute{ Description: "Created time of the odb network peering connection.", Computed: true, }, diff --git a/internal/service/odb/network_peering_connection_data_source_test.go b/internal/service/odb/network_peering_connection_data_source_test.go index 0948c2662e73..1508ce201f45 100644 --- a/internal/service/odb/network_peering_connection_data_source_test.go +++ b/internal/service/odb/network_peering_connection_data_source_test.go @@ -57,7 +57,7 @@ func TestAccODBNetworkPeeringConnectionDataSource_basic(t *testing.T) { { Config: odbPeeringDSTest.basicPeeringConfig(vpcName, odbNetDispName, odbNetPeeringDisplayName), Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttrPair(networkPeeringResource, "id", networkPerringDataSource, "id"), + resource.TestCheckResourceAttrPair(networkPeeringResource, names.AttrID, networkPerringDataSource, names.AttrID), ), }, }, diff --git a/internal/service/odb/network_peering_connection_test.go b/internal/service/odb/network_peering_connection_test.go index e9a1ce4665db..90af199165db 100644 --- a/internal/service/odb/network_peering_connection_test.go +++ b/internal/service/odb/network_peering_connection_test.go @@ -61,7 +61,7 @@ func TestAccODBNetworkPeeringConnection_basic(t *testing.T) { Config: odbNwkPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), ), }, @@ -100,7 +100,7 @@ func TestAccODBNetworkPeeringConnection_tagging(t *testing.T) { Config: odbNwkPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"), ), }, @@ -113,7 +113,7 @@ func TestAccODBNetworkPeeringConnection_tagging(t *testing.T) { Config: odbNwkPeeringTestResource.basicConfigNoTag(vpcName, odbNetName, odbPeeringDisplayName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), - resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "0"), ), }, { From 5effec7446cd1e1ac5c6861b3982cb06a5ce1f76 Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 1 Sep 2025 16:59:53 +0100 Subject: [PATCH 14/57] fixed linters and applied feedback of exa-infra --- .../service/odb/network_peering_connection.go | 40 ++++++++++++++----- .../network_peering_connection_data_source.go | 11 ++--- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go index da46342827ed..5aaccc267a33 100644 --- a/internal/service/odb/network_peering_connection.go +++ b/internal/service/odb/network_peering_connection.go @@ -5,6 +5,8 @@ package odb import ( "context" "errors" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" "strings" "time" @@ -111,6 +113,7 @@ func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resou names.AttrCreatedAt: schema.StringAttribute{ Description: "Created time of the odb network peering connection.", Computed: true, + CustomType: timetypes.RFC3339Type{}, }, "percent_progress": schema.Float32Attribute{ Description: "Progress of the odb network peering connection.", @@ -163,6 +166,7 @@ func (r *resourceNetworkPeeringConnection) Create(ctx context.Context, req resou } createTimeout := r.CreateTimeout(ctx, plan.Timeouts) createdPeeredConnection, err := waitNetworkPeeringConnectionCreated(ctx, conn, plan.OdbPeeringConnectionId.ValueString(), createTimeout) + resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root(names.AttrID), aws.ToString(out.OdbPeeringConnectionId))...) if err != nil { resp.Diagnostics.AddError( create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForCreation, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), err), @@ -170,8 +174,26 @@ func (r *resourceNetworkPeeringConnection) Create(ctx context.Context, req resou ) return } - plan.CreatedAt = types.StringValue(createdPeeredConnection.CreatedAt.Format(time.RFC3339)) - resp.Diagnostics.Append(flex.Flatten(ctx, createdPeeredConnection, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) + + odbNetworkARNParsed, err := arn.Parse(*createdPeeredConnection.OdbNetworkArn) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + peerVpcARN, err := arn.Parse(*createdPeeredConnection.PeerNetworkArn) + if err != nil { + resp.Diagnostics.AddError( + create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, plan.DisplayName.ValueString(), err), + err.Error(), + ) + return + } + plan.PeerNetworkId = types.StringValue(strings.Split(peerVpcARN.Resource, "/")[1]) + plan.OdbNetworkId = types.StringValue(strings.Split(odbNetworkARNParsed.Resource, "/")[1]) + resp.Diagnostics.Append(flex.Flatten(ctx, createdPeeredConnection, &plan)...) if resp.Diagnostics.HasError() { return } @@ -218,11 +240,9 @@ func (r *resourceNetworkPeeringConnection) Read(ctx context.Context, req resourc return } state.PeerNetworkId = types.StringValue(strings.Split(peerVpcARN.Resource, "/")[1]) - state.CreatedAt = types.StringValue(out.CreatedAt.Format(time.RFC3339)) state.OdbNetworkId = types.StringValue(strings.Split(odbNetworkARNParsed.Resource, "/")[1]) - resp.Diagnostics.Append(flex.Flatten(ctx, out, &state, flex.WithIgnoredFieldNamesAppend("CreatedAt"), - flex.WithIgnoredFieldNamesAppend("PeerNetworkId"), flex.WithIgnoredFieldNamesAppend("OdbNetworkId"))...) + resp.Diagnostics.Append(flex.Flatten(ctx, out, &state)...) if resp.Diagnostics.HasError() { return } @@ -263,10 +283,8 @@ func (r *resourceNetworkPeeringConnection) Update(ctx context.Context, req resou return } state.PeerNetworkId = types.StringValue(strings.Split(peerVpcARN.Resource, "/")[1]) - state.CreatedAt = types.StringValue(updatedOdbNetPeeringConn.CreatedAt.Format(time.RFC3339)) state.OdbNetworkId = types.StringValue(strings.Split(odbNetworkARNParsed.Resource, "/")[1]) - resp.Diagnostics.Append(flex.Flatten(ctx, updatedOdbNetPeeringConn, &plan, flex.WithIgnoredFieldNamesAppend("CreatedAt"), flex.WithIgnoredFieldNamesAppend("CreatedAt"), - flex.WithIgnoredFieldNamesAppend("PeerNetworkId"), flex.WithIgnoredFieldNamesAppend("OdbNetworkId"))...) + resp.Diagnostics.Append(flex.Flatten(ctx, updatedOdbNetPeeringConn, &plan)...) if resp.Diagnostics.HasError() { return } @@ -401,8 +419,8 @@ func findNetworkPeeringConnectionByID(ctx context.Context, conn *odb.Client, id type odbNetworkPeeringConnectionResourceModel struct { framework.WithRegionModel - OdbNetworkId types.String `tfsdk:"odb_network_id"` - PeerNetworkId types.String `tfsdk:"peer_network_id"` + OdbNetworkId types.String `tfsdk:"odb_network_id" autoflex:",noflatten"` + PeerNetworkId types.String `tfsdk:"peer_network_id" autoflex:",noflatten"` OdbPeeringConnectionId types.String `tfsdk:"id"` DisplayName types.String `tfsdk:"display_name"` Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"` @@ -411,7 +429,7 @@ type odbNetworkPeeringConnectionResourceModel struct { OdbNetworkArn types.String `tfsdk:"odb_network_arn"` PeerNetworkArn types.String `tfsdk:"peer_network_arn"` OdbPeeringConnectionType types.String `tfsdk:"odb_peering_connection_type"` - CreatedAt types.String `tfsdk:"created_at"` + CreatedAt timetypes.RFC3339 `tfsdk:"created_at"` PercentProgress types.Float32 `tfsdk:"percent_progress"` Timeouts timeouts.Value `tfsdk:"timeouts"` Tags tftags.Map `tfsdk:"tags"` diff --git a/internal/service/odb/network_peering_connection_data_source.go b/internal/service/odb/network_peering_connection_data_source.go index a26aff2571b3..02b3383420f6 100644 --- a/internal/service/odb/network_peering_connection_data_source.go +++ b/internal/service/odb/network_peering_connection_data_source.go @@ -4,10 +4,9 @@ package odb import ( "context" - "time" - "github.com/aws/aws-sdk-go-v2/service/odb" odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" + "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" @@ -72,6 +71,7 @@ func (d *dataSourceNetworkPeeringConnection) Schema(ctx context.Context, req dat names.AttrCreatedAt: schema.StringAttribute{ Description: "Created time of the odb network peering connection.", Computed: true, + CustomType: timetypes.RFC3339Type{}, }, "percent_progress": schema.Float32Attribute{ Description: "Progress of the odb network peering connection.", @@ -112,10 +112,7 @@ func (d *dataSourceNetworkPeeringConnection) Read(ctx context.Context, req datas if tagsRead != nil { data.Tags = tftags.FlattenStringValueMap(ctx, tagsRead.Map()) } - if out.OdbPeeringConnection.CreatedAt != nil { - data.CreatedAt = types.StringValue(out.OdbPeeringConnection.CreatedAt.Format(time.RFC3339)) - } - resp.Diagnostics.Append(flex.Flatten(ctx, out.OdbPeeringConnection, &data, flex.WithIgnoredFieldNamesAppend("CreatedAt"))...) + resp.Diagnostics.Append(flex.Flatten(ctx, out.OdbPeeringConnection, &data)...) if resp.Diagnostics.HasError() { return } @@ -132,7 +129,7 @@ type odbNetworkPeeringConnectionDataSourceModel struct { OdbNetworkArn types.String `tfsdk:"odb_network_arn"` PeerNetworkArn types.String `tfsdk:"peer_network_arn"` OdbPeeringConnectionType types.String `tfsdk:"odb_peering_connection_type"` - CreatedAt types.String `tfsdk:"created_at"` + CreatedAt timetypes.RFC3339 `tfsdk:"created_at"` PercentProgress types.Float32 `tfsdk:"percent_progress"` Tags tftags.Map `tfsdk:"tags"` } From c7c409ab27117fe3144224f387f263daa62c4efc Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 1 Sep 2025 17:01:04 +0100 Subject: [PATCH 15/57] fixed linters --- internal/service/odb/network_peering_connection_data_source.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/service/odb/network_peering_connection_data_source.go b/internal/service/odb/network_peering_connection_data_source.go index 02b3383420f6..1da5af81b0a1 100644 --- a/internal/service/odb/network_peering_connection_data_source.go +++ b/internal/service/odb/network_peering_connection_data_source.go @@ -4,6 +4,7 @@ package odb import ( "context" + "github.com/aws/aws-sdk-go-v2/service/odb" odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" From 1d8c84721e629954689dd49c15f020fa54b9d58a Mon Sep 17 00:00:00 2001 From: Asim Date: Tue, 2 Sep 2025 10:41:32 +0100 Subject: [PATCH 16/57] added documentation --- examples/odb/odb_network_peering.tf | 2 +- .../service/odb/network_peering_connection.go | 2 +- ...b_network_peering_connection.html.markdown | 48 +++++++++++++++++ ...b_network_peering_connection.html.markdown | 54 +++++++++++++++++++ 4 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 website/docs/d/odb_network_peering_connection.html.markdown create mode 100644 website/docs/r/odb_network_peering_connection.html.markdown diff --git a/examples/odb/odb_network_peering.tf b/examples/odb/odb_network_peering.tf index 8744170d0f0d..66f8996133f5 100644 --- a/examples/odb/odb_network_peering.tf +++ b/examples/odb/odb_network_peering.tf @@ -1,4 +1,4 @@ -# Copyright © 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. resource "aws_odb_network_peering_connection" "test" { display_name = "my_odb_net_peering" diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go index 5aaccc267a33..5c212b145724 100644 --- a/internal/service/odb/network_peering_connection.go +++ b/internal/service/odb/network_peering_connection.go @@ -59,7 +59,7 @@ type resourceNetworkPeeringConnection struct { func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "Information about an ODB network. Also refer odb_network_peering resource : A peering connection between an ODB network and either another ODB network or a customer-owned VPC.", + Description: "A peering connection between an ODB network and either another ODB network or a customer-owned VPC.", Attributes: map[string]schema.Attribute{ names.AttrARN: framework.ARNAttributeComputedOnly(), names.AttrID: framework.IDAttribute(), diff --git a/website/docs/d/odb_network_peering_connection.html.markdown b/website/docs/d/odb_network_peering_connection.html.markdown new file mode 100644 index 000000000000..bc9615ebfb3e --- /dev/null +++ b/website/docs/d/odb_network_peering_connection.html.markdown @@ -0,0 +1,48 @@ +--- +subcategory: "Oracle Database@AWS" +layout: "AWS: aws_odb_network_peering_connection" +page_title: "AWS: aws_odb_network_peering_connection" +description: |- + Terraform data source for managing oracle database network peering resource in AWS. +--- + +# Data Source: aws_odb_network_peering_connection + +Terraform data source for managing oracle database network peering resource in AWS. + +You can find out more about Oracle Database@AWS from [User Guide](https://docs.aws.amazon.com/odb/latest/UserGuide/what-is-odb.html). + +## Example Usage + +### Basic Usage + +```terraform +data "aws_odb_network_peering_connection" "example" { + id = "example" +} +``` + +## Argument Reference + +The following arguments are required: + +* `id` - (Required) The unique identifier of the Exadata infrastructure. + +The following arguments are optional: + +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). + +## Attribute Reference + +This data source exports the following attributes in addition to the arguments above: + +* `display_name` - Display name of the ODB network peering connection. +* `status` - Status of the ODB network peering connection. +* `status_reason` - Status of the ODB network peering connection. +* `odb_network_arn` - ARN of the ODB network peering connection. +* `arn` - The Amazon Resource Name (ARN) for the Exadata infrastructure. +* `peer_network_arn` - ARN of the peer network peering connection. +* `odb_peering_connection_type` - Type of the ODB peering connection. +* `created_at` - Created time of the ODB network peering connection. +* `percent_progress` - Progress of the ODB network peering connection. +* `tags` - Tags applied to the resource. diff --git a/website/docs/r/odb_network_peering_connection.html.markdown b/website/docs/r/odb_network_peering_connection.html.markdown new file mode 100644 index 000000000000..90f6803b3710 --- /dev/null +++ b/website/docs/r/odb_network_peering_connection.html.markdown @@ -0,0 +1,54 @@ +--- +subcategory: "Oracle Database@AWS" +layout: "AWS: aws_odb_network_peering_connection" +page_title: "AWS: aws_odb_network_peering_connection" +description: |- + Terraform resource for managing oracle database network peering resource in AWS. +--- + +# Data Source: aws_odb_network_peering_connection + +Terraform resource for managing oracle database network peering resource in AWS. + +You can find out more about Oracle Database@AWS from [User Guide](https://docs.aws.amazon.com/odb/latest/UserGuide/what-is-odb.html). + +## Example Usage + +### Basic Usage + +```terraform +resource "aws_odb_network_peering_connection" "example" { + display_name = "example" + odb_network_id = "my-odb-network-id" + peer_network_id = "my-vpc-id" + tags = { + "env" = "dev" + } +} +``` + +## Argument Reference + +The following arguments are required: + +* `odb_network_id` - (Required) The unique identifier of the ODB network that initiates the peering connection. A sample ID is `odbpcx-abcdefgh12345678`. Changing this will force Terraform to create a new resource. +* `peer_network_id` - (Required) The unique identifier of the ODB peering connection. Changing this will force Terraform to create a new resource. +* `display_name` - (Required) Display name of the ODB network peering connection. Changing this will force Terraform to create a new resource. + +The following arguments are optional: + +* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference). +* `tags` - (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. + +## Attribute Reference + +This data source exports the following attributes in addition to the arguments above: + +* `status` - Status of the ODB network peering connection. +* `status_reason` - The reason for the current status of the ODB peering connection. +* `odb_network_arn` - ARN of the ODB network peering connection. +* `peer_network_arn` - ARN of the peer network peering connection. +* `odb_peering_connection_type` - Type of the ODB peering connection. +* `created_at` - Created time of the ODB network peering connection. +* `percent_progress` - Progress of the ODB network peering connection. +* `tags_all` - A map of tags assigned to the resource, including inherited tags. From 4b2bb1d68ebd87edb9ec43001c18c1e4c27a272d Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 8 Sep 2025 14:45:43 +0100 Subject: [PATCH 17/57] fix lint issues --- examples/odb/odb_network_peering.tf | 2 +- .../service/odb/network_peering_connection.go | 11 +-- ...ork_peering_connection_data_source_test.go | 40 +++++---- .../odb/network_peering_connection_test.go | 86 +++++++++---------- 4 files changed, 69 insertions(+), 70 deletions(-) diff --git a/examples/odb/odb_network_peering.tf b/examples/odb/odb_network_peering.tf index 66f8996133f5..850fffe8e670 100644 --- a/examples/odb/odb_network_peering.tf +++ b/examples/odb/odb_network_peering.tf @@ -5,6 +5,6 @@ resource "aws_odb_network_peering_connection" "test" { odb_network_id = "" peer_network_id = "" tags = { - "env"="dev" + "env" = "dev" } } \ No newline at end of file diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go index 5c212b145724..96c6019c3044 100644 --- a/internal/service/odb/network_peering_connection.go +++ b/internal/service/odb/network_peering_connection.go @@ -5,15 +5,15 @@ package odb import ( "context" "errors" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" "strings" "time" + "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/arn" "github.com/aws/aws-sdk-go-v2/service/odb" odbtypes "github.com/aws/aws-sdk-go-v2/service/odb/types" "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" + "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" @@ -50,11 +50,12 @@ const ( ResNameNetworkPeeringConnection = "Network Peering Connection" ) -var OdbNetworkPeeringConnection = newResourceNetworkPeeringConnection +var OracleDBNetworkPeeringConnection = newResourceNetworkPeeringConnection type resourceNetworkPeeringConnection struct { framework.ResourceWithModel[odbNetworkPeeringConnectionResourceModel] framework.WithTimeouts + framework.WithImportByID } func (r *resourceNetworkPeeringConnection) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { @@ -325,10 +326,6 @@ func (r *resourceNetworkPeeringConnection) Delete(ctx context.Context, req resou } } -func (r *resourceNetworkPeeringConnection) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { - resource.ImportStatePassthroughID(ctx, path.Root(names.AttrID), req, resp) -} - func waitNetworkPeeringConnectionCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbPeeringConnection, error) { stateConf := &retry.StateChangeConf{ Pending: enum.Slice(odbtypes.ResourceStatusProvisioning), diff --git a/internal/service/odb/network_peering_connection_data_source_test.go b/internal/service/odb/network_peering_connection_data_source_test.go index 1508ce201f45..35fb074ee074 100644 --- a/internal/service/odb/network_peering_connection_data_source_test.go +++ b/internal/service/odb/network_peering_connection_data_source_test.go @@ -23,13 +23,13 @@ import ( "github.com/hashicorp/terraform-provider-aws/names" ) -type odbPeeringDataSourceTest struct { +type oracleDBNetPeeringDataSourceTest struct { odbNetDisplayNamePrefix string odbNetworkPeeringDisplayNamePrefix string vpcNamePrefix string } -var odbPeeringDSTest = odbPeeringDataSourceTest{ +var oracleDBNetPeeringDSTestEntity = oracleDBNetPeeringDataSourceTest{ odbNetDisplayNamePrefix: "tf", odbNetworkPeeringDisplayNamePrefix: "tf", vpcNamePrefix: "tf", @@ -43,19 +43,19 @@ func TestAccODBNetworkPeeringConnectionDataSource_basic(t *testing.T) { } networkPeeringResource := "aws_odb_network_peering_connection.test" networkPerringDataSource := "data.aws_odb_network_peering_connection.test" - odbNetPeeringDisplayName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetworkPeeringDisplayNamePrefix) - odbNetDispName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.odbNetDisplayNamePrefix) - vpcName := sdkacctest.RandomWithPrefix(odbPeeringDSTest.vpcNamePrefix) + odbNetPeeringDisplayName := sdkacctest.RandomWithPrefix(oracleDBNetPeeringDSTestEntity.odbNetworkPeeringDisplayNamePrefix) + odbNetDispName := sdkacctest.RandomWithPrefix(oracleDBNetPeeringDSTestEntity.odbNetDisplayNamePrefix) + vpcName := sdkacctest.RandomWithPrefix(oracleDBNetPeeringDSTestEntity.vpcNamePrefix) resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbPeeringDSTest.testAccCheckCloudOdbNetworkPeeringDestroy(ctx), + CheckDestroy: oracleDBNetPeeringDSTestEntity.testAccCheckCloudOracleDBNetworkPeeringDestroy(ctx), Steps: []resource.TestStep{ { - Config: odbPeeringDSTest.basicPeeringConfig(vpcName, odbNetDispName, odbNetPeeringDisplayName), + Config: oracleDBNetPeeringDSTestEntity.basicPeeringConfig(vpcName, odbNetDispName, odbNetPeeringDisplayName), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrPair(networkPeeringResource, names.AttrID, networkPerringDataSource, names.AttrID), ), @@ -64,14 +64,14 @@ func TestAccODBNetworkPeeringConnectionDataSource_basic(t *testing.T) { }) } -func (odbPeeringDataSourceTest) testAccCheckCloudOdbNetworkPeeringDestroy(ctx context.Context) resource.TestCheckFunc { +func (oracleDBNetPeeringDataSourceTest) testAccCheckCloudOracleDBNetworkPeeringDestroy(ctx context.Context) resource.TestCheckFunc { return func(s *terraform.State) error { conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) for _, rs := range s.RootModule().Resources { if rs.Type != "aws_odb_network_peering_connection" { continue } - _, err := odbPeeringDSTest.findOdbPeering(ctx, conn, rs.Primary.ID) + _, err := oracleDBNetPeeringDSTestEntity.findOracleDBNetworkPeering(ctx, conn, rs.Primary.ID) if err != nil { if tfresource.NotFound(err) { @@ -85,7 +85,7 @@ func (odbPeeringDataSourceTest) testAccCheckCloudOdbNetworkPeeringDestroy(ctx co } } -func (odbPeeringDataSourceTest) findOdbPeering(ctx context.Context, conn *odb.Client, id string) (output *odb.GetOdbPeeringConnectionOutput, err error) { +func (oracleDBNetPeeringDataSourceTest) findOracleDBNetworkPeering(ctx context.Context, conn *odb.Client, id string) (output *odb.GetOdbPeeringConnectionOutput, err error) { input := odb.GetOdbPeeringConnectionInput{ OdbPeeringConnectionId: &id, } @@ -105,36 +105,38 @@ func (odbPeeringDataSourceTest) findOdbPeering(ctx context.Context, conn *odb.Cl } return out, nil } -func (odbPeeringDataSourceTest) basicPeeringConfig(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { +func (oracleDBNetPeeringDataSourceTest) basicPeeringConfig(vpcName, odbNetDisplayName, odbPeeringDisplayName string) string { testData := fmt.Sprintf(` + resource "aws_vpc" "test" { - cidr_block = "10.0.0.0/16" + cidr_block = "10.0.0.0/16" tags = { Name = %[1]q } } resource "aws_odb_network" "test" { - display_name = %[2]q + display_name = %[2]q availability_zone_id = "use1-az6" client_subnet_cidr = "10.2.0.0/24" backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" } resource "aws_odb_network_peering_connection" "test" { - display_name = %[3]q - odb_network_id = aws_odb_network.test.id + display_name = %[3]q + odb_network_id = aws_odb_network.test.id peer_network_id = aws_vpc.test.id - + } data "aws_odb_network_peering_connection" "test" { - id=aws_odb_network_peering_connection.test.id + id = aws_odb_network_peering_connection.test.id } + `, vpcName, odbNetDisplayName, odbPeeringDisplayName) return testData } diff --git a/internal/service/odb/network_peering_connection_test.go b/internal/service/odb/network_peering_connection_test.go index 90af199165db..ff4d6a4e1248 100644 --- a/internal/service/odb/network_peering_connection_test.go +++ b/internal/service/odb/network_peering_connection_test.go @@ -23,13 +23,13 @@ import ( "github.com/hashicorp/terraform-provider-aws/names" ) -type odbNwkPeeringResourceTest struct { +type oracleDBNwkPeeringResourceTest struct { vpcNamePrefix string odbPeeringDisplayNamePrefix string odbNwkDisplayNamePrefix string } -var odbNwkPeeringTestResource = odbNwkPeeringResourceTest{ +var oracleDBNwkPeeringTestResource = oracleDBNwkPeeringResourceTest{ vpcNamePrefix: "odb-vpc", odbPeeringDisplayNamePrefix: "odb-peering", odbNwkDisplayNamePrefix: "odb-net", @@ -43,22 +43,22 @@ func TestAccODBNetworkPeeringConnection_basic(t *testing.T) { } var odbPeeringResource odb.GetOdbPeeringConnectionOutput - odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbPeeringDisplayNamePrefix) - vpcName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.vpcNamePrefix) - odbNetName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbNwkDisplayNamePrefix) + odbPeeringDisplayName := sdkacctest.RandomWithPrefix(oracleDBNwkPeeringTestResource.odbPeeringDisplayNamePrefix) + vpcName := sdkacctest.RandomWithPrefix(oracleDBNwkPeeringTestResource.vpcNamePrefix) + odbNetName := sdkacctest.RandomWithPrefix(oracleDBNwkPeeringTestResource.odbNwkDisplayNamePrefix) resourceName := "aws_odb_network_peering_connection.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) - odbNwkPeeringTestResource.testAccPreCheck(ctx, t) + oracleDBNwkPeeringTestResource.testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbNwkPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), + CheckDestroy: oracleDBNwkPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: odbNwkPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), + Config: oracleDBNwkPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), @@ -82,22 +82,22 @@ func TestAccODBNetworkPeeringConnection_tagging(t *testing.T) { } var odbPeeringResource odb.GetOdbPeeringConnectionOutput - odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbPeeringDisplayNamePrefix) - vpcName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.vpcNamePrefix) - odbNetName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbNwkDisplayNamePrefix) + odbPeeringDisplayName := sdkacctest.RandomWithPrefix(oracleDBNwkPeeringTestResource.odbPeeringDisplayNamePrefix) + vpcName := sdkacctest.RandomWithPrefix(oracleDBNwkPeeringTestResource.vpcNamePrefix) + odbNetName := sdkacctest.RandomWithPrefix(oracleDBNwkPeeringTestResource.odbNwkDisplayNamePrefix) resourceName := "aws_odb_network_peering_connection.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) - odbNwkPeeringTestResource.testAccPreCheck(ctx, t) + oracleDBNwkPeeringTestResource.testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbNwkPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), + CheckDestroy: oracleDBNwkPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: odbNwkPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), + Config: oracleDBNwkPeeringTestResource.basicConfig(vpcName, odbNetName, odbPeeringDisplayName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"), @@ -110,7 +110,7 @@ func TestAccODBNetworkPeeringConnection_tagging(t *testing.T) { ImportStateVerify: true, }, { - Config: odbNwkPeeringTestResource.basicConfigNoTag(vpcName, odbNetName, odbPeeringDisplayName), + Config: oracleDBNwkPeeringTestResource.basicConfigNoTag(vpcName, odbNetName, odbPeeringDisplayName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeeringResource), resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "0"), @@ -132,25 +132,25 @@ func TestAccODBNetworkPeeringConnection_disappears(t *testing.T) { } var odbPeering odb.GetOdbPeeringConnectionOutput - odbPeeringDisplayName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbPeeringDisplayNamePrefix) - vpcName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.vpcNamePrefix) - odbNetDisplayName := sdkacctest.RandomWithPrefix(odbNwkPeeringTestResource.odbPeeringDisplayNamePrefix) + odbPeeringDisplayName := sdkacctest.RandomWithPrefix(oracleDBNwkPeeringTestResource.odbPeeringDisplayNamePrefix) + vpcName := sdkacctest.RandomWithPrefix(oracleDBNwkPeeringTestResource.vpcNamePrefix) + odbNetDisplayName := sdkacctest.RandomWithPrefix(oracleDBNwkPeeringTestResource.odbPeeringDisplayNamePrefix) resourceName := "aws_odb_network_peering_connection.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) - odbNwkPeeringTestResource.testAccPreCheck(ctx, t) + oracleDBNwkPeeringTestResource.testAccPreCheck(ctx, t) }, ErrorCheck: acctest.ErrorCheck(t, names.ODBServiceID), ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, - CheckDestroy: odbNwkPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), + CheckDestroy: oracleDBNwkPeeringTestResource.testAccCheckNetworkPeeringConnectionDestroy(ctx), Steps: []resource.TestStep{ { - Config: odbNwkPeeringTestResource.basicConfig(vpcName, odbNetDisplayName, odbPeeringDisplayName), + Config: oracleDBNwkPeeringTestResource.basicConfig(vpcName, odbNetDisplayName, odbPeeringDisplayName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckNetworkPeeringConnectionExists(ctx, resourceName, &odbPeering), - acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.OdbNetworkPeeringConnection, resourceName), + acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfodb.OracleDBNetworkPeeringConnection, resourceName), ), ExpectNonEmptyPlan: true, }, @@ -158,14 +158,14 @@ func TestAccODBNetworkPeeringConnection_disappears(t *testing.T) { }) } -func (odbNwkPeeringResourceTest) testAccCheckNetworkPeeringConnectionDestroy(ctx context.Context) resource.TestCheckFunc { +func (oracleDBNwkPeeringResourceTest) testAccCheckNetworkPeeringConnectionDestroy(ctx context.Context) resource.TestCheckFunc { return func(s *terraform.State) error { conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) for _, rs := range s.RootModule().Resources { if rs.Type != "aws_odb_network_peering_connection" { continue } - _, err := odbNwkPeeringTestResource.findOdbPeering(ctx, conn, rs.Primary.ID) + _, err := oracleDBNwkPeeringTestResource.findOracleDBNetworkPeering(ctx, conn, rs.Primary.ID) if tfresource.NotFound(err) { return nil } @@ -189,7 +189,7 @@ func testAccCheckNetworkPeeringConnectionExists(ctx context.Context, name string } conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) - resp, err := odbNwkPeeringTestResource.findOdbPeering(ctx, conn, rs.Primary.ID) + resp, err := oracleDBNwkPeeringTestResource.findOracleDBNetworkPeering(ctx, conn, rs.Primary.ID) if err != nil { return create.Error(names.ODB, create.ErrActionCheckingExistence, tfodb.ResNameNetworkPeeringConnection, rs.Primary.ID, err) } @@ -198,7 +198,7 @@ func testAccCheckNetworkPeeringConnectionExists(ctx context.Context, name string } } -func (odbNwkPeeringResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { +func (oracleDBNwkPeeringResourceTest) testAccPreCheck(ctx context.Context, t *testing.T) { conn := acctest.Provider.Meta().(*conns.AWSClient).ODBClient(ctx) input := odb.ListOdbPeeringConnectionsInput{} _, err := conn.ListOdbPeeringConnections(ctx, &input) @@ -210,7 +210,7 @@ func (odbNwkPeeringResourceTest) testAccPreCheck(ctx context.Context, t *testing } } -func (odbNwkPeeringResourceTest) findOdbPeering(ctx context.Context, conn *odb.Client, id string) (output *odb.GetOdbPeeringConnectionOutput, err error) { +func (oracleDBNwkPeeringResourceTest) findOracleDBNetworkPeering(ctx context.Context, conn *odb.Client, id string) (output *odb.GetOdbPeeringConnectionOutput, err error) { input := odb.GetOdbPeeringConnectionInput{ OdbPeeringConnectionId: &id, } @@ -230,39 +230,39 @@ func (odbNwkPeeringResourceTest) findOdbPeering(ctx context.Context, conn *odb.C return out, nil } -func (odbNwkPeeringResourceTest) basicConfig(vpcName, odbNetName, odbPeeringName string) string { +func (oracleDBNwkPeeringResourceTest) basicConfig(vpcName, odbNetName, odbPeeringName string) string { return fmt.Sprintf(` resource "aws_vpc" "test" { - cidr_block = "10.0.0.0/16" + cidr_block = "10.0.0.0/16" tags = { Name = %[1]q } } resource "aws_odb_network" "test" { - display_name = %[2]q + display_name = %[2]q availability_zone_id = "use1-az6" client_subnet_cidr = "10.2.0.0/24" backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" } resource "aws_odb_network_peering_connection" "test" { - display_name = %[3]q - odb_network_id = aws_odb_network.test.id + display_name = %[3]q + odb_network_id = aws_odb_network.test.id peer_network_id = aws_vpc.test.id tags = { - "env"="dev" + "env" = "dev" } } `, vpcName, odbNetName, odbPeeringName) } -func (odbNwkPeeringResourceTest) basicConfigNoTag(vpcName, odbNetName, odbPeeringName string) string { +func (oracleDBNwkPeeringResourceTest) basicConfigNoTag(vpcName, odbNetName, odbPeeringName string) string { return fmt.Sprintf(` resource "aws_vpc" "test" { - cidr_block = "10.0.0.0/16" + cidr_block = "10.0.0.0/16" tags = { Name = %[1]q @@ -270,19 +270,19 @@ resource "aws_vpc" "test" { } resource "aws_odb_network" "test" { - display_name = %[2]q + display_name = %[2]q availability_zone_id = "use1-az6" client_subnet_cidr = "10.2.0.0/24" backup_subnet_cidr = "10.2.1.0/24" - s3_access = "DISABLED" - zero_etl_access = "DISABLED" + s3_access = "DISABLED" + zero_etl_access = "DISABLED" } resource "aws_odb_network_peering_connection" "test" { - display_name = %[3]q - odb_network_id = aws_odb_network.test.id + display_name = %[3]q + odb_network_id = aws_odb_network.test.id peer_network_id = aws_vpc.test.id - + } `, vpcName, odbNetName, odbPeeringName) } From cd85a1e18a9b0bc63535b8aeebe2c06dce2a499b Mon Sep 17 00:00:00 2001 From: Asim Date: Thu, 11 Sep 2025 12:41:34 +0100 Subject: [PATCH 18/57] updated copyright header --- examples/odb/odb_network_peering.tf | 4 ++- .../service/odb/network_peering_connection.go | 3 ++- .../network_peering_connection_data_source.go | 3 ++- ...ork_peering_connection_data_source_test.go | 3 ++- .../odb/network_peering_connection_test.go | 3 ++- ...b_network_peering_connection.html.markdown | 25 +++++++++++++++++++ 6 files changed, 36 insertions(+), 5 deletions(-) diff --git a/examples/odb/odb_network_peering.tf b/examples/odb/odb_network_peering.tf index 850fffe8e670..1d66bacb0c3b 100644 --- a/examples/odb/odb_network_peering.tf +++ b/examples/odb/odb_network_peering.tf @@ -1,4 +1,6 @@ -# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + resource "aws_odb_network_peering_connection" "test" { display_name = "my_odb_net_peering" diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go index 96c6019c3044..40202789b4fd 100644 --- a/internal/service/odb/network_peering_connection.go +++ b/internal/service/odb/network_peering_connection.go @@ -1,4 +1,5 @@ -//Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 package odb diff --git a/internal/service/odb/network_peering_connection_data_source.go b/internal/service/odb/network_peering_connection_data_source.go index 1da5af81b0a1..d47c257b6386 100644 --- a/internal/service/odb/network_peering_connection_data_source.go +++ b/internal/service/odb/network_peering_connection_data_source.go @@ -1,4 +1,5 @@ -//Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 package odb diff --git a/internal/service/odb/network_peering_connection_data_source_test.go b/internal/service/odb/network_peering_connection_data_source_test.go index 35fb074ee074..0a53e7a9f4b9 100644 --- a/internal/service/odb/network_peering_connection_data_source_test.go +++ b/internal/service/odb/network_peering_connection_data_source_test.go @@ -1,4 +1,5 @@ -//Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 package odb_test diff --git a/internal/service/odb/network_peering_connection_test.go b/internal/service/odb/network_peering_connection_test.go index ff4d6a4e1248..004becb29b3a 100644 --- a/internal/service/odb/network_peering_connection_test.go +++ b/internal/service/odb/network_peering_connection_test.go @@ -1,4 +1,5 @@ -//Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 package odb_test diff --git a/website/docs/r/odb_network_peering_connection.html.markdown b/website/docs/r/odb_network_peering_connection.html.markdown index 90f6803b3710..4783c90ca1cf 100644 --- a/website/docs/r/odb_network_peering_connection.html.markdown +++ b/website/docs/r/odb_network_peering_connection.html.markdown @@ -52,3 +52,28 @@ This data source exports the following attributes in addition to the arguments a * `created_at` - Created time of the ODB network peering connection. * `percent_progress` - Progress of the ODB network peering connection. * `tags_all` - A map of tags assigned to the resource, including inherited tags. + +## Timeouts + +[Configuration options](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts): + +* `create` - (Default `24h`) +* `update` - (Default `24h`) +* `delete` - (Default `24h`) + +## Import + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import OpenSearch Ingestion Pipeline using the `id`. For example: + +```terraform +import { + to = aws_odb_network_peering_connection.example + id = "example" +} +``` + +Using `terraform import`, import odb network peering using the `id`. For example: + +```console +% terraform import aws_odb_network_peering_connection.example example +``` \ No newline at end of file From c25341b9010805a4cfde17e85efde0fd56277ca0 Mon Sep 17 00:00:00 2001 From: Asim Date: Thu, 11 Sep 2025 18:41:18 +0100 Subject: [PATCH 19/57] fixed linter --- website/docs/r/odb_network_peering_connection.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/odb_network_peering_connection.html.markdown b/website/docs/r/odb_network_peering_connection.html.markdown index 4783c90ca1cf..534720f314e9 100644 --- a/website/docs/r/odb_network_peering_connection.html.markdown +++ b/website/docs/r/odb_network_peering_connection.html.markdown @@ -76,4 +76,4 @@ Using `terraform import`, import odb network peering using the `id`. For example ```console % terraform import aws_odb_network_peering_connection.example example -``` \ No newline at end of file +``` From 20d2e17518768e4e55fa0ad986ad3d7a09bc1b7f Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Tue, 16 Sep 2025 11:32:38 -0400 Subject: [PATCH 20/57] chore: tweak changelog --- .changelog/43383.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changelog/43383.txt b/.changelog/43383.txt index ef077fb3ab93..d11dd18a9ad8 100644 --- a/.changelog/43383.txt +++ b/.changelog/43383.txt @@ -1,3 +1,3 @@ ```release-note:bug -resource/aws_elasticache_user_group: Fix `User is not a member of user group` errors updates where the user gets deleted before the attempt. +resource/aws_elasticache_user_group: Ignore `InvalidParameterValue: User xxx is not a member of user group xxx` errors during group modification ``` From f1b0bb1a409e80d96e54607d28a4330fd3445aa1 Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Tue, 16 Sep 2025 14:55:20 -0400 Subject: [PATCH 21/57] r/aws_elasticache_user_group(test): split out update case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Over time the `_update` case has become bloated with multiple distinct test scenarios. This change splits this test into multiple distinct tests so they can be parallelized more efficiently. ```console % make testacc PKG=elasticache TESTS=TestAccElastiCacheUserGroup_ make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... make: Running acceptance tests on branch: 🌿 b-aws_ec_user_group-skip-removed-user 🌿... TF_ACC=1 go1.24.6 test ./internal/service/elasticache/... -v -count 1 -parallel 20 -run='TestAccElastiCacheUserGroup_' -timeout 360m -vet=off 2025/09/16 14:38:28 Creating Terraform AWS Provider (SDKv2-style)... 2025/09/16 14:38:28 Initializing Terraform AWS Provider (SDKv2-style)... --- PASS: TestAccElastiCacheUserGroup_disappears (140.26s) --- PASS: TestAccElastiCacheUserGroup_tags (140.39s) --- PASS: TestAccElastiCacheUserGroup_basic (143.97s) --- PASS: TestAccElastiCacheUserGroup_engineValkey (200.12s) --- PASS: TestAccElastiCacheUserGroup_update (262.93s) --- PASS: TestAccElastiCacheUserGroup_rotate (453.03s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/elasticache 459.658s ``` --- .../service/elasticache/user_group_test.go | 100 +++++++++++++++++- 1 file changed, 98 insertions(+), 2 deletions(-) diff --git a/internal/service/elasticache/user_group_test.go b/internal/service/elasticache/user_group_test.go index 12b7d5fddb3b..cabba0a4f4ba 100644 --- a/internal/service/elasticache/user_group_test.go +++ b/internal/service/elasticache/user_group_test.go @@ -10,6 +10,7 @@ import ( awstypes "github.com/aws/aws-sdk-go-v2/service/elasticache/types" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-aws/internal/acctest" "github.com/hashicorp/terraform-provider-aws/internal/retry" @@ -52,6 +53,8 @@ func TestAccElastiCacheUserGroup_update(t *testing.T) { var userGroup awstypes.UserGroup rName := acctest.RandomWithPrefix(t, "tf-acc") resourceName := "aws_elasticache_user_group.test" + user1ResourceName := "aws_elasticache_user.test1" + user2ResourceName := "aws_elasticache_user.test2" acctest.ParallelTest(ctx, t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(ctx, t) }, @@ -69,14 +72,55 @@ func TestAccElastiCacheUserGroup_update(t *testing.T) { ), }, { - Config: testAccUserGroupConfig_rotate(rName), + Config: testAccUserGroupConfig_multiple(rName), Check: resource.ComposeTestCheckFunc( testAccCheckUserGroupExists(ctx, t, resourceName, &userGroup), resource.TestCheckResourceAttr(resourceName, "user_ids.#", "2"), resource.TestCheckResourceAttr(resourceName, "user_group_id", rName), resource.TestCheckResourceAttr(resourceName, names.AttrEngine, "redis"), ), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectResourceAction(user1ResourceName, plancheck.ResourceActionNoop), + plancheck.ExpectResourceAction(user2ResourceName, plancheck.ResourceActionNoop), + }, + }, }, + { + Config: testAccUserGroupConfig_basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckUserGroupExists(ctx, t, resourceName, &userGroup), + resource.TestCheckResourceAttr(resourceName, "user_ids.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user_group_id", rName), + resource.TestCheckResourceAttr(resourceName, names.AttrEngine, "redis"), + ), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectResourceAction(user1ResourceName, plancheck.ResourceActionNoop), + plancheck.ExpectResourceAction(user2ResourceName, plancheck.ResourceActionNoop), + }, + }, + }, + }, + }) +} + +func TestAccElastiCacheUserGroup_rotate(t *testing.T) { + ctx := acctest.Context(t) + var userGroup awstypes.UserGroup + rName := acctest.RandomWithPrefix(t, "tf-acc") + resourceName := "aws_elasticache_user_group.test" + user1ResourceName := "aws_elasticache_user.test1" + user2ResourceName := "aws_elasticache_user.test2" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.ElastiCacheServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckUserGroupDestroy(ctx, t), + Steps: []resource.TestStep{ { Config: testAccUserGroupConfig_basic(rName), Check: resource.ComposeTestCheckFunc( @@ -87,14 +131,53 @@ func TestAccElastiCacheUserGroup_update(t *testing.T) { ), }, { - Config: testAccUserGroupConfig_multiple(rName), + Config: testAccUserGroupConfig_rotate(rName), Check: resource.ComposeTestCheckFunc( testAccCheckUserGroupExists(ctx, t, resourceName, &userGroup), resource.TestCheckResourceAttr(resourceName, "user_ids.#", "2"), resource.TestCheckResourceAttr(resourceName, "user_group_id", rName), resource.TestCheckResourceAttr(resourceName, names.AttrEngine, "redis"), ), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectResourceAction(user1ResourceName, plancheck.ResourceActionNoop), + plancheck.ExpectResourceAction(user2ResourceName, plancheck.ResourceActionReplace), + }, + }, + }, + { + Config: testAccUserGroupConfig_basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckUserGroupExists(ctx, t, resourceName, &userGroup), + resource.TestCheckResourceAttr(resourceName, "user_ids.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user_group_id", rName), + resource.TestCheckResourceAttr(resourceName, names.AttrEngine, "redis"), + ), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionUpdate), + plancheck.ExpectResourceAction(user1ResourceName, plancheck.ResourceActionNoop), + plancheck.ExpectResourceAction(user2ResourceName, plancheck.ResourceActionReplace), + }, + }, }, + }, + }) +} + +func TestAccElastiCacheUserGroup_engineValkey(t *testing.T) { + ctx := acctest.Context(t) + var userGroup awstypes.UserGroup + rName := acctest.RandomWithPrefix(t, "tf-acc") + resourceName := "aws_elasticache_user_group.test" + + acctest.ParallelTest(ctx, t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.ElastiCacheServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckUserGroupDestroy(ctx, t), + Steps: []resource.TestStep{ { Config: testAccUserGroupConfig_basic(rName), Check: resource.ComposeTestCheckFunc( @@ -186,6 +269,11 @@ func TestAccElastiCacheUserGroup_disappears(t *testing.T) { acctest.CheckResourceDisappears(ctx, acctest.Provider, tfelasticache.ResourceUserGroup(), resourceName), ), ExpectNonEmptyPlan: true, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PostApplyPostRefresh: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction(resourceName, plancheck.ResourceActionCreate), + }, + }, }, }, }) @@ -326,6 +414,14 @@ resource "aws_elasticache_user" "test1" { passwords = ["password123456789"] } +resource "aws_elasticache_user" "test2" { + user_id = "%[1]s-2" + user_name = "username1" + access_string = "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember" + engine = "REDIS" + passwords = ["password123456789"] +} + resource "aws_elasticache_user_group" "test" { user_group_id = %[1]q engine = "VALKEY" From f68d2faf57c99f0faa2540148cc55a3d9bc8a552 Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Tue, 16 Sep 2025 16:07:06 -0400 Subject: [PATCH 22/57] chore: fix changelog entry number --- .changelog/{43383.txt => 43520.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .changelog/{43383.txt => 43520.txt} (100%) diff --git a/.changelog/43383.txt b/.changelog/43520.txt similarity index 100% rename from .changelog/43383.txt rename to .changelog/43520.txt From 3b263bdcddf62692ce6b1d95ad84e4916efb0a58 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 16 Sep 2025 16:20:05 -0400 Subject: [PATCH 23/57] 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 24/57] 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 25/57] 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 26/57] 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 27/57] 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 28/57] 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 29/57] 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 30/57] 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 31/57] 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 32/57] 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 33/57] 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 34/57] 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 35/57] 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 36/57] 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 37/57] 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 38/57] 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 7580505ba1b940f8c441ba79f016ab85e6927152 Mon Sep 17 00:00:00 2001 From: Asim Date: Wed, 17 Sep 2025 11:27:07 +0100 Subject: [PATCH 39/57] odb-net-peering added to service_package_gen.go --- internal/service/odb/service_package_gen.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/internal/service/odb/service_package_gen.go b/internal/service/odb/service_package_gen.go index ccb059cc69d8..ad718c464ae7 100644 --- a/internal/service/odb/service_package_gen.go +++ b/internal/service/odb/service_package_gen.go @@ -46,6 +46,12 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*inttypes.S }), Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newDataSourceNetworkPeeringConnection, + TypeName: "aws_odb_network_peering_connection", + Name: "Network Peering Connection", + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, } } @@ -78,6 +84,15 @@ func (p *servicePackage) FrameworkResources(ctx context.Context) []*inttypes.Ser }), Region: unique.Make(inttypes.ResourceRegionDefault()), }, + { + Factory: newResourceNetworkPeeringConnection, + TypeName: "aws_odb_network_peering_connection", + Name: "Network Peering Connection", + Tags: unique.Make(inttypes.ServicePackageResourceTags{ + IdentifierAttribute: names.AttrARN, + }), + Region: unique.Make(inttypes.ResourceRegionDefault()), + }, } } From 104760f16656c0089196861a7b474897d8c94c6e Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 08:04:23 -0400 Subject: [PATCH 40/57] make: Better quick-fix --- 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 ae11650ae28877abebf0d60a8ac69ab7f1e6b312 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 08:16:28 -0400 Subject: [PATCH 41/57] 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..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.22.0 + 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 @@ -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..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.22.0 h1:JstF9U96wtdHV7Ujccv/Xrs7ejuwSKDFrc34bONsBOE= -github.com/YakDriver/tfproviderdocs v0.22.0/go.mod h1:M4DS8iRhrRuyWixpFA6QdpAwHHeom9ORcGVTctjROLw= +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= @@ -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 f6144babdf0f36a1a9503db7c112c4bb3bcae97c Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 08:18:36 -0400 Subject: [PATCH 42/57] Fix data sources title to be Data Source --- 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 +- 6 files changed, 6 insertions(+), 6 deletions(-) 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. From e7e7f0a76d13efa6b54473207bd2f2fc1015c82c Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 08:19:28 -0400 Subject: [PATCH 43/57] ce fix title to be data source --- website/docs/d/ce_cost_category.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From 4bcbaee154fb3ee4f8b97270b44e0665cd9ca10d Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 08:19:52 -0400 Subject: [PATCH 44/57] elasticache fix title to be data source --- website/docs/d/elasticache_subnet_group.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From 3df5d3c3a17ec79e7b97d0cb09b7bbd4941717ad Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 08:20:17 -0400 Subject: [PATCH 45/57] Remove import from data source --- .../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 c454c04aa8710d9d9208fdb8402b6ed2d62fa447 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 08:20:51 -0400 Subject: [PATCH 46/57] mediaconvert fix title to be data source --- website/docs/d/media_convert_queue.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From e820599228188693e7b57b896359ac26dab5f052 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 08:21:21 -0400 Subject: [PATCH 47/57] securityhub: Fix title to be data source --- .../d/securityhub_standards_control_associations.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From c741737320dc659600f6f8dc74164f08f4e49fab Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 08:21:43 -0400 Subject: [PATCH 48/57] workspaces: Fix title to be data source --- website/docs/d/workspaces_workspace.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 820319d9b449291619f688d801015eb2654ea936 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 08:45:57 -0400 Subject: [PATCH 49/57] Consistent messaging --- GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index 62dcfed8f288..ae5c3f39eac2 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -871,7 +871,7 @@ website-terrafmt: ## [CI] Website Checks / terrafmt website-terrafmt-fix: ## [CI] Fix Website / terrafmt @echo "make: Fix Website / terrafmt..." - @echo "make: terrafmt fix website/docs root files..." + @echo "make: Fixing website/docs root files with terrafmt..." @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..."; \ From b5b8ea1f12a82b3a996a5fc3d96f6424e46c1e83 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 17 Sep 2025 09:42:04 -0400 Subject: [PATCH 50/57] 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= From 43d8698622f0545b2d4c5429b61a8627f836ebb7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 09:50:43 -0400 Subject: [PATCH 51/57] build(deps): bump github.com/hashicorp/terraform-json (#44318) Bumps [github.com/hashicorp/terraform-json](https://github.com/hashicorp/terraform-json) from 0.26.0 to 0.27.1. - [Release notes](https://github.com/hashicorp/terraform-json/releases) - [Commits](https://github.com/hashicorp/terraform-json/compare/v0.26.0...v0.27.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-json dependency-version: 0.27.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 434e8df87d62..b39fa52db706 100644 --- a/go.mod +++ b/go.mod @@ -290,7 +290,7 @@ 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-json v0.27.1 github.com/hashicorp/terraform-plugin-framework v1.15.1 github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 github.com/hashicorp/terraform-plugin-framework-timeouts v0.5.0 @@ -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 diff --git a/go.sum b/go.sum index e780618d7082..cf7b62f13402 100644 --- a/go.sum +++ b/go.sum @@ -666,8 +666,8 @@ 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-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.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-jsontypes v0.2.0 h1:SJXL5FfJJm17554Kpt9jFXngdM6fXbnUnZ6iT2IeiYA= @@ -788,8 +788,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= From ea5667583d3ffa65cce4753de48bd8424cd4668a Mon Sep 17 00:00:00 2001 From: changelogbot Date: Wed, 17 Sep 2025 13:55:50 +0000 Subject: [PATCH 52/57] Update CHANGELOG.md for #44318 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e98b16f4ba17..452d0a10eae6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ ENHANCEMENTS: BUG FIXES: +* resource/aws_elasticache_user_group: Ignore `InvalidParameterValue: User xxx is not a member of user group xxx` errors during group modification ([#43520](https://github.com/hashicorp/terraform-provider-aws/issues/43520)) * resource/aws_sagemaker_endpoint_configuration: Fix panic when empty `async_inference_config.output_config.notification_config` block is specified ([#44310](https://github.com/hashicorp/terraform-provider-aws/issues/44310)) ## 6.13.0 (September 11, 2025) From 60a292bc7c74b086b9109fd484367b0271ba0701 Mon Sep 17 00:00:00 2001 From: Asim Date: Wed, 17 Sep 2025 16:37:42 +0100 Subject: [PATCH 53/57] removed the update method because resource can't update itself. --- .../service/odb/network_peering_connection.go | 60 ------------------- 1 file changed, 60 deletions(-) diff --git a/internal/service/odb/network_peering_connection.go b/internal/service/odb/network_peering_connection.go index 40202789b4fd..c088d5fdcfe8 100644 --- a/internal/service/odb/network_peering_connection.go +++ b/internal/service/odb/network_peering_connection.go @@ -251,48 +251,6 @@ func (r *resourceNetworkPeeringConnection) Read(ctx context.Context, req resourc resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) } -func (r *resourceNetworkPeeringConnection) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - conn := r.Meta().ODBClient(ctx) - var plan, state odbNetworkPeeringConnectionResourceModel - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - resp.Diagnostics.Append(req.State.Get(ctx, &state)...) - if resp.Diagnostics.HasError() { - return - } - updateTimeout := r.UpdateTimeout(ctx, plan.Timeouts) - updatedOdbNetPeeringConn, err := waitNetworkPeeringConnectionUpdated(ctx, conn, plan.OdbPeeringConnectionId.ValueString(), updateTimeout) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionWaitingForUpdate, ResNameNetworkPeeringConnection, plan.OdbPeeringConnectionId.ValueString(), err), - err.Error(), - ) - return - } - odbNetworkARNParsed, err := arn.Parse(*updatedOdbNetPeeringConn.OdbNetworkArn) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), - err.Error(), - ) - return - } - peerVpcARN, err := arn.Parse(*updatedOdbNetPeeringConn.PeerNetworkArn) - if err != nil { - resp.Diagnostics.AddError( - create.ProblemStandardMessage(names.ODB, create.ErrActionReading, ResNameNetworkPeeringConnection, state.OdbPeeringConnectionId.ValueString(), err), - err.Error(), - ) - return - } - state.PeerNetworkId = types.StringValue(strings.Split(peerVpcARN.Resource, "/")[1]) - state.OdbNetworkId = types.StringValue(strings.Split(odbNetworkARNParsed.Resource, "/")[1]) - resp.Diagnostics.Append(flex.Flatten(ctx, updatedOdbNetPeeringConn, &plan)...) - if resp.Diagnostics.HasError() { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) -} - func (r *resourceNetworkPeeringConnection) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { conn := r.Meta().ODBClient(ctx) var state odbNetworkPeeringConnectionResourceModel @@ -345,24 +303,6 @@ func waitNetworkPeeringConnectionCreated(ctx context.Context, conn *odb.Client, return nil, err } -func waitNetworkPeeringConnectionUpdated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbPeeringConnection, error) { - stateConf := &retry.StateChangeConf{ - Pending: enum.Slice(odbtypes.ResourceStatusUpdating), - Target: enum.Slice(odbtypes.ResourceStatusAvailable, odbtypes.ResourceStatusFailed), - Refresh: statusNetworkPeeringConnection(ctx, conn, id), - Timeout: timeout, - NotFoundChecks: 20, - ContinuousTargetOccurence: 2, - } - - outputRaw, err := stateConf.WaitForStateContext(ctx) - if out, ok := outputRaw.(*odbtypes.OdbPeeringConnection); ok { - return out, err - } - - return nil, err -} - func waitNetworkPeeringConnectionDeleted(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.OdbPeeringConnection, error) { stateConf := &retry.StateChangeConf{ Pending: enum.Slice(odbtypes.ResourceStatusTerminating), From cdc3b3d3503c1949d15098d08c46ff0ee29638bc Mon Sep 17 00:00:00 2001 From: Asim Date: Wed, 17 Sep 2025 17:06:48 +0100 Subject: [PATCH 54/57] fixed the resource doc --- website/docs/r/odb_network_peering_connection.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/odb_network_peering_connection.html.markdown b/website/docs/r/odb_network_peering_connection.html.markdown index 534720f314e9..dba3cf9cd628 100644 --- a/website/docs/r/odb_network_peering_connection.html.markdown +++ b/website/docs/r/odb_network_peering_connection.html.markdown @@ -6,7 +6,7 @@ description: |- Terraform resource for managing oracle database network peering resource in AWS. --- -# Data Source: aws_odb_network_peering_connection +# Resource: aws_odb_network_peering_connection Terraform resource for managing oracle database network peering resource in AWS. From cebc6c10a10a00deb6739d4ef0f1bce2f2c63257 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Wed, 17 Sep 2025 12:23:41 -0500 Subject: [PATCH 55/57] make clean-tidy (#44331) --- skaff/go.mod | 2 +- skaff/go.sum | 8 ++--- tools/tfsdk2fw/go.mod | 24 +++++++-------- tools/tfsdk2fw/go.sum | 68 +++++++++++++++++++++++-------------------- 4 files changed, 53 insertions(+), 49 deletions(-) diff --git a/skaff/go.mod b/skaff/go.mod index 753b5180948b..bc0db8dd8f26 100644 --- a/skaff/go.mod +++ b/skaff/go.mod @@ -18,7 +18,7 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/spf13/pflag v1.0.9 // indirect - github.com/zclconf/go-cty v1.16.3 // indirect + github.com/zclconf/go-cty v1.16.4 // indirect golang.org/x/mod v0.28.0 // indirect golang.org/x/sync v0.17.0 // indirect golang.org/x/text v0.29.0 // indirect diff --git a/skaff/go.sum b/skaff/go.sum index 7af9dc3c3a4d..22aa49c7b46b 100644 --- a/skaff/go.sum +++ b/skaff/go.sum @@ -5,8 +5,8 @@ github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -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/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= @@ -26,8 +26,8 @@ github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s= github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0= github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -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= golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= diff --git a/tools/tfsdk2fw/go.mod b/tools/tfsdk2fw/go.mod index 6611fde129e6..39e96e0b4ed3 100644 --- a/tools/tfsdk2fw/go.mod +++ b/tools/tfsdk2fw/go.mod @@ -294,7 +294,7 @@ require ( github.com/bgentry/speakeasy v0.1.0 // indirect github.com/cedar-policy/cedar-go v1.2.6 // indirect github.com/cloudflare/circl v1.6.1 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/fatih/color v1.18.0 // indirect github.com/gertd/go-pluralize v0.2.1 // indirect github.com/go-logr/logr v1.4.3 // indirect @@ -313,7 +313,7 @@ require ( github.com/hashicorp/go-cty v1.5.0 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-multierror v1.1.1 // 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/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.7.0 // indirect @@ -321,18 +321,18 @@ require ( github.com/hashicorp/hcl/v2 v2.23.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.23.0 // indirect - github.com/hashicorp/terraform-json v0.26.0 // indirect - github.com/hashicorp/terraform-plugin-framework v1.15.1 // indirect + github.com/hashicorp/terraform-json v0.27.2 // indirect + github.com/hashicorp/terraform-plugin-framework v1.16.0 // indirect github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 // indirect github.com/hashicorp/terraform-plugin-framework-timeouts v0.5.0 // indirect github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0 // indirect github.com/hashicorp/terraform-plugin-framework-validators v0.18.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.28.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.29.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect github.com/hashicorp/terraform-plugin-testing v1.13.3 // indirect - github.com/hashicorp/terraform-registry-address v0.2.5 // 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/jmespath/go-jmespath v0.4.0 // indirect @@ -345,7 +345,7 @@ require ( github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // 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/pkg/errors v0.9.1 // indirect github.com/posener/complete v1.2.3 // indirect github.com/shopspring/decimal v1.4.0 // indirect @@ -356,7 +356,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 @@ -371,9 +371,9 @@ require ( golang.org/x/text v0.29.0 // indirect golang.org/x/tools v0.37.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/protobuf v1.36.6 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b // indirect + google.golang.org/grpc v1.75.1 // indirect + google.golang.org/protobuf v1.36.9 // indirect gopkg.in/dnaeon/go-vcr.v4 v4.0.5 // indirect ) diff --git a/tools/tfsdk2fw/go.sum b/tools/tfsdk2fw/go.sum index 2f1da8df6d91..08ea6491b059 100644 --- a/tools/tfsdk2fw/go.sum +++ b/tools/tfsdk2fw/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/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/evanphx/json-patch v0.5.2 h1:xVCHIVMUu1wtM/VkR9jVZ45N3FhZfYMMYGorLCR8P3k= @@ -647,8 +648,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= @@ -664,10 +665,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.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-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= @@ -676,20 +677,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.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 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= github.com/hashicorp/terraform-plugin-testing v1.13.3/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.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= @@ -697,8 +698,8 @@ github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= 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/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= @@ -736,14 +737,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= @@ -783,8 +785,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= @@ -797,8 +799,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.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= +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= @@ -856,17 +858,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-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.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 b7dc098025eeb9d865e2b59a6943d074d7a67c41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 13:39:50 -0400 Subject: [PATCH 56/57] build(deps): bump the aws-sdk-go-v2 group across 1 directory with 8 updates (#44319) * build(deps): bump the aws-sdk-go-v2 group across 1 directory with 8 updates Bumps the aws-sdk-go-v2 group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/aws/aws-sdk-go-v2/service/amp](https://github.com/aws/aws-sdk-go-v2) | `1.40.0` | `1.40.1` | | [github.com/aws/aws-sdk-go-v2/service/budgets](https://github.com/aws/aws-sdk-go-v2) | `1.37.5` | `1.38.0` | | [github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs](https://github.com/aws/aws-sdk-go-v2) | `1.57.4` | `1.58.0` | | [github.com/aws/aws-sdk-go-v2/service/costexplorer](https://github.com/aws/aws-sdk-go-v2) | `1.55.5` | `1.56.0` | | [github.com/aws/aws-sdk-go-v2/service/osis](https://github.com/aws/aws-sdk-go-v2) | `1.19.3` | `1.20.0` | | [github.com/aws/aws-sdk-go-v2/service/outposts](https://github.com/aws/aws-sdk-go-v2) | `1.56.4` | `1.56.5` | | [github.com/aws/aws-sdk-go-v2/service/s3control](https://github.com/aws/aws-sdk-go-v2) | `1.65.6` | `1.66.0` | | [github.com/aws/aws-sdk-go-v2/service/transfer](https://github.com/aws/aws-sdk-go-v2) | `1.65.4` | `1.65.5` | Updates `github.com/aws/aws-sdk-go-v2/service/amp` from 1.40.0 to 1.40.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.40.0...service/s3/v1.40.1) Updates `github.com/aws/aws-sdk-go-v2/service/budgets` from 1.37.5 to 1.38.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ssm/v1.37.5...v1.38.0) Updates `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs` from 1.57.4 to 1.58.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ecs/v1.57.4...service/s3/v1.58.0) Updates `github.com/aws/aws-sdk-go-v2/service/costexplorer` from 1.55.5 to 1.56.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/iot/v1.55.5...service/s3/v1.56.0) Updates `github.com/aws/aws-sdk-go-v2/service/osis` from 1.19.3 to 1.20.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.20.0/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/mq/v1.19.3...v1.20.0) Updates `github.com/aws/aws-sdk-go-v2/service/outposts` from 1.56.4 to 1.56.5 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/eks/v1.56.4...service/eks/v1.56.5) Updates `github.com/aws/aws-sdk-go-v2/service/s3control` from 1.65.6 to 1.66.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3control/v1.65.6...service/s3/v1.66.0) Updates `github.com/aws/aws-sdk-go-v2/service/transfer` from 1.65.4 to 1.65.5 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/transfer/v1.65.4...service/transfer/v1.65.5) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/amp dependency-version: 1.40.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/budgets dependency-version: 1.38.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs dependency-version: 1.58.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/costexplorer dependency-version: 1.56.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/osis dependency-version: 1.20.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/outposts dependency-version: 1.56.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3control dependency-version: 1.66.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/transfer dependency-version: 1.65.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 ... Signed-off-by: dependabot[bot] * chore: make clean-tidy --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jared Baker --- go.mod | 16 ++++++++-------- go.sum | 32 ++++++++++++++++---------------- tools/tfsdk2fw/go.mod | 16 ++++++++-------- tools/tfsdk2fw/go.sum | 32 ++++++++++++++++---------------- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/go.mod b/go.mod index 026dbb81080e..35817c817c63 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/account v1.28.4 github.com/aws/aws-sdk-go-v2/service/acm v1.37.4 github.com/aws/aws-sdk-go-v2/service/acmpca v1.44.3 - github.com/aws/aws-sdk-go-v2/service/amp v1.40.0 + github.com/aws/aws-sdk-go-v2/service/amp v1.40.1 github.com/aws/aws-sdk-go-v2/service/amplify v1.37.3 github.com/aws/aws-sdk-go-v2/service/apigateway v1.35.4 github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.32.4 @@ -47,7 +47,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.50.4 github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol v1.4.4 github.com/aws/aws-sdk-go-v2/service/billing v1.7.5 - github.com/aws/aws-sdk-go-v2/service/budgets v1.37.5 + github.com/aws/aws-sdk-go-v2/service/budgets v1.38.0 github.com/aws/aws-sdk-go-v2/service/chatbot v1.14.4 github.com/aws/aws-sdk-go-v2/service/chime v1.40.3 github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.26.4 @@ -62,7 +62,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.31.4 github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.4 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.50.1 - github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.57.4 + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.0 github.com/aws/aws-sdk-go-v2/service/codeartifact v1.38.4 github.com/aws/aws-sdk-go-v2/service/codebuild v1.67.3 github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.20.6 @@ -83,7 +83,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/connectcases v1.30.4 github.com/aws/aws-sdk-go-v2/service/controltower v1.26.4 github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.33.4 - github.com/aws/aws-sdk-go-v2/service/costexplorer v1.55.5 + github.com/aws/aws-sdk-go-v2/service/costexplorer v1.56.0 github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.20.4 github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.52.4 github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.57.4 @@ -189,8 +189,8 @@ require ( github.com/aws/aws-sdk-go-v2/service/opensearch v1.52.3 github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.26.2 github.com/aws/aws-sdk-go-v2/service/organizations v1.45.1 - github.com/aws/aws-sdk-go-v2/service/osis v1.19.3 - github.com/aws/aws-sdk-go-v2/service/outposts v1.56.4 + github.com/aws/aws-sdk-go-v2/service/osis v1.20.0 + github.com/aws/aws-sdk-go-v2/service/outposts v1.56.5 github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.25.0 github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.15.4 github.com/aws/aws-sdk-go-v2/service/pcs v1.12.4 @@ -222,7 +222,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/route53resolver v1.40.4 github.com/aws/aws-sdk-go-v2/service/rum v1.28.5 github.com/aws/aws-sdk-go-v2/service/s3 v1.88.1 - github.com/aws/aws-sdk-go-v2/service/s3control v1.65.6 + github.com/aws/aws-sdk-go-v2/service/s3control v1.66.0 github.com/aws/aws-sdk-go-v2/service/s3outposts v1.33.4 github.com/aws/aws-sdk-go-v2/service/s3tables v1.10.3 github.com/aws/aws-sdk-go-v2/service/s3vectors v1.4.6 @@ -260,7 +260,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.35.3 github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.35.3 github.com/aws/aws-sdk-go-v2/service/transcribe v1.52.4 - github.com/aws/aws-sdk-go-v2/service/transfer v1.65.4 + github.com/aws/aws-sdk-go-v2/service/transfer v1.65.5 github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.29.2 github.com/aws/aws-sdk-go-v2/service/vpclattice v1.18.3 github.com/aws/aws-sdk-go-v2/service/waf v1.30.3 diff --git a/go.sum b/go.sum index 45428faddc78..a463a0e19a4a 100644 --- a/go.sum +++ b/go.sum @@ -51,8 +51,8 @@ github.com/aws/aws-sdk-go-v2/service/acm v1.37.4 h1:gpzR1xWvsrNJeKgkFQHGXJMUr6+V github.com/aws/aws-sdk-go-v2/service/acm v1.37.4/go.mod h1:ne6qRVJDTR/w+X72nwE+FrJeWjidVANOuHiPL47wzg4= github.com/aws/aws-sdk-go-v2/service/acmpca v1.44.3 h1:1bdOr2ALn/hXmSu55cn3meYg17IZj9QdRAMWqTURv6s= github.com/aws/aws-sdk-go-v2/service/acmpca v1.44.3/go.mod h1:jzjrG1/5C4WP1Y045W+SXqqUSVa6mXI4oC/ddfv3BXI= -github.com/aws/aws-sdk-go-v2/service/amp v1.40.0 h1:yM1W6WPzj6zg/KQ1ciOMksH/CJTJlIQuUczLDfoQn44= -github.com/aws/aws-sdk-go-v2/service/amp v1.40.0/go.mod h1:VU8yFbIjSf8ljYsuiU4Onb1sJp5MPoE4Xpo4CmgWzPc= +github.com/aws/aws-sdk-go-v2/service/amp v1.40.1 h1:tjXRnm4gbiPN59xTPE4sk5h81frKKzSre6+WBDGkm0Y= +github.com/aws/aws-sdk-go-v2/service/amp v1.40.1/go.mod h1:VU8yFbIjSf8ljYsuiU4Onb1sJp5MPoE4Xpo4CmgWzPc= github.com/aws/aws-sdk-go-v2/service/amplify v1.37.3 h1:Wf3pQg+WebfAI5aklg3B6x8/5UDjXSFxzVaX4a30BBs= github.com/aws/aws-sdk-go-v2/service/amplify v1.37.3/go.mod h1:uOvz7RWXMa+OA/JCphKN+z0EkkHRTCivfgfhqOqtf9E= github.com/aws/aws-sdk-go-v2/service/apigateway v1.35.4 h1:UoAThO0F16j0XhBF0xVhur/ceXiidEtSTOL1AiUhBZw= @@ -105,8 +105,8 @@ github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol v1.4.4 h1:nYvxys7Ou github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol v1.4.4/go.mod h1:73rs+5WDpBLlZUtgV0IO3+4EjRS8AW7vFbA4RBFd6R8= github.com/aws/aws-sdk-go-v2/service/billing v1.7.5 h1:Nb77k+S9tLLyBlcGOlnyfR04KzoSXc6/+O+1EKeVITw= github.com/aws/aws-sdk-go-v2/service/billing v1.7.5/go.mod h1:qrv8fPqdJSgnc1Ue7O3otSwQXVho0/z27T+r8hdPxAM= -github.com/aws/aws-sdk-go-v2/service/budgets v1.37.5 h1:+DDKTfPDgM/arwXWWn3bzzzEULgL22WugDHm8zyWaio= -github.com/aws/aws-sdk-go-v2/service/budgets v1.37.5/go.mod h1:IqipleKaucVL842LZ5vJECSJZFNHvUBE883fk8lwLkk= +github.com/aws/aws-sdk-go-v2/service/budgets v1.38.0 h1:XtePF18sp2vcErOMzPeD13pEidiYe28rXmhPdEK9CUA= +github.com/aws/aws-sdk-go-v2/service/budgets v1.38.0/go.mod h1:IqipleKaucVL842LZ5vJECSJZFNHvUBE883fk8lwLkk= github.com/aws/aws-sdk-go-v2/service/chatbot v1.14.4 h1:rahhkonNJRm0BvfnNE19U9t0xBKXnfwEcnqroRmY2ec= github.com/aws/aws-sdk-go-v2/service/chatbot v1.14.4/go.mod h1:Wv362fC5OMvg61LsaygecobiBobnZpSFivKsN17JHvM= github.com/aws/aws-sdk-go-v2/service/chime v1.40.3 h1:VU1s4PIE+qoO7mgUw+Q0CnMKTcovQIbLwWjsAlxampY= @@ -135,8 +135,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.4 h1:Ct4RSaeHLX4h6eua12PFj github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.4/go.mod h1:NE9Jd1chPuOVkgPPMkIthFg99iIqlLvZGxI+H3bJB3E= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.50.1 h1:OSye2F+X+KfxEdbrOT3x+p7L3kr5zPtm3BMkNWGVXQ8= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.50.1/go.mod h1:bNNaZaAX81KIuYDaj5ODgZwA1ybBJzpDeKYoNxEGGqw= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.57.4 h1:3iaxLk54jdxyeYAW0t07bjF0Y+T456dLFxhd5BVeD50= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.57.4/go.mod h1:ptJgRWK9opQK1foOTBKUg3PokkKA0/xcTXWIxwliaIY= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.0 h1:XH0kj0KcoKd+BAadpiS83/Wf+25q4FmH3gDei4u+PzA= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.0/go.mod h1:ptJgRWK9opQK1foOTBKUg3PokkKA0/xcTXWIxwliaIY= github.com/aws/aws-sdk-go-v2/service/codeartifact v1.38.4 h1:w4KTIyi00VkvstzYrFNBpYMkgjNHTkKmYpJhpvWKf5E= github.com/aws/aws-sdk-go-v2/service/codeartifact v1.38.4/go.mod h1:7BroBfL6xrlb00bp3fugPU/DJW/5wLgcmhBasBnC+ro= github.com/aws/aws-sdk-go-v2/service/codebuild v1.67.3 h1:ndr4GuUl/NrlBAz5gJ8Zyeb1Zn4iHYpJRWnjHLK7GRs= @@ -177,8 +177,8 @@ github.com/aws/aws-sdk-go-v2/service/controltower v1.26.4 h1:mDhXopIZ9wA+rRujZzT github.com/aws/aws-sdk-go-v2/service/controltower v1.26.4/go.mod h1:Wxn4D3He/BjPolAe7+Piw/z3QwX/gKf8y1qgm5i30pk= github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.33.4 h1:IDrhAstiKNG91mcFFQsAMcuimNxOUawoOOYUYCFGJz8= github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.33.4/go.mod h1:q6iPHDrwx+9RYDKoghNCP5g35n86VB+6d4E7nx4G1gg= -github.com/aws/aws-sdk-go-v2/service/costexplorer v1.55.5 h1:spKO2HoyWCtig4QSTHs/ax3hwtZtKVg1LsbWTp+N/rg= -github.com/aws/aws-sdk-go-v2/service/costexplorer v1.55.5/go.mod h1:wqo8rV2j3/Uh59hqumqQUgY3YgiVjHsnPRY3FzNDx3A= +github.com/aws/aws-sdk-go-v2/service/costexplorer v1.56.0 h1:xHcF7reLLeIiwH0p21l5jVD3p04ZlKxheHHSJIsZ4sU= +github.com/aws/aws-sdk-go-v2/service/costexplorer v1.56.0/go.mod h1:wqo8rV2j3/Uh59hqumqQUgY3YgiVjHsnPRY3FzNDx3A= github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.20.4 h1:+uszhA1bSLFZSgAMi/Yro8CzUb+iFIpNvT20CY7VFPY= github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.20.4/go.mod h1:czyjqxobbmdUEEm1n7bLoIKkOVkci8YJ5visLKUyBuk= github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.52.4 h1:4xkoNwaiDfIo9BgELVPBf+NGHJcC0JYCuGMVSGJemmk= @@ -399,10 +399,10 @@ github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.26.2 h1:7d4lqzz/V3u github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.26.2/go.mod h1:sAaa0p7rtN50HBxl1LEGGaHJ+w3dXd43V+wqRf/Wlfk= github.com/aws/aws-sdk-go-v2/service/organizations v1.45.1 h1:j5Cyl8uJi7rF8FczVWWVI0A7WQgqN+ED2OSRe5IZCec= github.com/aws/aws-sdk-go-v2/service/organizations v1.45.1/go.mod h1:ot0vk4sn+d7lY8g6oI91XE41Vz74ZNnTH+7UrsIsJVg= -github.com/aws/aws-sdk-go-v2/service/osis v1.19.3 h1:5iK3XJb7lqznX5wFGu3hCs+hnYaqeihBs5qLs724nfE= -github.com/aws/aws-sdk-go-v2/service/osis v1.19.3/go.mod h1:jTMFR2G2mZQYlH6xqPMMq/FrYk6gPdx4kMB2SSLRy9c= -github.com/aws/aws-sdk-go-v2/service/outposts v1.56.4 h1:aGSJR31Z33MIDBz3imAxNYe3VJuev7pcyT3pIQUnTA8= -github.com/aws/aws-sdk-go-v2/service/outposts v1.56.4/go.mod h1:oEwTEYL6jq3k0aYlGr811o291esaRs5vgUyx7Iw0oIM= +github.com/aws/aws-sdk-go-v2/service/osis v1.20.0 h1:8A0pne1+ZhifID091uJXKN3GTgXP2QlGw7m6qflEBmU= +github.com/aws/aws-sdk-go-v2/service/osis v1.20.0/go.mod h1:jTMFR2G2mZQYlH6xqPMMq/FrYk6gPdx4kMB2SSLRy9c= +github.com/aws/aws-sdk-go-v2/service/outposts v1.56.5 h1:IJ1eYLAMYOWT6jr3nPGG2JVtcvURLXjLUj2OeMhFEGU= +github.com/aws/aws-sdk-go-v2/service/outposts v1.56.5/go.mod h1:oEwTEYL6jq3k0aYlGr811o291esaRs5vgUyx7Iw0oIM= github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.25.0 h1:Xa+1EAhqSQXNmGBsIanfy8tNo85XdhUk4TRi6uxMaJw= github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.25.0/go.mod h1:oTU8PgBAPmgXqcGNysGtsvHSVaB1t70POQWzrvvzekM= github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.15.4 h1:fSfw+4bF7B23fCjB63HZOVsJmAYMz3SIcCK28B6kvPk= @@ -465,8 +465,8 @@ github.com/aws/aws-sdk-go-v2/service/rum v1.28.5 h1:5kyaUvSPlD4a9c788wy5uUxEnn3A github.com/aws/aws-sdk-go-v2/service/rum v1.28.5/go.mod h1:/GaTIfsZbDtYuom89etFZvu+Pfoct6mMU786iQk98RM= github.com/aws/aws-sdk-go-v2/service/s3 v1.88.1 h1:+RpGuaQ72qnU83qBKVwxkznewEdAGhIWo/PQCmkhhog= github.com/aws/aws-sdk-go-v2/service/s3 v1.88.1/go.mod h1:xajPTguLoeQMAOE44AAP2RQoUhF8ey1g5IFHARv71po= -github.com/aws/aws-sdk-go-v2/service/s3control v1.65.6 h1:eOHf8IowLgbcHyL5lkofjq9Oiwox62NZfJanQ+mFLhY= -github.com/aws/aws-sdk-go-v2/service/s3control v1.65.6/go.mod h1:AVQJ22NtzirbX3shogiVLeEuEsYaPEpXSel/GD8ALF8= +github.com/aws/aws-sdk-go-v2/service/s3control v1.66.0 h1:D9WB9VxwSlT4Xj00VDORofAteKEBdV4vZ85k4X61xyk= +github.com/aws/aws-sdk-go-v2/service/s3control v1.66.0/go.mod h1:AVQJ22NtzirbX3shogiVLeEuEsYaPEpXSel/GD8ALF8= github.com/aws/aws-sdk-go-v2/service/s3outposts v1.33.4 h1:GD28/y7URKoEGUS0OLSxnVl/j7zd7njJHzvKAKBuvA8= github.com/aws/aws-sdk-go-v2/service/s3outposts v1.33.4/go.mod h1:4KJY0ZwVCZFKfQBU3w7kgNG8LzLfcj/0G58soNebaec= github.com/aws/aws-sdk-go-v2/service/s3tables v1.10.3 h1:EdifhWi+JJJxF3cNWeam8camVWASGJrWl89ewbUvqhM= @@ -543,8 +543,8 @@ github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.35.3 h1:lG559VMq/SjLPgJ4 github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.35.3/go.mod h1:hEgxA1cAEctcJI458bb5OYbUna18HuOU0rlIYJsV5ac= github.com/aws/aws-sdk-go-v2/service/transcribe v1.52.4 h1:4JC0KVW1KO0h8iOrV+4aw6OcbevCPizyiblhnl+e4aM= github.com/aws/aws-sdk-go-v2/service/transcribe v1.52.4/go.mod h1:66IUhA3+gDSLwS9aFz9SH4544slFSSkxuMdiUCCPTgY= -github.com/aws/aws-sdk-go-v2/service/transfer v1.65.4 h1:WDZSB1l2MxHuLOeblYZdsgD3WgtioapYnQvplItIsbQ= -github.com/aws/aws-sdk-go-v2/service/transfer v1.65.4/go.mod h1:avf10drg2PsQEExButqDu6Uj3pvdVPaXA+0XDujNY1U= +github.com/aws/aws-sdk-go-v2/service/transfer v1.65.5 h1:7tNYT4dIDHWWPlcMpponb8mIqzDMpeiG0cxThWijMpo= +github.com/aws/aws-sdk-go-v2/service/transfer v1.65.5/go.mod h1:avf10drg2PsQEExButqDu6Uj3pvdVPaXA+0XDujNY1U= github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.29.2 h1:20JAmlxhN45SbHV2oXvdTJKURR+ZHCcTES3wQeOq8B4= github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.29.2/go.mod h1:jT4zf0DhyP4qrrWpgE/5huVRDsEXZUATErmvWB+U5DU= github.com/aws/aws-sdk-go-v2/service/vpclattice v1.18.3 h1:FtX5kYvSuq4y03jSuAX7nDsIqU5jNSb4c3iWLgmgFqA= diff --git a/tools/tfsdk2fw/go.mod b/tools/tfsdk2fw/go.mod index 39e96e0b4ed3..8d0ad571b930 100644 --- a/tools/tfsdk2fw/go.mod +++ b/tools/tfsdk2fw/go.mod @@ -32,7 +32,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/account v1.28.4 // indirect github.com/aws/aws-sdk-go-v2/service/acm v1.37.4 // indirect github.com/aws/aws-sdk-go-v2/service/acmpca v1.44.3 // indirect - github.com/aws/aws-sdk-go-v2/service/amp v1.40.0 // indirect + github.com/aws/aws-sdk-go-v2/service/amp v1.40.1 // indirect github.com/aws/aws-sdk-go-v2/service/amplify v1.37.3 // indirect github.com/aws/aws-sdk-go-v2/service/apigateway v1.35.4 // indirect github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.32.4 // indirect @@ -59,7 +59,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/bedrockagent v1.50.4 // indirect github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol v1.4.4 // indirect github.com/aws/aws-sdk-go-v2/service/billing v1.7.5 // indirect - github.com/aws/aws-sdk-go-v2/service/budgets v1.37.5 // indirect + github.com/aws/aws-sdk-go-v2/service/budgets v1.38.0 // indirect github.com/aws/aws-sdk-go-v2/service/chatbot v1.14.4 // indirect github.com/aws/aws-sdk-go-v2/service/chime v1.40.3 // indirect github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines v1.26.4 // indirect @@ -74,7 +74,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloudsearch v1.31.4 // indirect github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.4 // indirect github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.50.1 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.57.4 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.0 // indirect github.com/aws/aws-sdk-go-v2/service/codeartifact v1.38.4 // indirect github.com/aws/aws-sdk-go-v2/service/codebuild v1.67.3 // indirect github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.20.6 // indirect @@ -95,7 +95,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/connectcases v1.30.4 // indirect github.com/aws/aws-sdk-go-v2/service/controltower v1.26.4 // indirect github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.33.4 // indirect - github.com/aws/aws-sdk-go-v2/service/costexplorer v1.55.5 // indirect + github.com/aws/aws-sdk-go-v2/service/costexplorer v1.56.0 // indirect github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.20.4 // indirect github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.52.4 // indirect github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.57.4 // indirect @@ -206,8 +206,8 @@ require ( github.com/aws/aws-sdk-go-v2/service/opensearch v1.52.3 // indirect github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.26.2 // indirect github.com/aws/aws-sdk-go-v2/service/organizations v1.45.1 // indirect - github.com/aws/aws-sdk-go-v2/service/osis v1.19.3 // indirect - github.com/aws/aws-sdk-go-v2/service/outposts v1.56.4 // indirect + github.com/aws/aws-sdk-go-v2/service/osis v1.20.0 // indirect + github.com/aws/aws-sdk-go-v2/service/outposts v1.56.5 // indirect github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.25.0 // indirect github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.15.4 // indirect github.com/aws/aws-sdk-go-v2/service/pcs v1.12.4 // indirect @@ -239,7 +239,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/route53resolver v1.40.4 // indirect github.com/aws/aws-sdk-go-v2/service/rum v1.28.5 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.88.1 // indirect - github.com/aws/aws-sdk-go-v2/service/s3control v1.65.6 // indirect + github.com/aws/aws-sdk-go-v2/service/s3control v1.66.0 // indirect github.com/aws/aws-sdk-go-v2/service/s3outposts v1.33.4 // indirect github.com/aws/aws-sdk-go-v2/service/s3tables v1.10.3 // indirect github.com/aws/aws-sdk-go-v2/service/s3vectors v1.4.6 // indirect @@ -278,7 +278,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/timestreamquery v1.35.3 // indirect github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.35.3 // indirect github.com/aws/aws-sdk-go-v2/service/transcribe v1.52.4 // indirect - github.com/aws/aws-sdk-go-v2/service/transfer v1.65.4 // indirect + github.com/aws/aws-sdk-go-v2/service/transfer v1.65.5 // indirect github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.29.2 // indirect github.com/aws/aws-sdk-go-v2/service/vpclattice v1.18.3 // indirect github.com/aws/aws-sdk-go-v2/service/waf v1.30.3 // indirect diff --git a/tools/tfsdk2fw/go.sum b/tools/tfsdk2fw/go.sum index 08ea6491b059..05897c5ae1bb 100644 --- a/tools/tfsdk2fw/go.sum +++ b/tools/tfsdk2fw/go.sum @@ -51,8 +51,8 @@ github.com/aws/aws-sdk-go-v2/service/acm v1.37.4 h1:gpzR1xWvsrNJeKgkFQHGXJMUr6+V github.com/aws/aws-sdk-go-v2/service/acm v1.37.4/go.mod h1:ne6qRVJDTR/w+X72nwE+FrJeWjidVANOuHiPL47wzg4= github.com/aws/aws-sdk-go-v2/service/acmpca v1.44.3 h1:1bdOr2ALn/hXmSu55cn3meYg17IZj9QdRAMWqTURv6s= github.com/aws/aws-sdk-go-v2/service/acmpca v1.44.3/go.mod h1:jzjrG1/5C4WP1Y045W+SXqqUSVa6mXI4oC/ddfv3BXI= -github.com/aws/aws-sdk-go-v2/service/amp v1.40.0 h1:yM1W6WPzj6zg/KQ1ciOMksH/CJTJlIQuUczLDfoQn44= -github.com/aws/aws-sdk-go-v2/service/amp v1.40.0/go.mod h1:VU8yFbIjSf8ljYsuiU4Onb1sJp5MPoE4Xpo4CmgWzPc= +github.com/aws/aws-sdk-go-v2/service/amp v1.40.1 h1:tjXRnm4gbiPN59xTPE4sk5h81frKKzSre6+WBDGkm0Y= +github.com/aws/aws-sdk-go-v2/service/amp v1.40.1/go.mod h1:VU8yFbIjSf8ljYsuiU4Onb1sJp5MPoE4Xpo4CmgWzPc= github.com/aws/aws-sdk-go-v2/service/amplify v1.37.3 h1:Wf3pQg+WebfAI5aklg3B6x8/5UDjXSFxzVaX4a30BBs= github.com/aws/aws-sdk-go-v2/service/amplify v1.37.3/go.mod h1:uOvz7RWXMa+OA/JCphKN+z0EkkHRTCivfgfhqOqtf9E= github.com/aws/aws-sdk-go-v2/service/apigateway v1.35.4 h1:UoAThO0F16j0XhBF0xVhur/ceXiidEtSTOL1AiUhBZw= @@ -105,8 +105,8 @@ github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol v1.4.4 h1:nYvxys7Ou github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol v1.4.4/go.mod h1:73rs+5WDpBLlZUtgV0IO3+4EjRS8AW7vFbA4RBFd6R8= github.com/aws/aws-sdk-go-v2/service/billing v1.7.5 h1:Nb77k+S9tLLyBlcGOlnyfR04KzoSXc6/+O+1EKeVITw= github.com/aws/aws-sdk-go-v2/service/billing v1.7.5/go.mod h1:qrv8fPqdJSgnc1Ue7O3otSwQXVho0/z27T+r8hdPxAM= -github.com/aws/aws-sdk-go-v2/service/budgets v1.37.5 h1:+DDKTfPDgM/arwXWWn3bzzzEULgL22WugDHm8zyWaio= -github.com/aws/aws-sdk-go-v2/service/budgets v1.37.5/go.mod h1:IqipleKaucVL842LZ5vJECSJZFNHvUBE883fk8lwLkk= +github.com/aws/aws-sdk-go-v2/service/budgets v1.38.0 h1:XtePF18sp2vcErOMzPeD13pEidiYe28rXmhPdEK9CUA= +github.com/aws/aws-sdk-go-v2/service/budgets v1.38.0/go.mod h1:IqipleKaucVL842LZ5vJECSJZFNHvUBE883fk8lwLkk= github.com/aws/aws-sdk-go-v2/service/chatbot v1.14.4 h1:rahhkonNJRm0BvfnNE19U9t0xBKXnfwEcnqroRmY2ec= github.com/aws/aws-sdk-go-v2/service/chatbot v1.14.4/go.mod h1:Wv362fC5OMvg61LsaygecobiBobnZpSFivKsN17JHvM= github.com/aws/aws-sdk-go-v2/service/chime v1.40.3 h1:VU1s4PIE+qoO7mgUw+Q0CnMKTcovQIbLwWjsAlxampY= @@ -135,8 +135,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.4 h1:Ct4RSaeHLX4h6eua12PFj github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.4/go.mod h1:NE9Jd1chPuOVkgPPMkIthFg99iIqlLvZGxI+H3bJB3E= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.50.1 h1:OSye2F+X+KfxEdbrOT3x+p7L3kr5zPtm3BMkNWGVXQ8= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.50.1/go.mod h1:bNNaZaAX81KIuYDaj5ODgZwA1ybBJzpDeKYoNxEGGqw= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.57.4 h1:3iaxLk54jdxyeYAW0t07bjF0Y+T456dLFxhd5BVeD50= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.57.4/go.mod h1:ptJgRWK9opQK1foOTBKUg3PokkKA0/xcTXWIxwliaIY= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.0 h1:XH0kj0KcoKd+BAadpiS83/Wf+25q4FmH3gDei4u+PzA= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.0/go.mod h1:ptJgRWK9opQK1foOTBKUg3PokkKA0/xcTXWIxwliaIY= github.com/aws/aws-sdk-go-v2/service/codeartifact v1.38.4 h1:w4KTIyi00VkvstzYrFNBpYMkgjNHTkKmYpJhpvWKf5E= github.com/aws/aws-sdk-go-v2/service/codeartifact v1.38.4/go.mod h1:7BroBfL6xrlb00bp3fugPU/DJW/5wLgcmhBasBnC+ro= github.com/aws/aws-sdk-go-v2/service/codebuild v1.67.3 h1:ndr4GuUl/NrlBAz5gJ8Zyeb1Zn4iHYpJRWnjHLK7GRs= @@ -177,8 +177,8 @@ github.com/aws/aws-sdk-go-v2/service/controltower v1.26.4 h1:mDhXopIZ9wA+rRujZzT github.com/aws/aws-sdk-go-v2/service/controltower v1.26.4/go.mod h1:Wxn4D3He/BjPolAe7+Piw/z3QwX/gKf8y1qgm5i30pk= github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.33.4 h1:IDrhAstiKNG91mcFFQsAMcuimNxOUawoOOYUYCFGJz8= github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.33.4/go.mod h1:q6iPHDrwx+9RYDKoghNCP5g35n86VB+6d4E7nx4G1gg= -github.com/aws/aws-sdk-go-v2/service/costexplorer v1.55.5 h1:spKO2HoyWCtig4QSTHs/ax3hwtZtKVg1LsbWTp+N/rg= -github.com/aws/aws-sdk-go-v2/service/costexplorer v1.55.5/go.mod h1:wqo8rV2j3/Uh59hqumqQUgY3YgiVjHsnPRY3FzNDx3A= +github.com/aws/aws-sdk-go-v2/service/costexplorer v1.56.0 h1:xHcF7reLLeIiwH0p21l5jVD3p04ZlKxheHHSJIsZ4sU= +github.com/aws/aws-sdk-go-v2/service/costexplorer v1.56.0/go.mod h1:wqo8rV2j3/Uh59hqumqQUgY3YgiVjHsnPRY3FzNDx3A= github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.20.4 h1:+uszhA1bSLFZSgAMi/Yro8CzUb+iFIpNvT20CY7VFPY= github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.20.4/go.mod h1:czyjqxobbmdUEEm1n7bLoIKkOVkci8YJ5visLKUyBuk= github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.52.4 h1:4xkoNwaiDfIo9BgELVPBf+NGHJcC0JYCuGMVSGJemmk= @@ -399,10 +399,10 @@ github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.26.2 h1:7d4lqzz/V3u github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.26.2/go.mod h1:sAaa0p7rtN50HBxl1LEGGaHJ+w3dXd43V+wqRf/Wlfk= github.com/aws/aws-sdk-go-v2/service/organizations v1.45.1 h1:j5Cyl8uJi7rF8FczVWWVI0A7WQgqN+ED2OSRe5IZCec= github.com/aws/aws-sdk-go-v2/service/organizations v1.45.1/go.mod h1:ot0vk4sn+d7lY8g6oI91XE41Vz74ZNnTH+7UrsIsJVg= -github.com/aws/aws-sdk-go-v2/service/osis v1.19.3 h1:5iK3XJb7lqznX5wFGu3hCs+hnYaqeihBs5qLs724nfE= -github.com/aws/aws-sdk-go-v2/service/osis v1.19.3/go.mod h1:jTMFR2G2mZQYlH6xqPMMq/FrYk6gPdx4kMB2SSLRy9c= -github.com/aws/aws-sdk-go-v2/service/outposts v1.56.4 h1:aGSJR31Z33MIDBz3imAxNYe3VJuev7pcyT3pIQUnTA8= -github.com/aws/aws-sdk-go-v2/service/outposts v1.56.4/go.mod h1:oEwTEYL6jq3k0aYlGr811o291esaRs5vgUyx7Iw0oIM= +github.com/aws/aws-sdk-go-v2/service/osis v1.20.0 h1:8A0pne1+ZhifID091uJXKN3GTgXP2QlGw7m6qflEBmU= +github.com/aws/aws-sdk-go-v2/service/osis v1.20.0/go.mod h1:jTMFR2G2mZQYlH6xqPMMq/FrYk6gPdx4kMB2SSLRy9c= +github.com/aws/aws-sdk-go-v2/service/outposts v1.56.5 h1:IJ1eYLAMYOWT6jr3nPGG2JVtcvURLXjLUj2OeMhFEGU= +github.com/aws/aws-sdk-go-v2/service/outposts v1.56.5/go.mod h1:oEwTEYL6jq3k0aYlGr811o291esaRs5vgUyx7Iw0oIM= github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.25.0 h1:Xa+1EAhqSQXNmGBsIanfy8tNo85XdhUk4TRi6uxMaJw= github.com/aws/aws-sdk-go-v2/service/paymentcryptography v1.25.0/go.mod h1:oTU8PgBAPmgXqcGNysGtsvHSVaB1t70POQWzrvvzekM= github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.15.4 h1:fSfw+4bF7B23fCjB63HZOVsJmAYMz3SIcCK28B6kvPk= @@ -465,8 +465,8 @@ github.com/aws/aws-sdk-go-v2/service/rum v1.28.5 h1:5kyaUvSPlD4a9c788wy5uUxEnn3A github.com/aws/aws-sdk-go-v2/service/rum v1.28.5/go.mod h1:/GaTIfsZbDtYuom89etFZvu+Pfoct6mMU786iQk98RM= github.com/aws/aws-sdk-go-v2/service/s3 v1.88.1 h1:+RpGuaQ72qnU83qBKVwxkznewEdAGhIWo/PQCmkhhog= github.com/aws/aws-sdk-go-v2/service/s3 v1.88.1/go.mod h1:xajPTguLoeQMAOE44AAP2RQoUhF8ey1g5IFHARv71po= -github.com/aws/aws-sdk-go-v2/service/s3control v1.65.6 h1:eOHf8IowLgbcHyL5lkofjq9Oiwox62NZfJanQ+mFLhY= -github.com/aws/aws-sdk-go-v2/service/s3control v1.65.6/go.mod h1:AVQJ22NtzirbX3shogiVLeEuEsYaPEpXSel/GD8ALF8= +github.com/aws/aws-sdk-go-v2/service/s3control v1.66.0 h1:D9WB9VxwSlT4Xj00VDORofAteKEBdV4vZ85k4X61xyk= +github.com/aws/aws-sdk-go-v2/service/s3control v1.66.0/go.mod h1:AVQJ22NtzirbX3shogiVLeEuEsYaPEpXSel/GD8ALF8= github.com/aws/aws-sdk-go-v2/service/s3outposts v1.33.4 h1:GD28/y7URKoEGUS0OLSxnVl/j7zd7njJHzvKAKBuvA8= github.com/aws/aws-sdk-go-v2/service/s3outposts v1.33.4/go.mod h1:4KJY0ZwVCZFKfQBU3w7kgNG8LzLfcj/0G58soNebaec= github.com/aws/aws-sdk-go-v2/service/s3tables v1.10.3 h1:EdifhWi+JJJxF3cNWeam8camVWASGJrWl89ewbUvqhM= @@ -543,8 +543,8 @@ github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.35.3 h1:lG559VMq/SjLPgJ4 github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.35.3/go.mod h1:hEgxA1cAEctcJI458bb5OYbUna18HuOU0rlIYJsV5ac= github.com/aws/aws-sdk-go-v2/service/transcribe v1.52.4 h1:4JC0KVW1KO0h8iOrV+4aw6OcbevCPizyiblhnl+e4aM= github.com/aws/aws-sdk-go-v2/service/transcribe v1.52.4/go.mod h1:66IUhA3+gDSLwS9aFz9SH4544slFSSkxuMdiUCCPTgY= -github.com/aws/aws-sdk-go-v2/service/transfer v1.65.4 h1:WDZSB1l2MxHuLOeblYZdsgD3WgtioapYnQvplItIsbQ= -github.com/aws/aws-sdk-go-v2/service/transfer v1.65.4/go.mod h1:avf10drg2PsQEExButqDu6Uj3pvdVPaXA+0XDujNY1U= +github.com/aws/aws-sdk-go-v2/service/transfer v1.65.5 h1:7tNYT4dIDHWWPlcMpponb8mIqzDMpeiG0cxThWijMpo= +github.com/aws/aws-sdk-go-v2/service/transfer v1.65.5/go.mod h1:avf10drg2PsQEExButqDu6Uj3pvdVPaXA+0XDujNY1U= github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.29.2 h1:20JAmlxhN45SbHV2oXvdTJKURR+ZHCcTES3wQeOq8B4= github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.29.2/go.mod h1:jT4zf0DhyP4qrrWpgE/5huVRDsEXZUATErmvWB+U5DU= github.com/aws/aws-sdk-go-v2/service/vpclattice v1.18.3 h1:FtX5kYvSuq4y03jSuAX7nDsIqU5jNSb4c3iWLgmgFqA= From 7f567de02ee4777a2a416985e7f77171cc028dd5 Mon Sep 17 00:00:00 2001 From: Meg Ashby Date: Wed, 17 Sep 2025 14:52:32 -0400 Subject: [PATCH 57/57] =?UTF-8?q?make=20new=20reference=20for=20requestIns?= =?UTF-8?q?pection=20for=20ACFP=20to=20differentiate=20th=E2=80=A6=20(#442?= =?UTF-8?q?78)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update to make changes in diff files * rename the block & update anchor --- website/docs/r/wafv2_web_acl.html.markdown | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/website/docs/r/wafv2_web_acl.html.markdown b/website/docs/r/wafv2_web_acl.html.markdown index 5e04af1894ca..8aa8ae15db29 100644 --- a/website/docs/r/wafv2_web_acl.html.markdown +++ b/website/docs/r/wafv2_web_acl.html.markdown @@ -838,9 +838,18 @@ The `managed_rule_group_configs` block support the following arguments: * `creation_path` - (Required) The path of the account creation endpoint for your application. This is the page on your website that accepts the completed registration form for a new user. This page must accept POST requests. * `enable_regex_in_path` - (Optional) Whether or not to allow the use of regular expressions in the login page path. * `registration_page_path` - (Required) The path of the account registration endpoint for your application. This is the page on your website that presents the registration form to new users. This page must accept GET text/html requests. -* `request_inspection` - (Optional) The criteria for inspecting login requests, used by the ATP rule group to validate credentials usage. See [`request_inspection`](#request_inspection-block) for more details. +* `request_inspection` - (Optional) The criteria for inspecting login requests, used by the ATP rule group to validate credentials usage. See [`request_inspection`](#request_inspection-block-acfp) for more details. * `response_inspection` - (Optional) The criteria for inspecting responses to login requests, used by the ATP rule group to track login failure rates. Note that Response Inspection is available only on web ACLs that protect CloudFront distributions. See [`response_inspection`](#response_inspection-block) for more details. +### `request_inspection` Block (ACFP) + +* `addressFields` (Optional) The names of the fields in the request payload that contain your customer's primary physical address. See [`addressFields`](#address_fields-block) for more details. +* `emailField` (Optional) The name of the field in the request payload that contains your customer's email. See [`emailField`](#email_field-block) for more details. +* `passwordField` (Optional) Details about your login page password field. See [`passwordField`](#password_field-block) for more details. +* `payloadType` (Required) The payload type for your login endpoint, either JSON or form encoded. +* `phoneNumberFields` (Optional) The names of the fields in the request payload that contain your customer's primary phone number. See [`phoneNumberFields`](#phone_number_fields-block) for more details. +* `usernameField` (Optional) Details about your login page username field. See [`usernameField`](#username_field-block) for more details. + ### `aws_managed_rules_anti_ddos_rule_set` Block * `client_side_action_config` - (Required) Configuration for the request handling that's applied by the managed rule group rules `ChallengeAllDuringEvent` and `ChallengeDDoSRequests` during a distributed denial of service (DDoS) attack. See [`client_side_action_config`](#client_side_action_config-block) for more details. @@ -863,11 +872,8 @@ The `managed_rule_group_configs` block support the following arguments: ### `request_inspection` Block -* `address_fields` (Optional) The names of the fields in the request payload that contain your customer's primary physical address. See [`address_fields`](#address_fields-block) for more details. -* `email_field` (Optional) The name of the field in the request payload that contains your customer's email. See [`email_field`](#email_field-block) for more details. * `password_field` (Optional) Details about your login page password field. See [`password_field`](#password_field-block) for more details. * `payload_type` (Required) The payload type for your login endpoint, either JSON or form encoded. -* `phone_number_fields` (Optional) The names of the fields in the request payload that contain your customer's primary phone number. See [`phone_number_fields`](#phone_number_fields-block) for more details. * `username_field` (Optional) Details about your login page username field. See [`username_field`](#username_field-block) for more details. ### `address_fields` Block