Skip to content

Commit

Permalink
fix: deprecated cluster_architecture.name
Browse files Browse the repository at this point in the history
  • Loading branch information
wai-wong-edb committed Jan 3, 2025
1 parent 1fc0375 commit 41e730c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
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 41e730c

Please sign in to comment.