Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardfeng-db committed Jan 8, 2024
1 parent 3eb2e0b commit 23717a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 346 deletions.
250 changes: 0 additions & 250 deletions clusters/resource_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,256 +166,6 @@ func (ClusterResourceProvider) CustomizeSchema(s map[string]*schema.Schema) map[
return s
}

func (ClusterResourceProvider) TfOverlay() map[string]*schema.Schema {
return map[string]*schema.Schema{
// "runtime_engine": {
// ValidateFunc: validation.StringInSlice([]string{"PHOTON", "STANDARD"}, false),
// },
// "is_pinned": {
// Type: schema.TypeBool,
// Optional: true,
// Default: false,
// DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
// if old == "" && new == "false" {
// return true
// }
// return old == new
// },
// },
// "state": {
// Type: schema.TypeString,
// Computed: true,
// Optional: false, // Explicitly set it to override the value from StructToSchema
// },
// "default_tags": {
// Type: schema.TypeMap,
// Computed: true,
// Optional: false, // Explicitly set it to override the value from StructToSchema
// },
// "num_workers": {
// Type: schema.TypeInt,
// Optional: true,
// Default: 0,
// ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(0)),
// },
// "url": {
// Type: schema.TypeString,
// Computed: true,
// },
// "cluster_mount_info": {
// Type: schema.TypeList,
// Optional: true,
// Elem: &schema.Resource{
// Schema: common.StructToSchema(MountInfo{}, func(ss map[string]*schema.Schema) map[string]*schema.Schema {
// return ss
// }),
// },
// },
// "enable_elastic_disk": {
// Computed: true,
// },
// "enable_local_disk_encryption": {
// Computed: true,
// },
// "node_type_id": {
// ConflictsWith: []string{"driver_instance_pool_id", "instance_pool_id"},
// Computed: true,
// },
// "driver_node_type_id": {
// ConflictsWith: []string{"driver_instance_pool_id", "instance_pool_id"},
// Computed: true,
// },
// "driver_instance_pool_id": {
// ConflictsWith: []string{"driver_node_type_id", "node_type_id"},
// Computed: true,
// },
// "ssh_public_keys": {
// MaxItems: 10,
// },
// "init_scripts": {
// MaxItems: 10,
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "dbfs": {
// Deprecated: DbfsDeprecationWarning,
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "destination": {
// Required: true,
// },
// },
// },
// },
// "s3": {
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "destination": {
// Required: true,
// },
// },
// },
// },
// "abfss": common.StructToSchema(InitScriptStorageInfo{}, func(ss map[string]*schema.Schema) map[string]*schema.Schema {
// return ss
// })["abfss"],
// "gcs": common.StructToSchema(InitScriptStorageInfo{}, func(ss map[string]*schema.Schema) map[string]*schema.Schema {
// return ss
// })["gcs"],
// },
// },
// },
// "workload_type": {
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "clients": {
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "notebooks": {
// Optional: true,
// Default: true,
// },
// "jobs": {
// Optional: true,
// Default: true,
// },
// },
// },
// Required: true,
// },
// },
// },
// },
// "idempotency_token": {
// Type: schema.TypeString,
// Optional: true,
// ForceNew: true,
// },
// "data_security_mode": {
// DiffSuppressFunc: common.GetDiffSuppressor(""),
// },
// "docker_image": {
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "url": {
// Required: true,
// },
// "basic_auth": {
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "password": {
// Sensitive: true,
// Required: true,
// },
// "username": {
// Required: true,
// },
// },
// },
// },
// },
// },
// },
// "spark_conf": {
// DiffSuppressFunc: SparkConfDiffSuppressFunc,
// },
// "aws_attributes": {
// DiffSuppressFunc: common.MakeEmptyBlockSuppressFuncNoRegex(),
// ConflictsWith: []string{"azure_attributes", "gcp_attributes"},
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "zone_id": {
// DiffSuppressFunc: ZoneDiffSuppress,
// },
// },
// },
// },
// "azure_attributes": {
// DiffSuppressFunc: common.MakeEmptyBlockSuppressFuncNoRegex(),
// ConflictsWith: []string{"aws_attributes", "gcp_attributes"},
// },
// "gcp_attributes": {
// DiffSuppressFunc: common.MakeEmptyBlockSuppressFuncNoRegex(),
// ConflictsWith: []string{"azure_attributes", "aws_attributes"},
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "use_preemptible_executors": {
// Type: schema.TypeBool,
// Optional: true,
// Deprecated: "Please use 'availability' instead.",
// },
// "zone_id": {
// Type: schema.TypeString,
// Optional: true,
// },
// },
// },
// },
// "library": common.StructToSchema(libraries.ClusterLibraryList{},
// func(ss map[string]*schema.Schema) map[string]*schema.Schema {
// ss["library"].Set = func(i any) int {
// lib := libraries.NewLibraryFromInstanceState(i)
// return schema.HashString(lib.String())
// }
// return ss
// })["library"],
// "autotermination_minutes": {
// Default: 60,
// },
// "autoscale": {
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "max_workers": {
// Optional: true,
// },
// "min_workers": {
// Optional: true,
// },
// },
// },
// },
// "apply_policy_default_values": {
// Optional: true,
// Type: schema.TypeBool,
// },
// "cluster_log_conf": {
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "dbfs": {
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "destination": {
// Required: true,
// },
// },
// },
// },
// "s3": {
// Elem: &schema.Resource{
// Schema: map[string]*schema.Schema{
// "destination": {
// Required: true,
// },
// },
// },
// },
// },
// },
// },
// "spark_version": {
// Required: true,
// },
// "cluster_id": {
// Type: schema.TypeString,
// Optional: true,
// Computed: true,
// },
// "instance_pool_id": {
// ConflictsWith: []string{"driver_node_type_id", "node_type_id"},
// },

}
}

func resourceClusterSchema() map[string]*schema.Schema {
return common.ResourceProviderStructToSchema[compute.ClusterDetails](ClusterResourceProvider{})
}
Expand Down
Loading

0 comments on commit 23717a5

Please sign in to comment.