From 0f993bb96e76da5d8bd2dcf3da5da91f23684529 Mon Sep 17 00:00:00 2001 From: Sri Tikkireddy Date: Tue, 20 Jun 2023 17:11:21 -0400 Subject: [PATCH] ran the latest code gen for getting run_as variable --- .../tf/schema/data_source_cluster_policy.go | 12 +++++++---- bundle/internal/tf/schema/data_source_job.go | 7 +++++++ bundle/internal/tf/schema/resource_catalog.go | 21 ++++++++++--------- .../tf/schema/resource_external_location.go | 2 ++ bundle/internal/tf/schema/resource_job.go | 6 ++++++ .../tf/schema/resource_model_serving.go | 7 ++++--- .../tf/schema/resource_permissions.go | 1 + .../tf/schema/resource_storage_credential.go | 1 + bundle/internal/tf/schema/resource_volume.go | 14 +++++++++++++ bundle/internal/tf/schema/resources.go | 2 ++ 10 files changed, 56 insertions(+), 17 deletions(-) create mode 100644 bundle/internal/tf/schema/resource_volume.go diff --git a/bundle/internal/tf/schema/data_source_cluster_policy.go b/bundle/internal/tf/schema/data_source_cluster_policy.go index d4e7cdc6d..cc224b800 100644 --- a/bundle/internal/tf/schema/data_source_cluster_policy.go +++ b/bundle/internal/tf/schema/data_source_cluster_policy.go @@ -3,8 +3,12 @@ package schema type DataSourceClusterPolicy struct { - Definition string `json:"definition,omitempty"` - Id string `json:"id,omitempty"` - MaxClustersPerUser int `json:"max_clusters_per_user,omitempty"` - Name string `json:"name,omitempty"` + Definition string `json:"definition,omitempty"` + Description string `json:"description,omitempty"` + Id string `json:"id,omitempty"` + IsDefault bool `json:"is_default,omitempty"` + MaxClustersPerUser int `json:"max_clusters_per_user,omitempty"` + Name string `json:"name,omitempty"` + PolicyFamilyDefinitionOverrides string `json:"policy_family_definition_overrides,omitempty"` + PolicyFamilyId string `json:"policy_family_id,omitempty"` } diff --git a/bundle/internal/tf/schema/data_source_job.go b/bundle/internal/tf/schema/data_source_job.go index 204ce97cc..ec0aa6f57 100644 --- a/bundle/internal/tf/schema/data_source_job.go +++ b/bundle/internal/tf/schema/data_source_job.go @@ -388,6 +388,11 @@ type DataSourceJobJobSettingsSettingsPythonWheelTask struct { type DataSourceJobJobSettingsSettingsQueue struct { } +type DataSourceJobJobSettingsSettingsRunAs struct { + ServicePrincipalName string `json:"service_principal_name,omitempty"` + UserName string `json:"user_name,omitempty"` +} + type DataSourceJobJobSettingsSettingsSchedule struct { PauseStatus string `json:"pause_status,omitempty"` QuartzCronExpression string `json:"quartz_cron_expression"` @@ -740,6 +745,7 @@ type DataSourceJobJobSettingsSettings struct { PipelineTask *DataSourceJobJobSettingsSettingsPipelineTask `json:"pipeline_task,omitempty"` PythonWheelTask *DataSourceJobJobSettingsSettingsPythonWheelTask `json:"python_wheel_task,omitempty"` Queue *DataSourceJobJobSettingsSettingsQueue `json:"queue,omitempty"` + RunAs *DataSourceJobJobSettingsSettingsRunAs `json:"run_as,omitempty"` Schedule *DataSourceJobJobSettingsSettingsSchedule `json:"schedule,omitempty"` SparkJarTask *DataSourceJobJobSettingsSettingsSparkJarTask `json:"spark_jar_task,omitempty"` SparkPythonTask *DataSourceJobJobSettingsSettingsSparkPythonTask `json:"spark_python_task,omitempty"` @@ -753,6 +759,7 @@ type DataSourceJobJobSettings struct { CreatedTime int `json:"created_time,omitempty"` CreatorUserName string `json:"creator_user_name,omitempty"` JobId int `json:"job_id,omitempty"` + RunAsUserName string `json:"run_as_user_name,omitempty"` Settings *DataSourceJobJobSettingsSettings `json:"settings,omitempty"` } diff --git a/bundle/internal/tf/schema/resource_catalog.go b/bundle/internal/tf/schema/resource_catalog.go index 10b1c831a..0ae591145 100644 --- a/bundle/internal/tf/schema/resource_catalog.go +++ b/bundle/internal/tf/schema/resource_catalog.go @@ -3,14 +3,15 @@ package schema type ResourceCatalog struct { - Comment string `json:"comment,omitempty"` - ForceDestroy bool `json:"force_destroy,omitempty"` - Id string `json:"id,omitempty"` - MetastoreId string `json:"metastore_id,omitempty"` - Name string `json:"name"` - Owner string `json:"owner,omitempty"` - Properties map[string]string `json:"properties,omitempty"` - ProviderName string `json:"provider_name,omitempty"` - ShareName string `json:"share_name,omitempty"` - StorageRoot string `json:"storage_root,omitempty"` + Comment string `json:"comment,omitempty"` + ForceDestroy bool `json:"force_destroy,omitempty"` + Id string `json:"id,omitempty"` + IsolationMode string `json:"isolation_mode,omitempty"` + MetastoreId string `json:"metastore_id,omitempty"` + Name string `json:"name"` + Owner string `json:"owner,omitempty"` + Properties map[string]string `json:"properties,omitempty"` + ProviderName string `json:"provider_name,omitempty"` + ShareName string `json:"share_name,omitempty"` + StorageRoot string `json:"storage_root,omitempty"` } diff --git a/bundle/internal/tf/schema/resource_external_location.go b/bundle/internal/tf/schema/resource_external_location.go index c1955f31f..24e3fd0a2 100644 --- a/bundle/internal/tf/schema/resource_external_location.go +++ b/bundle/internal/tf/schema/resource_external_location.go @@ -5,10 +5,12 @@ package schema type ResourceExternalLocation struct { Comment string `json:"comment,omitempty"` CredentialName string `json:"credential_name"` + ForceDestroy bool `json:"force_destroy,omitempty"` Id string `json:"id,omitempty"` MetastoreId string `json:"metastore_id,omitempty"` Name string `json:"name"` Owner string `json:"owner,omitempty"` + ReadOnly bool `json:"read_only,omitempty"` SkipValidation bool `json:"skip_validation,omitempty"` Url string `json:"url"` } diff --git a/bundle/internal/tf/schema/resource_job.go b/bundle/internal/tf/schema/resource_job.go index 5068725ba..aea2fdd6c 100644 --- a/bundle/internal/tf/schema/resource_job.go +++ b/bundle/internal/tf/schema/resource_job.go @@ -388,6 +388,11 @@ type ResourceJobPythonWheelTask struct { type ResourceJobQueue struct { } +type ResourceJobRunAs struct { + ServicePrincipalName string `json:"service_principal_name,omitempty"` + UserName string `json:"user_name,omitempty"` +} + type ResourceJobSchedule struct { PauseStatus string `json:"pause_status,omitempty"` QuartzCronExpression string `json:"quartz_cron_expression"` @@ -743,6 +748,7 @@ type ResourceJob struct { PipelineTask *ResourceJobPipelineTask `json:"pipeline_task,omitempty"` PythonWheelTask *ResourceJobPythonWheelTask `json:"python_wheel_task,omitempty"` Queue *ResourceJobQueue `json:"queue,omitempty"` + RunAs *ResourceJobRunAs `json:"run_as,omitempty"` Schedule *ResourceJobSchedule `json:"schedule,omitempty"` SparkJarTask *ResourceJobSparkJarTask `json:"spark_jar_task,omitempty"` SparkPythonTask *ResourceJobSparkPythonTask `json:"spark_python_task,omitempty"` diff --git a/bundle/internal/tf/schema/resource_model_serving.go b/bundle/internal/tf/schema/resource_model_serving.go index 3af18253a..6d5ff5391 100644 --- a/bundle/internal/tf/schema/resource_model_serving.go +++ b/bundle/internal/tf/schema/resource_model_serving.go @@ -25,7 +25,8 @@ type ResourceModelServingConfig struct { } type ResourceModelServing struct { - Id string `json:"id,omitempty"` - Name string `json:"name"` - Config *ResourceModelServingConfig `json:"config,omitempty"` + Id string `json:"id,omitempty"` + Name string `json:"name"` + ServingEndpointId string `json:"serving_endpoint_id,omitempty"` + Config *ResourceModelServingConfig `json:"config,omitempty"` } diff --git a/bundle/internal/tf/schema/resource_permissions.go b/bundle/internal/tf/schema/resource_permissions.go index 242d51125..5d8df11e7 100644 --- a/bundle/internal/tf/schema/resource_permissions.go +++ b/bundle/internal/tf/schema/resource_permissions.go @@ -26,6 +26,7 @@ type ResourcePermissions struct { RegisteredModelId string `json:"registered_model_id,omitempty"` RepoId string `json:"repo_id,omitempty"` RepoPath string `json:"repo_path,omitempty"` + ServingEndpointId string `json:"serving_endpoint_id,omitempty"` SqlAlertId string `json:"sql_alert_id,omitempty"` SqlDashboardId string `json:"sql_dashboard_id,omitempty"` SqlEndpointId string `json:"sql_endpoint_id,omitempty"` diff --git a/bundle/internal/tf/schema/resource_storage_credential.go b/bundle/internal/tf/schema/resource_storage_credential.go index 3b7a035c0..eab5810b3 100644 --- a/bundle/internal/tf/schema/resource_storage_credential.go +++ b/bundle/internal/tf/schema/resource_storage_credential.go @@ -32,6 +32,7 @@ type ResourceStorageCredential struct { MetastoreId string `json:"metastore_id,omitempty"` Name string `json:"name"` Owner string `json:"owner,omitempty"` + ReadOnly bool `json:"read_only,omitempty"` AwsIamRole *ResourceStorageCredentialAwsIamRole `json:"aws_iam_role,omitempty"` AzureManagedIdentity *ResourceStorageCredentialAzureManagedIdentity `json:"azure_managed_identity,omitempty"` AzureServicePrincipal *ResourceStorageCredentialAzureServicePrincipal `json:"azure_service_principal,omitempty"` diff --git a/bundle/internal/tf/schema/resource_volume.go b/bundle/internal/tf/schema/resource_volume.go new file mode 100644 index 000000000..77d499a69 --- /dev/null +++ b/bundle/internal/tf/schema/resource_volume.go @@ -0,0 +1,14 @@ +// Generated from Databricks Terraform provider schema. DO NOT EDIT. + +package schema + +type ResourceVolume struct { + CatalogName string `json:"catalog_name"` + Comment string `json:"comment,omitempty"` + Id string `json:"id,omitempty"` + Name string `json:"name"` + Owner string `json:"owner,omitempty"` + SchemaName string `json:"schema_name"` + StorageLocation string `json:"storage_location,omitempty"` + VolumeType string `json:"volume_type"` +} diff --git a/bundle/internal/tf/schema/resources.go b/bundle/internal/tf/schema/resources.go index 2c6d03d83..0620bd039 100644 --- a/bundle/internal/tf/schema/resources.go +++ b/bundle/internal/tf/schema/resources.go @@ -74,6 +74,7 @@ type Resources struct { User map[string]*ResourceUser `json:"databricks_user,omitempty"` UserInstanceProfile map[string]*ResourceUserInstanceProfile `json:"databricks_user_instance_profile,omitempty"` UserRole map[string]*ResourceUserRole `json:"databricks_user_role,omitempty"` + Volume map[string]*ResourceVolume `json:"databricks_volume,omitempty"` WorkspaceConf map[string]*ResourceWorkspaceConf `json:"databricks_workspace_conf,omitempty"` WorkspaceFile map[string]*ResourceWorkspaceFile `json:"databricks_workspace_file,omitempty"` } @@ -151,6 +152,7 @@ func NewResources() *Resources { User: make(map[string]*ResourceUser), UserInstanceProfile: make(map[string]*ResourceUserInstanceProfile), UserRole: make(map[string]*ResourceUserRole), + Volume: make(map[string]*ResourceVolume), WorkspaceConf: make(map[string]*ResourceWorkspaceConf), WorkspaceFile: make(map[string]*ResourceWorkspaceFile), }