@@ -5,7 +5,6 @@ package odb
55import (
66 "context"
77 "errors"
8- "fmt"
98 "time"
109
1110 "github.com/aws/aws-sdk-go-v2/aws"
@@ -24,16 +23,13 @@ import (
2423 "github.com/hashicorp/terraform-plugin-framework/schema/validator"
2524 "github.com/hashicorp/terraform-plugin-framework/types"
2625 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
27- "github.com/hashicorp/terraform-provider-aws/internal/conns"
2826 "github.com/hashicorp/terraform-provider-aws/internal/create"
2927 "github.com/hashicorp/terraform-provider-aws/internal/enum"
3028 "github.com/hashicorp/terraform-provider-aws/internal/errs"
3129 "github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag"
3230 "github.com/hashicorp/terraform-provider-aws/internal/framework"
3331 "github.com/hashicorp/terraform-provider-aws/internal/framework/flex"
3432 fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types"
35- "github.com/hashicorp/terraform-provider-aws/internal/sweep"
36- sweepfw "github.com/hashicorp/terraform-provider-aws/internal/sweep/framework"
3733 tftags "github.com/hashicorp/terraform-provider-aws/internal/tags"
3834 "github.com/hashicorp/terraform-provider-aws/internal/tfresource"
3935 "github.com/hashicorp/terraform-provider-aws/names"
@@ -240,13 +236,13 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res
240236 "compute_model" : schema.StringAttribute {
241237 CustomType : computeModelType ,
242238 Computed : true ,
243- Description : fmt . Sprint ( "The OCI model compute model used when you create or clone an\n " +
239+ Description : "The OCI model compute model used when you create or clone an\n " +
244240 " instance: ECPU or OCPU. An ECPU is an abstracted measure of\n " +
245241 "compute resources. ECPUs are based on the number of cores\n " +
246242 "elastically allocated from a pool of compute and storage servers.\n " +
247243 " An OCPU is a legacy physical measure of compute resources. OCPUs\n " +
248244 "are based on the physical core of a processor with\n " +
249- " hyper-threading enabled." ) ,
245+ " hyper-threading enabled." ,
250246 },
251247 "customer_contacts_to_send_to_oci" : schema.SetAttribute {
252248 CustomType : fwtypes.NewSetNestedObjectTypeOf [customerContactExaInfraResourceModel ](ctx ),
@@ -403,7 +399,6 @@ func (r *resourceCloudExadataInfrastructure) Read(ctx context.Context, req resou
403399}
404400
405401func (r * resourceCloudExadataInfrastructure ) Update (ctx context.Context , req resource.UpdateRequest , resp * resource.UpdateResponse ) {
406-
407402 var plan , state cloudExadataInfrastructureResourceModel
408403 resp .Diagnostics .Append (req .Plan .Get (ctx , & plan )... )
409404 resp .Diagnostics .Append (req .State .Get (ctx , & state )... )
@@ -436,9 +431,7 @@ func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req res
436431 )
437432 return
438433 }
439-
440434 }
441-
442435 updateTimeout := r .UpdateTimeout (ctx , plan .Timeouts )
443436 updatedExaInfra , err := waitCloudExadataInfrastructureUpdated (ctx , conn , state .CloudExadataInfrastructureId .ValueString (), updateTimeout )
444437 if err != nil {
@@ -450,7 +443,6 @@ func (r *resourceCloudExadataInfrastructure) Update(ctx context.Context, req res
450443 }
451444 resp .Diagnostics .Append (flex .Flatten (ctx , updatedExaInfra , & plan )... )
452445 resp .Diagnostics .Append (resp .State .Set (ctx , & plan )... )
453-
454446}
455447
456448func (r * resourceCloudExadataInfrastructure ) Delete (ctx context.Context , req resource.DeleteRequest , resp * resource.DeleteResponse ) {
@@ -650,25 +642,3 @@ type monthExaInfraMaintenanceWindowResourceModel struct {
650642type customerContactExaInfraResourceModel struct {
651643 Email types.String `tfsdk:"email"`
652644}
653-
654- func sweepCloudExadataInfrastructures (ctx context.Context , client * conns.AWSClient ) ([]sweep.Sweepable , error ) {
655- input := odb.ListCloudExadataInfrastructuresInput {}
656- conn := client .ODBClient (ctx )
657- var sweepResources []sweep.Sweepable
658-
659- pages := odb .NewListCloudExadataInfrastructuresPaginator (conn , & input )
660- for pages .HasMorePages () {
661- page , err := pages .NextPage (ctx )
662- if err != nil {
663- return nil , err
664- }
665-
666- for _ , v := range page .CloudExadataInfrastructures {
667- sweepResources = append (sweepResources , sweepfw .NewSweepResource (newResourceCloudExadataInfrastructure , client ,
668- sweepfw .NewAttribute (names .AttrID , aws .ToString (v .CloudExadataInfrastructureId ))),
669- )
670- }
671- }
672-
673- return sweepResources , nil
674- }
0 commit comments