Skip to content

Commit

Permalink
fix: removed cluster_architecture.name (#612)
Browse files Browse the repository at this point in the history
* fix: deprecated cluster_architecture.name

* fix: removed unnecessary clusterArchitectureName from payload
  • Loading branch information
wai-wong-edb authored Jan 3, 2025
1 parent 1fc0375 commit f7854de
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
5 changes: 2 additions & 3 deletions pkg/models/architecture.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package models

type Architecture struct {
ClusterArchitectureId string `json:"clusterArchitectureId" mapstructure:"id"`
ClusterArchitectureName string `json:"clusterArchitectureName,omitempty"`
Nodes int `json:"nodes" mapstructure:"nodes"`
ClusterArchitectureId string `json:"clusterArchitectureId" mapstructure:"id"`
Nodes int `json:"nodes" mapstructure:"nodes"`
}
6 changes: 4 additions & 2 deletions pkg/provider/data_source_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ func (c *clusterDataSource) Schema(ctx context.Context, req datasource.SchemaReq
Required: true,
},
"name": schema.StringAttribute{
Description: "Name.",
Computed: true,
Description: "Name.",
Optional: true,
Sensitive: true,
DeprecationMessage: "This field is deprecated and will be removed in a future release.",
},
"nodes": schema.Float64Attribute{
Description: "Node count.",
Expand Down
7 changes: 4 additions & 3 deletions pkg/provider/resource_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@ func (c *clusterResource) Schema(ctx context.Context, req resource.SchemaRequest
PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()},
},
"name": schema.StringAttribute{
Description: "Name.",
Computed: true,
Description: "Name.",
Optional: true,
Sensitive: true,
DeprecationMessage: "This field is deprecated and will be removed in a future release.",
},
"nodes": schema.Float64Attribute{
Description: "Node count.",
Expand Down Expand Up @@ -841,7 +843,6 @@ func readCluster(ctx context.Context, client *api.ClusterClient, tfClusterResour
tfClusterResource.ClusterArchitecture = &ClusterArchitectureResourceModel{
Id: responseCluster.ClusterArchitecture.ClusterArchitectureId,
Nodes: responseCluster.ClusterArchitecture.Nodes,
Name: types.StringValue(responseCluster.ClusterArchitecture.ClusterArchitectureName),
}
tfClusterResource.Region = types.StringValue(responseCluster.Region.Id)
tfClusterResource.InstanceType = types.StringValue(responseCluster.InstanceType.InstanceTypeId)
Expand Down
1 change: 0 additions & 1 deletion pkg/provider/resource_fareplica.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,6 @@ func readFAReplica(ctx context.Context, client *api.ClusterClient, fAReplicaReso
fAReplicaResourceModel.ClusterArchitecture = &ClusterArchitectureResourceModel{
Id: responseCluster.ClusterArchitecture.ClusterArchitectureId,
Nodes: responseCluster.ClusterArchitecture.Nodes,
Name: types.StringValue(responseCluster.ClusterArchitecture.ClusterArchitectureName),
}
fAReplicaResourceModel.ClusterType = responseCluster.ClusterType
fAReplicaResourceModel.CloudProvider = types.StringValue(responseCluster.Provider.CloudProviderId)
Expand Down

0 comments on commit f7854de

Please sign in to comment.