Skip to content

Commit

Permalink
fix: removed cluster_architecture.name
Browse files Browse the repository at this point in the history
  • Loading branch information
wai-wong-edb committed Jan 2, 2025
1 parent 1fc0375 commit 98ef149
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
4 changes: 0 additions & 4 deletions pkg/provider/data_source_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ func (c *clusterDataSource) Schema(ctx context.Context, req datasource.SchemaReq
Description: "Cluster architecture ID. For example, \"single\" or \"ha\".For Extreme High Availability clusters, please use the [biganimal_pgd](https://registry.terraform.io/providers/EnterpriseDB/biganimal/latest/docs/resources/pgd) resource.",
Required: true,
},
"name": schema.StringAttribute{
Description: "Name.",
Computed: true,
},
"nodes": schema.Float64Attribute{
Description: "Node count.",
Required: true,
Expand Down
10 changes: 2 additions & 8 deletions pkg/provider/resource_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ type ClusterResourceModel struct {
}

type ClusterArchitectureResourceModel struct {
Id string `tfsdk:"id"`
Name types.String `tfsdk:"name"`
Nodes int `tfsdk:"nodes"`
Id string `tfsdk:"id"`
Nodes int `tfsdk:"nodes"`
}

type StorageResourceModel struct {
Expand Down Expand Up @@ -202,10 +201,6 @@ func (c *clusterResource) Schema(ctx context.Context, req resource.SchemaRequest
Required: true,
PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()},
},
"name": schema.StringAttribute{
Description: "Name.",
Computed: true,
},
"nodes": schema.Float64Attribute{
Description: "Node count.",
Required: true,
Expand Down Expand Up @@ -841,7 +836,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 98ef149

Please sign in to comment.