Skip to content

Commit

Permalink
Add RequiresReplace to attributes that can't be modified by update
Browse files Browse the repository at this point in the history
  • Loading branch information
drewtul committed Oct 2, 2024
1 parent 2b0ad37 commit 58bb18f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/service/bedrockagent/knowledge_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"context"
"errors"
"fmt"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier"
"time"

"github.com/aws/aws-sdk-go-v2/aws"
Expand Down Expand Up @@ -102,6 +103,9 @@ func (r *knowledgeBaseResource) Schema(ctx context.Context, request resource.Sch
listvalidator.SizeAtLeast(1),
listvalidator.SizeAtMost(1),
},
PlanModifiers: []planmodifier.List{
listplanmodifier.RequiresReplace(),
},
NestedObject: schema.NestedBlockObject{
Attributes: map[string]schema.Attribute{
names.AttrType: schema.StringAttribute{
Expand Down Expand Up @@ -135,6 +139,9 @@ func (r *knowledgeBaseResource) Schema(ctx context.Context, request resource.Sch
listvalidator.SizeAtLeast(1),
listvalidator.SizeAtMost(1),
},
PlanModifiers: []planmodifier.List{
listplanmodifier.RequiresReplace(),
},
NestedObject: schema.NestedBlockObject{
Attributes: map[string]schema.Attribute{
names.AttrType: schema.StringAttribute{
Expand Down

0 comments on commit 58bb18f

Please sign in to comment.