mirror of https://github.com/databricks/cli.git
Fix test failure based on code from main
This commit is contained in:
parent
7911c672ba
commit
65bad56e10
|
@ -92,6 +92,12 @@ func (r *Resources) AllResources() map[string]map[string]ConfigResource {
|
|||
}
|
||||
result["schemas"] = schemaResources
|
||||
|
||||
clusterResources := make(map[string]ConfigResource)
|
||||
for key, schema := range r.Clusters {
|
||||
clusterResources[key] = schema
|
||||
}
|
||||
result["clusters"] = clusterResources
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ type Cluster struct {
|
|||
ID string `json:"id,omitempty" bundle:"readonly"`
|
||||
Permissions []Permission `json:"permissions,omitempty"`
|
||||
ModifiedStatus ModifiedStatus `json:"modified_status,omitempty" bundle:"internal"`
|
||||
URL string `json:"url,omitempty" bundle:"internal"`
|
||||
|
||||
*compute.ClusterSpec
|
||||
}
|
||||
|
@ -37,3 +38,18 @@ func (s *Cluster) Exists(ctx context.Context, w *databricks.WorkspaceClient, id
|
|||
func (s *Cluster) TerraformResourceName() string {
|
||||
return "databricks_cluster"
|
||||
}
|
||||
|
||||
func (s *Cluster) InitializeURL(urlPrefix string, urlSuffix string) {
|
||||
if s.ID == "" {
|
||||
return
|
||||
}
|
||||
s.URL = urlPrefix + "compute/clusters/" + s.ID + urlSuffix
|
||||
}
|
||||
|
||||
func (s *Cluster) GetName() string {
|
||||
return s.ClusterName
|
||||
}
|
||||
|
||||
func (s *Cluster) GetURL() string {
|
||||
return s.URL
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue