Skip to content

Commit

Permalink
Make linter happy & remove redundant &schema.Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
nfx committed Jun 14, 2020
1 parent fb4a680 commit fdb9b3d
Show file tree
Hide file tree
Showing 28 changed files with 182 additions and 182 deletions.
8 changes: 4 additions & 4 deletions databricks/data_source_databricks_dbfs_file.go
Expand Up @@ -9,22 +9,22 @@ func dataSourceDBFSFile() *schema.Resource {
return &schema.Resource{
Read: dataSourceDBFSFileRead,
Schema: map[string]*schema.Schema{
"path": &schema.Schema{
"path": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"limit_file_size": &schema.Schema{
"limit_file_size": {
Type: schema.TypeBool,
Required: true,
ForceNew: true,
},
"content": &schema.Schema{
"content": {
Type: schema.TypeString,
Computed: true,
ForceNew: true,
},
"file_size": &schema.Schema{
"file_size": {
Type: schema.TypeInt,
Computed: true,
},
Expand Down
6 changes: 3 additions & 3 deletions databricks/data_source_databricks_dbfs_file_paths.go
Expand Up @@ -9,17 +9,17 @@ func dataSourceDBFSFilePaths() *schema.Resource {
return &schema.Resource{
Read: dataSourceDBFSFilePathsRead,
Schema: map[string]*schema.Schema{
"path": &schema.Schema{
"path": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"recursive": &schema.Schema{
"recursive": {
Type: schema.TypeBool,
Required: true,
ForceNew: true,
},
"path_list": &schema.Schema{
"path_list": {
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Resource{
Expand Down
4 changes: 2 additions & 2 deletions databricks/data_source_databricks_default_user_roles.go
Expand Up @@ -25,12 +25,12 @@ func dataSourceDefaultUserRoles() *schema.Resource {
return err
},
Schema: map[string]*schema.Schema{
"default_username": &schema.Schema{
"default_username": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"roles": &schema.Schema{
"roles": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
Expand Down
12 changes: 6 additions & 6 deletions databricks/data_source_databricks_notebook.go
Expand Up @@ -12,12 +12,12 @@ func dataSourceNotebook() *schema.Resource {
Read: dataSourceNotebookRead,
Schema: map[string]*schema.Schema{

"path": &schema.Schema{
"path": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"format": &schema.Schema{
"format": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Expand All @@ -27,19 +27,19 @@ func dataSourceNotebook() *schema.Resource {
string(model.HTML),
}, false),
},
"content": &schema.Schema{
"content": {
Type: schema.TypeString,
Computed: true,
},
"language": &schema.Schema{
"language": {
Type: schema.TypeString,
Computed: true,
},
"object_type": &schema.Schema{
"object_type": {
Type: schema.TypeString,
Computed: true,
},
"object_id": &schema.Schema{
"object_id": {
Type: schema.TypeInt,
Computed: true,
},
Expand Down
6 changes: 3 additions & 3 deletions databricks/data_source_databricks_notebook_paths.go
Expand Up @@ -12,17 +12,17 @@ func dataSourceNotebookPaths() *schema.Resource {
Read: dataSourceNotebookPathsRead,
Schema: map[string]*schema.Schema{

"path": &schema.Schema{
"path": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"recursive": &schema.Schema{
"recursive": {
Type: schema.TypeBool,
Required: true,
ForceNew: true,
},
"notebook_path_list": &schema.Schema{
"notebook_path_list": {
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Resource{
Expand Down
4 changes: 2 additions & 2 deletions databricks/data_source_databricks_zones.go
Expand Up @@ -24,12 +24,12 @@ func dataSourceClusterZones() *schema.Resource {
return err
},
Schema: map[string]*schema.Schema{
"default_zone": &schema.Schema{
"default_zone": {
Type: schema.TypeString,
Computed: true,
ForceNew: true,
},
"zones": &schema.Schema{
"zones": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
Expand Down
16 changes: 8 additions & 8 deletions databricks/provider.go
Expand Up @@ -50,30 +50,30 @@ func Provider(version string) terraform.ResourceProvider {
"databricks_mws_workspaces": resourceMWSWorkspaces(),
},
Schema: map[string]*schema.Schema{
"host": &schema.Schema{
"host": {
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("DATABRICKS_HOST", nil),
},
"token": &schema.Schema{
"token": {
Type: schema.TypeString,
Optional: true,
Sensitive: true,
DefaultFunc: schema.EnvDefaultFunc("DATABRICKS_TOKEN", nil),
ConflictsWith: []string{"basic_auth"},
},
"basic_auth": &schema.Schema{
"basic_auth": {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"username": &schema.Schema{
"username": {
Type: schema.TypeString,
Required: true,
DefaultFunc: schema.EnvDefaultFunc("DATABRICKS_USERNAME", nil),
},
"password": &schema.Schema{
"password": {
Type: schema.TypeString,
Sensitive: true,
Required: true,
Expand All @@ -83,7 +83,7 @@ func Provider(version string) terraform.ResourceProvider {
},
ConflictsWith: []string{"token"},
},
"config_file": &schema.Schema{
"config_file": {
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("DATABRICKS_CONFIG_FILE", "~/.databrickscfg"),
Expand All @@ -92,14 +92,14 @@ func Provider(version string) terraform.ResourceProvider {
"in ~/.databrickscfg. Check https://docs.databricks.com/dev-tools/cli/index.html#set-up-authentication for docs. Config\n" +
"file credetials will only be used when host/token are not provided.",
},
"profile": &schema.Schema{
"profile": {
Type: schema.TypeString,
Optional: true,
Default: "DEFAULT",
Description: "Connection profile specified within ~/.databrickscfg. Please check\n" +
"https://docs.databricks.com/dev-tools/cli/index.html#connection-profiles for documentation.",
},
"azure_auth": &schema.Schema{
"azure_auth": {
Type: schema.TypeMap,
Optional: true,
Elem: &schema.Resource{
Expand Down
2 changes: 1 addition & 1 deletion databricks/resource_databricks_aws_s3_mount.go
Expand Up @@ -12,7 +12,7 @@ func resourceAWSS3Mount() *schema.Resource {
Delete: resourceAWSS3Delete,

Schema: map[string]*schema.Schema{
"cluster_id": &schema.Schema{
"cluster_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Expand Down
2 changes: 1 addition & 1 deletion databricks/resource_databricks_azure_adls_gen1_mount.go
Expand Up @@ -17,7 +17,7 @@ func resourceAzureAdlsGen1Mount() *schema.Resource {
Delete: resourceAzureAdlsGen1Delete,

Schema: map[string]*schema.Schema{
"cluster_id": &schema.Schema{
"cluster_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Expand Down
2 changes: 1 addition & 1 deletion databricks/resource_databricks_azure_adls_gen2_mount.go
Expand Up @@ -16,7 +16,7 @@ func resourceAzureAdlsGen2Mount() *schema.Resource {
Delete: resourceAzureAdlsGen2Delete,

Schema: map[string]*schema.Schema{
"cluster_id": &schema.Schema{
"cluster_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Expand Down
2 changes: 1 addition & 1 deletion databricks/resource_databricks_azure_blob_mount.go
Expand Up @@ -17,7 +17,7 @@ func resourceAzureBlobMount() *schema.Resource {
Delete: resourceAzureBlobMountDelete,

Schema: map[string]*schema.Schema{
"cluster_id": &schema.Schema{
"cluster_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Expand Down

0 comments on commit fdb9b3d

Please sign in to comment.