From f171c38ff4dca9a6b169daa4c1295c732d1cff4e Mon Sep 17 00:00:00 2001 From: Andrew Tulloch Date: Thu, 26 Sep 2024 12:18:41 +0100 Subject: [PATCH] Github checks fixes --- .../transitgateway_default_route_table_association.go | 9 ++++----- ...gateway_default_route_table_association.html.markdown | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/service/ec2/transitgateway_default_route_table_association.go b/internal/service/ec2/transitgateway_default_route_table_association.go index c65a63be307..5507c27c159 100644 --- a/internal/service/ec2/transitgateway_default_route_table_association.go +++ b/internal/service/ec2/transitgateway_default_route_table_association.go @@ -8,7 +8,6 @@ import ( "errors" "time" - "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/ec2" awstypes "github.com/aws/aws-sdk-go-v2/service/ec2/types" "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" @@ -52,7 +51,7 @@ func (r *resourceTransitgatewayDefaultRouteTableAssociation) Metadata(_ context. func (r *resourceTransitgatewayDefaultRouteTableAssociation) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ Attributes: map[string]schema.Attribute{ - "id": framework.IDAttribute(), + names.AttrID: framework.IDAttribute(), "original_route_table_id": schema.StringAttribute{ Computed: true, }, @@ -67,7 +66,7 @@ func (r *resourceTransitgatewayDefaultRouteTableAssociation) Schema(ctx context. }, }, Blocks: map[string]schema.Block{ - "timeouts": timeouts.Block(ctx, timeouts.Opts{ + names.AttrTimeouts: timeouts.Block(ctx, timeouts.Opts{ Create: true, Update: true, Delete: true, @@ -174,9 +173,9 @@ func (r *resourceTransitgatewayDefaultRouteTableAssociation) Update(ctx context. if !plan.RouteTableId.Equal(state.RouteTableId) { in := &ec2.ModifyTransitGatewayInput{ - TransitGatewayId: aws.String(state.ID.ValueString()), + TransitGatewayId: state.ID.ValueStringPointer(), Options: &awstypes.ModifyTransitGatewayOptions{ - AssociationDefaultRouteTableId: flex.StringFromFramework(ctx, plan.RouteTableId), + AssociationDefaultRouteTableId: plan.RouteTableId.ValueStringPointer(), }, } diff --git a/website/docs/r/ec2_transit_gateway_default_route_table_association.html.markdown b/website/docs/r/ec2_transit_gateway_default_route_table_association.html.markdown index dbc53ddbf31..691f63b0cb1 100644 --- a/website/docs/r/ec2_transit_gateway_default_route_table_association.html.markdown +++ b/website/docs/r/ec2_transit_gateway_default_route_table_association.html.markdown @@ -15,7 +15,7 @@ Terraform resource for managing an AWS EC2 (Elastic Compute Cloud) Transit Gatew ```terraform resource "aws_ec2_transit_gateway_default_route_table_association" "example" { - transit_gateway_id = aws_ec2_transit_gateway.example.id + transit_gateway_id = aws_ec2_transit_gateway.example.id transit_gateway_route_table_id = aws_ec2_transit_gateway_route_table.example.id } ```