Skip to content

Commit

Permalink
Error out on search attribute type change (#175)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Lacefield <jlacefie@gmail.com>
Co-authored-by: Brian Kassouf <briankassouf@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 18, 2024
1 parent eb294b3 commit 0dbdc35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/provider/namespace_search_attribute_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,6 @@ func (m searchAttrTypePlanModifier) PlanModifyString(ctx context.Context, req pl
resp.PlanValue = req.StateValue
return
}
// Its a change in the value, update the response accordingly.
resp.PlanValue = types.StringValue(req.PlanValue.ValueString())
// Its a change in the value, we don't allow changing the search attribute type, error out
resp.Diagnostics.AddError("Search attribute type change not allowed", "Changing the search attribute type is not allowed.")
}

0 comments on commit 0dbdc35

Please sign in to comment.