Skip to content

Commit

Permalink
refactor(fw): terraform-plugin-framework v1.0.0 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jar-b committed Dec 19, 2022
1 parent 3b2025c commit 37de3e1
Show file tree
Hide file tree
Showing 12 changed files with 367 additions and 577 deletions.
10 changes: 1 addition & 9 deletions internal/acctest/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package acctest

import (
"context"
"errors"
"fmt"
"log"
"strings"
Expand Down Expand Up @@ -31,14 +30,7 @@ func DeleteFrameworkResource(factory func(context.Context) (fwresource.ResourceW
resource.Configure(ctx, fwresource.ConfigureRequest{ProviderData: meta}, &fwresource.ConfigureResponse{})

schemaResp := fwresource.SchemaResponse{}
if v, ok := resource.(fwresource.ResourceWithSchema); ok {
v.Schema(ctx, fwresource.SchemaRequest{}, &schemaResp)
if schemaResp.Diagnostics.HasError() {
return fwdiag.DiagnosticsError(schemaResp.Diagnostics)
}
} else {
return errors.New("resource does not implement Schema method")
}
resource.Schema(ctx, fwresource.SchemaRequest{}, &schemaResp)

// Construct a simple Framework State that contains just top-level attributes.
state := tfsdk.State{
Expand Down
3 changes: 0 additions & 3 deletions internal/framework/planmodifiers/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions internal/framework/planmodifiers/default_value.go

This file was deleted.

281 changes: 0 additions & 281 deletions internal/framework/planmodifiers/default_value_test.go

This file was deleted.

3 changes: 3 additions & 0 deletions internal/framework/stringplanmodifier/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Terraform Plugin Framework String Plan Modifiers

This package contains Terraform Plugin Framework [string plan modifiers](https://developer.hashicorp.com/terraform/plugin/framework/resources/plan-modification).
Loading

0 comments on commit 37de3e1

Please sign in to comment.