mirror of https://github.com/databricks/cli.git
Upgrade TF provider to 1.61.0 (#2011)
## Changes Upgraded to TF provider 1.61.0 ### New Features and Improvements - Added databricks_app resource and data source (https://github.com/databricks/terraform-provider-databricks/pull/4099). - Added databricks_credentials resource and data source
This commit is contained in:
parent
4e95cb226c
commit
58dfa70e50
|
@ -2,9 +2,8 @@ package generator
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
tfjson "github.com/hashicorp/terraform-json"
|
||||
"github.com/iancoleman/strcase"
|
||||
|
@ -70,6 +69,25 @@ func nestedBlockKeys(block *tfjson.SchemaBlock) []string {
|
|||
return keys
|
||||
}
|
||||
|
||||
func nestedField(name []string, k string, isRef bool) field {
|
||||
// Collect field properties.
|
||||
fieldName := strcase.ToCamel(k)
|
||||
fieldTypePrefix := ""
|
||||
if isRef {
|
||||
fieldTypePrefix = "*"
|
||||
} else {
|
||||
fieldTypePrefix = "[]"
|
||||
}
|
||||
fieldType := fmt.Sprintf("%s%s", fieldTypePrefix, strings.Join(append(name, strcase.ToCamel(k)), ""))
|
||||
fieldTag := fmt.Sprintf("%s,omitempty", k)
|
||||
|
||||
return field{
|
||||
Name: fieldName,
|
||||
Type: fieldType,
|
||||
Tag: fieldTag,
|
||||
}
|
||||
}
|
||||
|
||||
func (w *walker) walk(block *tfjson.SchemaBlock, name []string) error {
|
||||
// Produce nested types before this block itself.
|
||||
// This ensures types are defined before they are referenced.
|
||||
|
@ -91,10 +109,24 @@ func (w *walker) walk(block *tfjson.SchemaBlock, name []string) error {
|
|||
v := block.Attributes[k]
|
||||
|
||||
// Assert the attribute type is always set.
|
||||
if v.AttributeType == cty.NilType {
|
||||
if v.AttributeType == cty.NilType && v.AttributeNestedType == nil {
|
||||
return fmt.Errorf("unexpected nil type for attribute %s", k)
|
||||
}
|
||||
|
||||
// If there is a nested type, walk it and continue to next attribute.
|
||||
if v.AttributeNestedType != nil {
|
||||
nestedBlock := &tfjson.SchemaBlock{
|
||||
Attributes: v.AttributeNestedType.Attributes,
|
||||
}
|
||||
err := w.walk(nestedBlock, append(name, strcase.ToCamel(k)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Append to list of fields for type.
|
||||
typ.Fields = append(typ.Fields, nestedField(name, k, v.AttributeNestedType.NestingMode == tfjson.SchemaNestingModeSingle))
|
||||
continue
|
||||
}
|
||||
|
||||
// Collect field properties.
|
||||
fieldName := strcase.ToCamel(k)
|
||||
fieldType := processAttributeType(v.AttributeType)
|
||||
|
@ -117,24 +149,8 @@ func (w *walker) walk(block *tfjson.SchemaBlock, name []string) error {
|
|||
// Declare nested blocks.
|
||||
for _, k := range nestedBlockKeys(block) {
|
||||
v := block.NestedBlocks[k]
|
||||
|
||||
// Collect field properties.
|
||||
fieldName := strcase.ToCamel(k)
|
||||
fieldTypePrefix := ""
|
||||
if v.MaxItems == 1 {
|
||||
fieldTypePrefix = "*"
|
||||
} else {
|
||||
fieldTypePrefix = "[]"
|
||||
}
|
||||
fieldType := fmt.Sprintf("%s%s", fieldTypePrefix, strings.Join(append(name, strcase.ToCamel(k)), ""))
|
||||
fieldTag := fmt.Sprintf("%s,omitempty", k)
|
||||
|
||||
// Append to list of fields for type.
|
||||
typ.Fields = append(typ.Fields, field{
|
||||
Name: fieldName,
|
||||
Type: fieldType,
|
||||
Tag: fieldTag,
|
||||
})
|
||||
typ.Fields = append(typ.Fields, nestedField(name, k, v.MaxItems == 1))
|
||||
}
|
||||
|
||||
// Append type to list of structs.
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
package schema
|
||||
|
||||
const ProviderVersion = "1.59.0"
|
||||
const ProviderVersion = "1.61.0"
|
||||
|
|
|
@ -25,9 +25,9 @@ const ProviderVersion = "{{ .ProviderVersion }}"
|
|||
|
||||
func NewRoot() *Root {
|
||||
return &Root{
|
||||
Terraform: map[string]interface{}{
|
||||
"required_providers": map[string]interface{}{
|
||||
"databricks": map[string]interface{}{
|
||||
Terraform: map[string]any{
|
||||
"required_providers": map[string]any{
|
||||
"databricks": map[string]any{
|
||||
"source": ProviderSource,
|
||||
"version": ProviderVersion,
|
||||
},
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
// Generated from Databricks Terraform provider schema. DO NOT EDIT.
|
||||
|
||||
package schema
|
||||
|
||||
type DataSourceAppAppActiveDeploymentDeploymentArtifacts struct {
|
||||
SourceCodePath string `json:"source_code_path,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppAppActiveDeploymentStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppAppActiveDeployment struct {
|
||||
CreateTime string `json:"create_time,omitempty"`
|
||||
Creator string `json:"creator,omitempty"`
|
||||
DeploymentArtifacts *DataSourceAppAppActiveDeploymentDeploymentArtifacts `json:"deployment_artifacts,omitempty"`
|
||||
DeploymentId string `json:"deployment_id,omitempty"`
|
||||
Mode string `json:"mode,omitempty"`
|
||||
SourceCodePath string `json:"source_code_path,omitempty"`
|
||||
Status *DataSourceAppAppActiveDeploymentStatus `json:"status,omitempty"`
|
||||
UpdateTime string `json:"update_time,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppAppAppStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppAppComputeStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppAppPendingDeploymentDeploymentArtifacts struct {
|
||||
SourceCodePath string `json:"source_code_path,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppAppPendingDeploymentStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppAppPendingDeployment struct {
|
||||
CreateTime string `json:"create_time,omitempty"`
|
||||
Creator string `json:"creator,omitempty"`
|
||||
DeploymentArtifacts *DataSourceAppAppPendingDeploymentDeploymentArtifacts `json:"deployment_artifacts,omitempty"`
|
||||
DeploymentId string `json:"deployment_id,omitempty"`
|
||||
Mode string `json:"mode,omitempty"`
|
||||
SourceCodePath string `json:"source_code_path,omitempty"`
|
||||
Status *DataSourceAppAppPendingDeploymentStatus `json:"status,omitempty"`
|
||||
UpdateTime string `json:"update_time,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppAppResourcesJob struct {
|
||||
Id string `json:"id"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type DataSourceAppAppResourcesSecret struct {
|
||||
Key string `json:"key"`
|
||||
Permission string `json:"permission"`
|
||||
Scope string `json:"scope"`
|
||||
}
|
||||
|
||||
type DataSourceAppAppResourcesServingEndpoint struct {
|
||||
Name string `json:"name"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type DataSourceAppAppResourcesSqlWarehouse struct {
|
||||
Id string `json:"id"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type DataSourceAppAppResources struct {
|
||||
Description string `json:"description,omitempty"`
|
||||
Job *DataSourceAppAppResourcesJob `json:"job,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Secret *DataSourceAppAppResourcesSecret `json:"secret,omitempty"`
|
||||
ServingEndpoint *DataSourceAppAppResourcesServingEndpoint `json:"serving_endpoint,omitempty"`
|
||||
SqlWarehouse *DataSourceAppAppResourcesSqlWarehouse `json:"sql_warehouse,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppApp struct {
|
||||
ActiveDeployment *DataSourceAppAppActiveDeployment `json:"active_deployment,omitempty"`
|
||||
AppStatus *DataSourceAppAppAppStatus `json:"app_status,omitempty"`
|
||||
ComputeStatus *DataSourceAppAppComputeStatus `json:"compute_status,omitempty"`
|
||||
CreateTime string `json:"create_time,omitempty"`
|
||||
Creator string `json:"creator,omitempty"`
|
||||
DefaultSourceCodePath string `json:"default_source_code_path,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Name string `json:"name"`
|
||||
PendingDeployment *DataSourceAppAppPendingDeployment `json:"pending_deployment,omitempty"`
|
||||
Resources []DataSourceAppAppResources `json:"resources,omitempty"`
|
||||
ServicePrincipalClientId string `json:"service_principal_client_id,omitempty"`
|
||||
ServicePrincipalId int `json:"service_principal_id,omitempty"`
|
||||
ServicePrincipalName string `json:"service_principal_name,omitempty"`
|
||||
UpdateTime string `json:"update_time,omitempty"`
|
||||
Updater string `json:"updater,omitempty"`
|
||||
Url string `json:"url,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceApp struct {
|
||||
App *DataSourceAppApp `json:"app,omitempty"`
|
||||
Name string `json:"name"`
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
// Generated from Databricks Terraform provider schema. DO NOT EDIT.
|
||||
|
||||
package schema
|
||||
|
||||
type DataSourceAppsAppActiveDeploymentDeploymentArtifacts struct {
|
||||
SourceCodePath string `json:"source_code_path,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppsAppActiveDeploymentStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppsAppActiveDeployment struct {
|
||||
CreateTime string `json:"create_time,omitempty"`
|
||||
Creator string `json:"creator,omitempty"`
|
||||
DeploymentArtifacts *DataSourceAppsAppActiveDeploymentDeploymentArtifacts `json:"deployment_artifacts,omitempty"`
|
||||
DeploymentId string `json:"deployment_id,omitempty"`
|
||||
Mode string `json:"mode,omitempty"`
|
||||
SourceCodePath string `json:"source_code_path,omitempty"`
|
||||
Status *DataSourceAppsAppActiveDeploymentStatus `json:"status,omitempty"`
|
||||
UpdateTime string `json:"update_time,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppsAppAppStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppsAppComputeStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppsAppPendingDeploymentDeploymentArtifacts struct {
|
||||
SourceCodePath string `json:"source_code_path,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppsAppPendingDeploymentStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppsAppPendingDeployment struct {
|
||||
CreateTime string `json:"create_time,omitempty"`
|
||||
Creator string `json:"creator,omitempty"`
|
||||
DeploymentArtifacts *DataSourceAppsAppPendingDeploymentDeploymentArtifacts `json:"deployment_artifacts,omitempty"`
|
||||
DeploymentId string `json:"deployment_id,omitempty"`
|
||||
Mode string `json:"mode,omitempty"`
|
||||
SourceCodePath string `json:"source_code_path,omitempty"`
|
||||
Status *DataSourceAppsAppPendingDeploymentStatus `json:"status,omitempty"`
|
||||
UpdateTime string `json:"update_time,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppsAppResourcesJob struct {
|
||||
Id string `json:"id"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type DataSourceAppsAppResourcesSecret struct {
|
||||
Key string `json:"key"`
|
||||
Permission string `json:"permission"`
|
||||
Scope string `json:"scope"`
|
||||
}
|
||||
|
||||
type DataSourceAppsAppResourcesServingEndpoint struct {
|
||||
Name string `json:"name"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type DataSourceAppsAppResourcesSqlWarehouse struct {
|
||||
Id string `json:"id"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type DataSourceAppsAppResources struct {
|
||||
Description string `json:"description,omitempty"`
|
||||
Job *DataSourceAppsAppResourcesJob `json:"job,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Secret *DataSourceAppsAppResourcesSecret `json:"secret,omitempty"`
|
||||
ServingEndpoint *DataSourceAppsAppResourcesServingEndpoint `json:"serving_endpoint,omitempty"`
|
||||
SqlWarehouse *DataSourceAppsAppResourcesSqlWarehouse `json:"sql_warehouse,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceAppsApp struct {
|
||||
ActiveDeployment *DataSourceAppsAppActiveDeployment `json:"active_deployment,omitempty"`
|
||||
AppStatus *DataSourceAppsAppAppStatus `json:"app_status,omitempty"`
|
||||
ComputeStatus *DataSourceAppsAppComputeStatus `json:"compute_status,omitempty"`
|
||||
CreateTime string `json:"create_time,omitempty"`
|
||||
Creator string `json:"creator,omitempty"`
|
||||
DefaultSourceCodePath string `json:"default_source_code_path,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Name string `json:"name"`
|
||||
PendingDeployment *DataSourceAppsAppPendingDeployment `json:"pending_deployment,omitempty"`
|
||||
Resources []DataSourceAppsAppResources `json:"resources,omitempty"`
|
||||
ServicePrincipalClientId string `json:"service_principal_client_id,omitempty"`
|
||||
ServicePrincipalId int `json:"service_principal_id,omitempty"`
|
||||
ServicePrincipalName string `json:"service_principal_name,omitempty"`
|
||||
UpdateTime string `json:"update_time,omitempty"`
|
||||
Updater string `json:"updater,omitempty"`
|
||||
Url string `json:"url,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceApps struct {
|
||||
App []DataSourceAppsApp `json:"app,omitempty"`
|
||||
}
|
|
@ -69,6 +69,7 @@ type DataSourceFunctionsFunctions struct {
|
|||
FullDataType string `json:"full_data_type,omitempty"`
|
||||
FullName string `json:"full_name,omitempty"`
|
||||
FunctionId string `json:"function_id,omitempty"`
|
||||
InputParams []DataSourceFunctionsFunctionsInputParams `json:"input_params,omitempty"`
|
||||
IsDeterministic bool `json:"is_deterministic,omitempty"`
|
||||
IsNullCall bool `json:"is_null_call,omitempty"`
|
||||
MetastoreId string `json:"metastore_id,omitempty"`
|
||||
|
@ -76,8 +77,10 @@ type DataSourceFunctionsFunctions struct {
|
|||
Owner string `json:"owner,omitempty"`
|
||||
ParameterStyle string `json:"parameter_style,omitempty"`
|
||||
Properties string `json:"properties,omitempty"`
|
||||
ReturnParams []DataSourceFunctionsFunctionsReturnParams `json:"return_params,omitempty"`
|
||||
RoutineBody string `json:"routine_body,omitempty"`
|
||||
RoutineDefinition string `json:"routine_definition,omitempty"`
|
||||
RoutineDependencies []DataSourceFunctionsFunctionsRoutineDependencies `json:"routine_dependencies,omitempty"`
|
||||
SchemaName string `json:"schema_name,omitempty"`
|
||||
SecurityType string `json:"security_type,omitempty"`
|
||||
SpecificName string `json:"specific_name,omitempty"`
|
||||
|
@ -85,14 +88,11 @@ type DataSourceFunctionsFunctions struct {
|
|||
SqlPath string `json:"sql_path,omitempty"`
|
||||
UpdatedAt int `json:"updated_at,omitempty"`
|
||||
UpdatedBy string `json:"updated_by,omitempty"`
|
||||
InputParams []DataSourceFunctionsFunctionsInputParams `json:"input_params,omitempty"`
|
||||
ReturnParams []DataSourceFunctionsFunctionsReturnParams `json:"return_params,omitempty"`
|
||||
RoutineDependencies []DataSourceFunctionsFunctionsRoutineDependencies `json:"routine_dependencies,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceFunctions struct {
|
||||
CatalogName string `json:"catalog_name"`
|
||||
Functions []DataSourceFunctionsFunctions `json:"functions,omitempty"`
|
||||
IncludeBrowse bool `json:"include_browse,omitempty"`
|
||||
SchemaName string `json:"schema_name"`
|
||||
Functions []DataSourceFunctionsFunctions `json:"functions,omitempty"`
|
||||
}
|
||||
|
|
|
@ -5,4 +5,5 @@ package schema
|
|||
type DataSourceJobs struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
Ids map[string]string `json:"ids,omitempty"`
|
||||
JobNameContains string `json:"job_name_contains,omitempty"`
|
||||
}
|
||||
|
|
|
@ -10,6 +10,6 @@ type DataSourceNotificationDestinationsNotificationDestinations struct {
|
|||
|
||||
type DataSourceNotificationDestinations struct {
|
||||
DisplayNameContains string `json:"display_name_contains,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
NotificationDestinations []DataSourceNotificationDestinationsNotificationDestinations `json:"notification_destinations,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ type DataSourceRegisteredModelModelInfoAliases struct {
|
|||
}
|
||||
|
||||
type DataSourceRegisteredModelModelInfo struct {
|
||||
Aliases []DataSourceRegisteredModelModelInfoAliases `json:"aliases,omitempty"`
|
||||
BrowseOnly bool `json:"browse_only,omitempty"`
|
||||
CatalogName string `json:"catalog_name,omitempty"`
|
||||
Comment string `json:"comment,omitempty"`
|
||||
|
@ -21,7 +22,6 @@ type DataSourceRegisteredModelModelInfo struct {
|
|||
StorageLocation string `json:"storage_location,omitempty"`
|
||||
UpdatedAt int `json:"updated_at,omitempty"`
|
||||
UpdatedBy string `json:"updated_by,omitempty"`
|
||||
Aliases []DataSourceRegisteredModelModelInfoAliases `json:"aliases,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceRegisteredModel struct {
|
||||
|
|
|
@ -25,6 +25,7 @@ type DataSourceRegisteredModelVersionsModelVersionsModelVersionDependencies stru
|
|||
}
|
||||
|
||||
type DataSourceRegisteredModelVersionsModelVersions struct {
|
||||
Aliases []DataSourceRegisteredModelVersionsModelVersionsAliases `json:"aliases,omitempty"`
|
||||
BrowseOnly bool `json:"browse_only,omitempty"`
|
||||
CatalogName string `json:"catalog_name,omitempty"`
|
||||
Comment string `json:"comment,omitempty"`
|
||||
|
@ -33,6 +34,7 @@ type DataSourceRegisteredModelVersionsModelVersions struct {
|
|||
Id string `json:"id,omitempty"`
|
||||
MetastoreId string `json:"metastore_id,omitempty"`
|
||||
ModelName string `json:"model_name,omitempty"`
|
||||
ModelVersionDependencies []DataSourceRegisteredModelVersionsModelVersionsModelVersionDependencies `json:"model_version_dependencies,omitempty"`
|
||||
RunId string `json:"run_id,omitempty"`
|
||||
RunWorkspaceId int `json:"run_workspace_id,omitempty"`
|
||||
SchemaName string `json:"schema_name,omitempty"`
|
||||
|
@ -42,8 +44,6 @@ type DataSourceRegisteredModelVersionsModelVersions struct {
|
|||
UpdatedAt int `json:"updated_at,omitempty"`
|
||||
UpdatedBy string `json:"updated_by,omitempty"`
|
||||
Version int `json:"version,omitempty"`
|
||||
Aliases []DataSourceRegisteredModelVersionsModelVersionsAliases `json:"aliases,omitempty"`
|
||||
ModelVersionDependencies []DataSourceRegisteredModelVersionsModelVersionsModelVersionDependencies `json:"model_version_dependencies,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceRegisteredModelVersions struct {
|
||||
|
|
|
@ -8,9 +8,9 @@ type DataSourceServingEndpointsEndpointsAiGatewayGuardrailsInputPii struct {
|
|||
|
||||
type DataSourceServingEndpointsEndpointsAiGatewayGuardrailsInput struct {
|
||||
InvalidKeywords []string `json:"invalid_keywords,omitempty"`
|
||||
Pii []DataSourceServingEndpointsEndpointsAiGatewayGuardrailsInputPii `json:"pii,omitempty"`
|
||||
Safety bool `json:"safety,omitempty"`
|
||||
ValidTopics []string `json:"valid_topics,omitempty"`
|
||||
Pii []DataSourceServingEndpointsEndpointsAiGatewayGuardrailsInputPii `json:"pii,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceServingEndpointsEndpointsAiGatewayGuardrailsOutputPii struct {
|
||||
|
@ -19,9 +19,9 @@ type DataSourceServingEndpointsEndpointsAiGatewayGuardrailsOutputPii struct {
|
|||
|
||||
type DataSourceServingEndpointsEndpointsAiGatewayGuardrailsOutput struct {
|
||||
InvalidKeywords []string `json:"invalid_keywords,omitempty"`
|
||||
Pii []DataSourceServingEndpointsEndpointsAiGatewayGuardrailsOutputPii `json:"pii,omitempty"`
|
||||
Safety bool `json:"safety,omitempty"`
|
||||
ValidTopics []string `json:"valid_topics,omitempty"`
|
||||
Pii []DataSourceServingEndpointsEndpointsAiGatewayGuardrailsOutputPii `json:"pii,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceServingEndpointsEndpointsAiGatewayGuardrails struct {
|
||||
|
@ -111,17 +111,17 @@ type DataSourceServingEndpointsEndpointsConfigServedEntitiesExternalModelPalmCon
|
|||
}
|
||||
|
||||
type DataSourceServingEndpointsEndpointsConfigServedEntitiesExternalModel struct {
|
||||
Name string `json:"name"`
|
||||
Provider string `json:"provider"`
|
||||
Task string `json:"task"`
|
||||
Ai21LabsConfig []DataSourceServingEndpointsEndpointsConfigServedEntitiesExternalModelAi21LabsConfig `json:"ai21labs_config,omitempty"`
|
||||
AmazonBedrockConfig []DataSourceServingEndpointsEndpointsConfigServedEntitiesExternalModelAmazonBedrockConfig `json:"amazon_bedrock_config,omitempty"`
|
||||
AnthropicConfig []DataSourceServingEndpointsEndpointsConfigServedEntitiesExternalModelAnthropicConfig `json:"anthropic_config,omitempty"`
|
||||
CohereConfig []DataSourceServingEndpointsEndpointsConfigServedEntitiesExternalModelCohereConfig `json:"cohere_config,omitempty"`
|
||||
DatabricksModelServingConfig []DataSourceServingEndpointsEndpointsConfigServedEntitiesExternalModelDatabricksModelServingConfig `json:"databricks_model_serving_config,omitempty"`
|
||||
GoogleCloudVertexAiConfig []DataSourceServingEndpointsEndpointsConfigServedEntitiesExternalModelGoogleCloudVertexAiConfig `json:"google_cloud_vertex_ai_config,omitempty"`
|
||||
Name string `json:"name"`
|
||||
OpenaiConfig []DataSourceServingEndpointsEndpointsConfigServedEntitiesExternalModelOpenaiConfig `json:"openai_config,omitempty"`
|
||||
PalmConfig []DataSourceServingEndpointsEndpointsConfigServedEntitiesExternalModelPalmConfig `json:"palm_config,omitempty"`
|
||||
Provider string `json:"provider"`
|
||||
Task string `json:"task"`
|
||||
}
|
||||
|
||||
type DataSourceServingEndpointsEndpointsConfigServedEntitiesFoundationModel struct {
|
||||
|
@ -134,9 +134,9 @@ type DataSourceServingEndpointsEndpointsConfigServedEntitiesFoundationModel stru
|
|||
type DataSourceServingEndpointsEndpointsConfigServedEntities struct {
|
||||
EntityName string `json:"entity_name,omitempty"`
|
||||
EntityVersion string `json:"entity_version,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
ExternalModel []DataSourceServingEndpointsEndpointsConfigServedEntitiesExternalModel `json:"external_model,omitempty"`
|
||||
FoundationModel []DataSourceServingEndpointsEndpointsConfigServedEntitiesFoundationModel `json:"foundation_model,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceServingEndpointsEndpointsConfigServedModels struct {
|
||||
|
@ -161,16 +161,16 @@ type DataSourceServingEndpointsEndpointsTags struct {
|
|||
}
|
||||
|
||||
type DataSourceServingEndpointsEndpoints struct {
|
||||
AiGateway []DataSourceServingEndpointsEndpointsAiGateway `json:"ai_gateway,omitempty"`
|
||||
Config []DataSourceServingEndpointsEndpointsConfig `json:"config,omitempty"`
|
||||
CreationTimestamp int `json:"creation_timestamp,omitempty"`
|
||||
Creator string `json:"creator,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
LastUpdatedTimestamp int `json:"last_updated_timestamp,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Task string `json:"task,omitempty"`
|
||||
AiGateway []DataSourceServingEndpointsEndpointsAiGateway `json:"ai_gateway,omitempty"`
|
||||
Config []DataSourceServingEndpointsEndpointsConfig `json:"config,omitempty"`
|
||||
State []DataSourceServingEndpointsEndpointsState `json:"state,omitempty"`
|
||||
Tags []DataSourceServingEndpointsEndpointsTags `json:"tags,omitempty"`
|
||||
Task string `json:"task,omitempty"`
|
||||
}
|
||||
|
||||
type DataSourceServingEndpoints struct {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
package schema
|
||||
|
||||
type DataSources struct {
|
||||
App map[string]any `json:"databricks_app,omitempty"`
|
||||
Apps map[string]any `json:"databricks_apps,omitempty"`
|
||||
AwsAssumeRolePolicy map[string]any `json:"databricks_aws_assume_role_policy,omitempty"`
|
||||
AwsBucketPolicy map[string]any `json:"databricks_aws_bucket_policy,omitempty"`
|
||||
AwsCrossaccountPolicy map[string]any `json:"databricks_aws_crossaccount_policy,omitempty"`
|
||||
|
@ -66,6 +68,8 @@ type DataSources struct {
|
|||
|
||||
func NewDataSources() *DataSources {
|
||||
return &DataSources{
|
||||
App: make(map[string]any),
|
||||
Apps: make(map[string]any),
|
||||
AwsAssumeRolePolicy: make(map[string]any),
|
||||
AwsBucketPolicy: make(map[string]any),
|
||||
AwsCrossaccountPolicy: make(map[string]any),
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
// Generated from Databricks Terraform provider schema. DO NOT EDIT.
|
||||
|
||||
package schema
|
||||
|
||||
type ResourceAppActiveDeploymentDeploymentArtifacts struct {
|
||||
SourceCodePath string `json:"source_code_path,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceAppActiveDeploymentStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceAppActiveDeployment struct {
|
||||
CreateTime string `json:"create_time,omitempty"`
|
||||
Creator string `json:"creator,omitempty"`
|
||||
DeploymentArtifacts *ResourceAppActiveDeploymentDeploymentArtifacts `json:"deployment_artifacts,omitempty"`
|
||||
DeploymentId string `json:"deployment_id,omitempty"`
|
||||
Mode string `json:"mode,omitempty"`
|
||||
SourceCodePath string `json:"source_code_path,omitempty"`
|
||||
Status *ResourceAppActiveDeploymentStatus `json:"status,omitempty"`
|
||||
UpdateTime string `json:"update_time,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceAppAppStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceAppComputeStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceAppPendingDeploymentDeploymentArtifacts struct {
|
||||
SourceCodePath string `json:"source_code_path,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceAppPendingDeploymentStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceAppPendingDeployment struct {
|
||||
CreateTime string `json:"create_time,omitempty"`
|
||||
Creator string `json:"creator,omitempty"`
|
||||
DeploymentArtifacts *ResourceAppPendingDeploymentDeploymentArtifacts `json:"deployment_artifacts,omitempty"`
|
||||
DeploymentId string `json:"deployment_id,omitempty"`
|
||||
Mode string `json:"mode,omitempty"`
|
||||
SourceCodePath string `json:"source_code_path,omitempty"`
|
||||
Status *ResourceAppPendingDeploymentStatus `json:"status,omitempty"`
|
||||
UpdateTime string `json:"update_time,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceAppResourcesJob struct {
|
||||
Id string `json:"id"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type ResourceAppResourcesSecret struct {
|
||||
Key string `json:"key"`
|
||||
Permission string `json:"permission"`
|
||||
Scope string `json:"scope"`
|
||||
}
|
||||
|
||||
type ResourceAppResourcesServingEndpoint struct {
|
||||
Name string `json:"name"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type ResourceAppResourcesSqlWarehouse struct {
|
||||
Id string `json:"id"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type ResourceAppResources struct {
|
||||
Description string `json:"description,omitempty"`
|
||||
Job *ResourceAppResourcesJob `json:"job,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Secret *ResourceAppResourcesSecret `json:"secret,omitempty"`
|
||||
ServingEndpoint *ResourceAppResourcesServingEndpoint `json:"serving_endpoint,omitempty"`
|
||||
SqlWarehouse *ResourceAppResourcesSqlWarehouse `json:"sql_warehouse,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceApp struct {
|
||||
ActiveDeployment *ResourceAppActiveDeployment `json:"active_deployment,omitempty"`
|
||||
AppStatus *ResourceAppAppStatus `json:"app_status,omitempty"`
|
||||
ComputeStatus *ResourceAppComputeStatus `json:"compute_status,omitempty"`
|
||||
CreateTime string `json:"create_time,omitempty"`
|
||||
Creator string `json:"creator,omitempty"`
|
||||
DefaultSourceCodePath string `json:"default_source_code_path,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Name string `json:"name"`
|
||||
PendingDeployment *ResourceAppPendingDeployment `json:"pending_deployment,omitempty"`
|
||||
Resources []ResourceAppResources `json:"resources,omitempty"`
|
||||
ServicePrincipalClientId string `json:"service_principal_client_id,omitempty"`
|
||||
ServicePrincipalId int `json:"service_principal_id,omitempty"`
|
||||
ServicePrincipalName string `json:"service_principal_name,omitempty"`
|
||||
UpdateTime string `json:"update_time,omitempty"`
|
||||
Updater string `json:"updater,omitempty"`
|
||||
Url string `json:"url,omitempty"`
|
||||
}
|
|
@ -9,6 +9,7 @@ type ResourceAzureAdlsGen2Mount struct {
|
|||
ClusterId string `json:"cluster_id,omitempty"`
|
||||
ContainerName string `json:"container_name"`
|
||||
Directory string `json:"directory,omitempty"`
|
||||
Environment string `json:"environment,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
InitializeFileSystem bool `json:"initialize_file_system"`
|
||||
MountName string `json:"mount_name"`
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
// Generated from Databricks Terraform provider schema. DO NOT EDIT.
|
||||
|
||||
package schema
|
||||
|
||||
type ResourceCredentialAwsIamRole struct {
|
||||
ExternalId string `json:"external_id,omitempty"`
|
||||
RoleArn string `json:"role_arn,omitempty"`
|
||||
UnityCatalogIamArn string `json:"unity_catalog_iam_arn,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceCredentialAzureManagedIdentity struct {
|
||||
AccessConnectorId string `json:"access_connector_id"`
|
||||
CredentialId string `json:"credential_id,omitempty"`
|
||||
ManagedIdentityId string `json:"managed_identity_id,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceCredentialAzureServicePrincipal struct {
|
||||
ApplicationId string `json:"application_id"`
|
||||
ClientSecret string `json:"client_secret"`
|
||||
DirectoryId string `json:"directory_id"`
|
||||
}
|
||||
|
||||
type ResourceCredentialDatabricksGcpServiceAccount struct {
|
||||
CredentialId string `json:"credential_id,omitempty"`
|
||||
Email string `json:"email,omitempty"`
|
||||
PrivateKeyId string `json:"private_key_id,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceCredential struct {
|
||||
Comment string `json:"comment,omitempty"`
|
||||
CreatedAt int `json:"created_at,omitempty"`
|
||||
CreatedBy string `json:"created_by,omitempty"`
|
||||
CredentialId string `json:"credential_id,omitempty"`
|
||||
ForceDestroy bool `json:"force_destroy,omitempty"`
|
||||
ForceUpdate bool `json:"force_update,omitempty"`
|
||||
FullName string `json:"full_name,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"`
|
||||
Purpose string `json:"purpose"`
|
||||
ReadOnly bool `json:"read_only,omitempty"`
|
||||
SkipValidation bool `json:"skip_validation,omitempty"`
|
||||
UpdatedAt int `json:"updated_at,omitempty"`
|
||||
UpdatedBy string `json:"updated_by,omitempty"`
|
||||
UsedForManagedStorage bool `json:"used_for_managed_storage,omitempty"`
|
||||
AwsIamRole *ResourceCredentialAwsIamRole `json:"aws_iam_role,omitempty"`
|
||||
AzureManagedIdentity *ResourceCredentialAzureManagedIdentity `json:"azure_managed_identity,omitempty"`
|
||||
AzureServicePrincipal *ResourceCredentialAzureServicePrincipal `json:"azure_service_principal,omitempty"`
|
||||
DatabricksGcpServiceAccount *ResourceCredentialDatabricksGcpServiceAccount `json:"databricks_gcp_service_account,omitempty"`
|
||||
}
|
|
@ -4,6 +4,7 @@ package schema
|
|||
|
||||
type ResourceGrant struct {
|
||||
Catalog string `json:"catalog,omitempty"`
|
||||
Credential string `json:"credential,omitempty"`
|
||||
ExternalLocation string `json:"external_location,omitempty"`
|
||||
ForeignConnection string `json:"foreign_connection,omitempty"`
|
||||
Function string `json:"function,omitempty"`
|
||||
|
|
|
@ -9,6 +9,7 @@ type ResourceGrantsGrant struct {
|
|||
|
||||
type ResourceGrants struct {
|
||||
Catalog string `json:"catalog,omitempty"`
|
||||
Credential string `json:"credential,omitempty"`
|
||||
ExternalLocation string `json:"external_location,omitempty"`
|
||||
ForeignConnection string `json:"foreign_connection,omitempty"`
|
||||
Function string `json:"function,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@ type ResourcePermissionsAccessControl struct {
|
|||
}
|
||||
|
||||
type ResourcePermissions struct {
|
||||
AppName string `json:"app_name,omitempty"`
|
||||
Authorization string `json:"authorization,omitempty"`
|
||||
ClusterId string `json:"cluster_id,omitempty"`
|
||||
ClusterPolicyId string `json:"cluster_policy_id,omitempty"`
|
||||
|
|
|
@ -5,6 +5,7 @@ package schema
|
|||
type Resources struct {
|
||||
AccessControlRuleSet map[string]any `json:"databricks_access_control_rule_set,omitempty"`
|
||||
Alert map[string]any `json:"databricks_alert,omitempty"`
|
||||
App map[string]any `json:"databricks_app,omitempty"`
|
||||
ArtifactAllowlist map[string]any `json:"databricks_artifact_allowlist,omitempty"`
|
||||
AutomaticClusterUpdateWorkspaceSetting map[string]any `json:"databricks_automatic_cluster_update_workspace_setting,omitempty"`
|
||||
AwsS3Mount map[string]any `json:"databricks_aws_s3_mount,omitempty"`
|
||||
|
@ -18,6 +19,7 @@ type Resources struct {
|
|||
ClusterPolicy map[string]any `json:"databricks_cluster_policy,omitempty"`
|
||||
ComplianceSecurityProfileWorkspaceSetting map[string]any `json:"databricks_compliance_security_profile_workspace_setting,omitempty"`
|
||||
Connection map[string]any `json:"databricks_connection,omitempty"`
|
||||
Credential map[string]any `json:"databricks_credential,omitempty"`
|
||||
CustomAppIntegration map[string]any `json:"databricks_custom_app_integration,omitempty"`
|
||||
Dashboard map[string]any `json:"databricks_dashboard,omitempty"`
|
||||
DbfsFile map[string]any `json:"databricks_dbfs_file,omitempty"`
|
||||
|
@ -111,6 +113,7 @@ func NewResources() *Resources {
|
|||
return &Resources{
|
||||
AccessControlRuleSet: make(map[string]any),
|
||||
Alert: make(map[string]any),
|
||||
App: make(map[string]any),
|
||||
ArtifactAllowlist: make(map[string]any),
|
||||
AutomaticClusterUpdateWorkspaceSetting: make(map[string]any),
|
||||
AwsS3Mount: make(map[string]any),
|
||||
|
@ -124,6 +127,7 @@ func NewResources() *Resources {
|
|||
ClusterPolicy: make(map[string]any),
|
||||
ComplianceSecurityProfileWorkspaceSetting: make(map[string]any),
|
||||
Connection: make(map[string]any),
|
||||
Credential: make(map[string]any),
|
||||
CustomAppIntegration: make(map[string]any),
|
||||
Dashboard: make(map[string]any),
|
||||
DbfsFile: make(map[string]any),
|
||||
|
|
|
@ -21,7 +21,7 @@ type Root struct {
|
|||
|
||||
const ProviderHost = "registry.terraform.io"
|
||||
const ProviderSource = "databricks/databricks"
|
||||
const ProviderVersion = "1.59.0"
|
||||
const ProviderVersion = "1.61.0"
|
||||
|
||||
func NewRoot() *Root {
|
||||
return &Root{
|
||||
|
|
Loading…
Reference in New Issue