Skip to content

Commit

Permalink
Merge pull request #53 from pluralsh/marcin/prod-2536-cluster-name-ch…
Browse files Browse the repository at this point in the history
…anges-should-not-force-replacement-in-tf

feat: Allow cluster name updates
  • Loading branch information
maciaszczykm authored Aug 22, 2024
2 parents 4fd34ce + 2f6eb7c commit aec39c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/resource/cluster_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func (c *cluster) Attributes(ctx context.Context, d diag.Diagnostics) console.Cl

func (c *cluster) UpdateAttributes(ctx context.Context, d diag.Diagnostics) console.ClusterUpdateAttributes {
return console.ClusterUpdateAttributes{
Name: c.Name.ValueStringPointer(),
// Version: c.Version.ValueStringPointer(),
Handle: c.Handle.ValueStringPointer(),
Protect: c.Protect.ValueBoolPointer(),
Expand Down
2 changes: 1 addition & 1 deletion internal/resource/cluster_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (r *clusterResource) schema() schema.Schema {
Description: "Human-readable name of this cluster, that also translates to cloud resource name.",
MarkdownDescription: "Human-readable name of this cluster, that also translates to cloud resource name.",
Required: true,
PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace()},
PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()},
},
"handle": schema.StringAttribute{
Description: "A short, unique human-readable name used to identify this cluster. Does not necessarily map to the cloud resource name.",
Expand Down

0 comments on commit aec39c8

Please sign in to comment.