From a393c87ed931f449b4a1b0d86024399ea1febfb9 Mon Sep 17 00:00:00 2001 From: Andrew Nester Date: Mon, 6 May 2024 13:41:37 +0200 Subject: [PATCH] Upgrade TF provider to 1.42.0 (#1418) ## Changes Upgrade TF provider to 1.42.0 Also fixes #1258 --- bundle/internal/tf/codegen/schema/version.go | 2 +- bundle/internal/tf/schema/data_source_job.go | 39 +++++++------- bundle/internal/tf/schema/resource_cluster.go | 13 ++--- .../tf/schema/resource_cluster_policy.go | 13 ++--- bundle/internal/tf/schema/resource_job.go | 39 +++++++------- bundle/internal/tf/schema/resource_library.go | 17 ++++--- .../tf/schema/resource_mws_ncc_binding.go | 9 ++++ .../resource_mws_ncc_private_endpoint_rule.go | 17 +++++++ ...esource_mws_network_connectivity_config.go | 51 +++++++++++++++++++ bundle/internal/tf/schema/resources.go | 6 +++ bundle/internal/tf/schema/root.go | 2 +- 11 files changed, 150 insertions(+), 58 deletions(-) create mode 100644 bundle/internal/tf/schema/resource_mws_ncc_binding.go create mode 100644 bundle/internal/tf/schema/resource_mws_ncc_private_endpoint_rule.go create mode 100644 bundle/internal/tf/schema/resource_mws_network_connectivity_config.go diff --git a/bundle/internal/tf/codegen/schema/version.go b/bundle/internal/tf/codegen/schema/version.go index 4fb4bf2c..30885d96 100644 --- a/bundle/internal/tf/codegen/schema/version.go +++ b/bundle/internal/tf/codegen/schema/version.go @@ -1,3 +1,3 @@ package schema -const ProviderVersion = "1.40.0" +const ProviderVersion = "1.42.0" diff --git a/bundle/internal/tf/schema/data_source_job.go b/bundle/internal/tf/schema/data_source_job.go index dbd29f4b..e5ec5afb 100644 --- a/bundle/internal/tf/schema/data_source_job.go +++ b/bundle/internal/tf/schema/data_source_job.go @@ -243,12 +243,13 @@ type DataSourceJobJobSettingsSettingsLibraryPypi struct { } type DataSourceJobJobSettingsSettingsLibrary struct { - Egg string `json:"egg,omitempty"` - Jar string `json:"jar,omitempty"` - Whl string `json:"whl,omitempty"` - Cran *DataSourceJobJobSettingsSettingsLibraryCran `json:"cran,omitempty"` - Maven *DataSourceJobJobSettingsSettingsLibraryMaven `json:"maven,omitempty"` - Pypi *DataSourceJobJobSettingsSettingsLibraryPypi `json:"pypi,omitempty"` + Egg string `json:"egg,omitempty"` + Jar string `json:"jar,omitempty"` + Requirements string `json:"requirements,omitempty"` + Whl string `json:"whl,omitempty"` + Cran *DataSourceJobJobSettingsSettingsLibraryCran `json:"cran,omitempty"` + Maven *DataSourceJobJobSettingsSettingsLibraryMaven `json:"maven,omitempty"` + Pypi *DataSourceJobJobSettingsSettingsLibraryPypi `json:"pypi,omitempty"` } type DataSourceJobJobSettingsSettingsNewClusterAutoscale struct { @@ -558,12 +559,13 @@ type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskLibraryPypi struct { } type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskLibrary struct { - Egg string `json:"egg,omitempty"` - Jar string `json:"jar,omitempty"` - Whl string `json:"whl,omitempty"` - Cran *DataSourceJobJobSettingsSettingsTaskForEachTaskTaskLibraryCran `json:"cran,omitempty"` - Maven *DataSourceJobJobSettingsSettingsTaskForEachTaskTaskLibraryMaven `json:"maven,omitempty"` - Pypi *DataSourceJobJobSettingsSettingsTaskForEachTaskTaskLibraryPypi `json:"pypi,omitempty"` + Egg string `json:"egg,omitempty"` + Jar string `json:"jar,omitempty"` + Requirements string `json:"requirements,omitempty"` + Whl string `json:"whl,omitempty"` + Cran *DataSourceJobJobSettingsSettingsTaskForEachTaskTaskLibraryCran `json:"cran,omitempty"` + Maven *DataSourceJobJobSettingsSettingsTaskForEachTaskTaskLibraryMaven `json:"maven,omitempty"` + Pypi *DataSourceJobJobSettingsSettingsTaskForEachTaskTaskLibraryPypi `json:"pypi,omitempty"` } type DataSourceJobJobSettingsSettingsTaskForEachTaskTaskNewClusterAutoscale struct { @@ -896,12 +898,13 @@ type DataSourceJobJobSettingsSettingsTaskLibraryPypi struct { } type DataSourceJobJobSettingsSettingsTaskLibrary struct { - Egg string `json:"egg,omitempty"` - Jar string `json:"jar,omitempty"` - Whl string `json:"whl,omitempty"` - Cran *DataSourceJobJobSettingsSettingsTaskLibraryCran `json:"cran,omitempty"` - Maven *DataSourceJobJobSettingsSettingsTaskLibraryMaven `json:"maven,omitempty"` - Pypi *DataSourceJobJobSettingsSettingsTaskLibraryPypi `json:"pypi,omitempty"` + Egg string `json:"egg,omitempty"` + Jar string `json:"jar,omitempty"` + Requirements string `json:"requirements,omitempty"` + Whl string `json:"whl,omitempty"` + Cran *DataSourceJobJobSettingsSettingsTaskLibraryCran `json:"cran,omitempty"` + Maven *DataSourceJobJobSettingsSettingsTaskLibraryMaven `json:"maven,omitempty"` + Pypi *DataSourceJobJobSettingsSettingsTaskLibraryPypi `json:"pypi,omitempty"` } type DataSourceJobJobSettingsSettingsTaskNewClusterAutoscale struct { diff --git a/bundle/internal/tf/schema/resource_cluster.go b/bundle/internal/tf/schema/resource_cluster.go index 6f866ba8..046e0bb4 100644 --- a/bundle/internal/tf/schema/resource_cluster.go +++ b/bundle/internal/tf/schema/resource_cluster.go @@ -146,12 +146,13 @@ type ResourceClusterLibraryPypi struct { } type ResourceClusterLibrary struct { - Egg string `json:"egg,omitempty"` - Jar string `json:"jar,omitempty"` - Whl string `json:"whl,omitempty"` - Cran *ResourceClusterLibraryCran `json:"cran,omitempty"` - Maven *ResourceClusterLibraryMaven `json:"maven,omitempty"` - Pypi *ResourceClusterLibraryPypi `json:"pypi,omitempty"` + Egg string `json:"egg,omitempty"` + Jar string `json:"jar,omitempty"` + Requirements string `json:"requirements,omitempty"` + Whl string `json:"whl,omitempty"` + Cran *ResourceClusterLibraryCran `json:"cran,omitempty"` + Maven *ResourceClusterLibraryMaven `json:"maven,omitempty"` + Pypi *ResourceClusterLibraryPypi `json:"pypi,omitempty"` } type ResourceClusterWorkloadTypeClients struct { diff --git a/bundle/internal/tf/schema/resource_cluster_policy.go b/bundle/internal/tf/schema/resource_cluster_policy.go index 637fe645..d8111fef 100644 --- a/bundle/internal/tf/schema/resource_cluster_policy.go +++ b/bundle/internal/tf/schema/resource_cluster_policy.go @@ -19,12 +19,13 @@ type ResourceClusterPolicyLibrariesPypi struct { } type ResourceClusterPolicyLibraries struct { - Egg string `json:"egg,omitempty"` - Jar string `json:"jar,omitempty"` - Whl string `json:"whl,omitempty"` - Cran *ResourceClusterPolicyLibrariesCran `json:"cran,omitempty"` - Maven *ResourceClusterPolicyLibrariesMaven `json:"maven,omitempty"` - Pypi *ResourceClusterPolicyLibrariesPypi `json:"pypi,omitempty"` + Egg string `json:"egg,omitempty"` + Jar string `json:"jar,omitempty"` + Requirements string `json:"requirements,omitempty"` + Whl string `json:"whl,omitempty"` + Cran *ResourceClusterPolicyLibrariesCran `json:"cran,omitempty"` + Maven *ResourceClusterPolicyLibrariesMaven `json:"maven,omitempty"` + Pypi *ResourceClusterPolicyLibrariesPypi `json:"pypi,omitempty"` } type ResourceClusterPolicy struct { diff --git a/bundle/internal/tf/schema/resource_job.go b/bundle/internal/tf/schema/resource_job.go index 2431262c..6958face 100644 --- a/bundle/internal/tf/schema/resource_job.go +++ b/bundle/internal/tf/schema/resource_job.go @@ -243,12 +243,13 @@ type ResourceJobLibraryPypi struct { } type ResourceJobLibrary struct { - Egg string `json:"egg,omitempty"` - Jar string `json:"jar,omitempty"` - Whl string `json:"whl,omitempty"` - Cran *ResourceJobLibraryCran `json:"cran,omitempty"` - Maven *ResourceJobLibraryMaven `json:"maven,omitempty"` - Pypi *ResourceJobLibraryPypi `json:"pypi,omitempty"` + Egg string `json:"egg,omitempty"` + Jar string `json:"jar,omitempty"` + Requirements string `json:"requirements,omitempty"` + Whl string `json:"whl,omitempty"` + Cran *ResourceJobLibraryCran `json:"cran,omitempty"` + Maven *ResourceJobLibraryMaven `json:"maven,omitempty"` + Pypi *ResourceJobLibraryPypi `json:"pypi,omitempty"` } type ResourceJobNewClusterAutoscale struct { @@ -558,12 +559,13 @@ type ResourceJobTaskForEachTaskTaskLibraryPypi struct { } type ResourceJobTaskForEachTaskTaskLibrary struct { - Egg string `json:"egg,omitempty"` - Jar string `json:"jar,omitempty"` - Whl string `json:"whl,omitempty"` - Cran *ResourceJobTaskForEachTaskTaskLibraryCran `json:"cran,omitempty"` - Maven *ResourceJobTaskForEachTaskTaskLibraryMaven `json:"maven,omitempty"` - Pypi *ResourceJobTaskForEachTaskTaskLibraryPypi `json:"pypi,omitempty"` + Egg string `json:"egg,omitempty"` + Jar string `json:"jar,omitempty"` + Requirements string `json:"requirements,omitempty"` + Whl string `json:"whl,omitempty"` + Cran *ResourceJobTaskForEachTaskTaskLibraryCran `json:"cran,omitempty"` + Maven *ResourceJobTaskForEachTaskTaskLibraryMaven `json:"maven,omitempty"` + Pypi *ResourceJobTaskForEachTaskTaskLibraryPypi `json:"pypi,omitempty"` } type ResourceJobTaskForEachTaskTaskNewClusterAutoscale struct { @@ -896,12 +898,13 @@ type ResourceJobTaskLibraryPypi struct { } type ResourceJobTaskLibrary struct { - Egg string `json:"egg,omitempty"` - Jar string `json:"jar,omitempty"` - Whl string `json:"whl,omitempty"` - Cran *ResourceJobTaskLibraryCran `json:"cran,omitempty"` - Maven *ResourceJobTaskLibraryMaven `json:"maven,omitempty"` - Pypi *ResourceJobTaskLibraryPypi `json:"pypi,omitempty"` + Egg string `json:"egg,omitempty"` + Jar string `json:"jar,omitempty"` + Requirements string `json:"requirements,omitempty"` + Whl string `json:"whl,omitempty"` + Cran *ResourceJobTaskLibraryCran `json:"cran,omitempty"` + Maven *ResourceJobTaskLibraryMaven `json:"maven,omitempty"` + Pypi *ResourceJobTaskLibraryPypi `json:"pypi,omitempty"` } type ResourceJobTaskNewClusterAutoscale struct { diff --git a/bundle/internal/tf/schema/resource_library.go b/bundle/internal/tf/schema/resource_library.go index e2e83fb4..385d992d 100644 --- a/bundle/internal/tf/schema/resource_library.go +++ b/bundle/internal/tf/schema/resource_library.go @@ -19,12 +19,13 @@ type ResourceLibraryPypi struct { } type ResourceLibrary struct { - ClusterId string `json:"cluster_id"` - Egg string `json:"egg,omitempty"` - Id string `json:"id,omitempty"` - Jar string `json:"jar,omitempty"` - Whl string `json:"whl,omitempty"` - Cran *ResourceLibraryCran `json:"cran,omitempty"` - Maven *ResourceLibraryMaven `json:"maven,omitempty"` - Pypi *ResourceLibraryPypi `json:"pypi,omitempty"` + ClusterId string `json:"cluster_id"` + Egg string `json:"egg,omitempty"` + Id string `json:"id,omitempty"` + Jar string `json:"jar,omitempty"` + Requirements string `json:"requirements,omitempty"` + Whl string `json:"whl,omitempty"` + Cran *ResourceLibraryCran `json:"cran,omitempty"` + Maven *ResourceLibraryMaven `json:"maven,omitempty"` + Pypi *ResourceLibraryPypi `json:"pypi,omitempty"` } diff --git a/bundle/internal/tf/schema/resource_mws_ncc_binding.go b/bundle/internal/tf/schema/resource_mws_ncc_binding.go new file mode 100644 index 00000000..8beafb6f --- /dev/null +++ b/bundle/internal/tf/schema/resource_mws_ncc_binding.go @@ -0,0 +1,9 @@ +// Generated from Databricks Terraform provider schema. DO NOT EDIT. + +package schema + +type ResourceMwsNccBinding struct { + Id string `json:"id,omitempty"` + NetworkConnectivityConfigId string `json:"network_connectivity_config_id"` + WorkspaceId int `json:"workspace_id"` +} diff --git a/bundle/internal/tf/schema/resource_mws_ncc_private_endpoint_rule.go b/bundle/internal/tf/schema/resource_mws_ncc_private_endpoint_rule.go new file mode 100644 index 00000000..2acb374b --- /dev/null +++ b/bundle/internal/tf/schema/resource_mws_ncc_private_endpoint_rule.go @@ -0,0 +1,17 @@ +// Generated from Databricks Terraform provider schema. DO NOT EDIT. + +package schema + +type ResourceMwsNccPrivateEndpointRule struct { + ConnectionState string `json:"connection_state,omitempty"` + CreationTime int `json:"creation_time,omitempty"` + Deactivated bool `json:"deactivated,omitempty"` + DeactivatedAt int `json:"deactivated_at,omitempty"` + EndpointName string `json:"endpoint_name,omitempty"` + GroupId string `json:"group_id"` + Id string `json:"id,omitempty"` + NetworkConnectivityConfigId string `json:"network_connectivity_config_id"` + ResourceId string `json:"resource_id"` + RuleId string `json:"rule_id,omitempty"` + UpdatedTime int `json:"updated_time,omitempty"` +} diff --git a/bundle/internal/tf/schema/resource_mws_network_connectivity_config.go b/bundle/internal/tf/schema/resource_mws_network_connectivity_config.go new file mode 100644 index 00000000..64ebab22 --- /dev/null +++ b/bundle/internal/tf/schema/resource_mws_network_connectivity_config.go @@ -0,0 +1,51 @@ +// Generated from Databricks Terraform provider schema. DO NOT EDIT. + +package schema + +type ResourceMwsNetworkConnectivityConfigEgressConfigDefaultRulesAwsStableIpRule struct { + CidrBlocks []string `json:"cidr_blocks,omitempty"` +} + +type ResourceMwsNetworkConnectivityConfigEgressConfigDefaultRulesAzureServiceEndpointRule struct { + Subnets []string `json:"subnets,omitempty"` + TargetRegion string `json:"target_region,omitempty"` + TargetServices []string `json:"target_services,omitempty"` +} + +type ResourceMwsNetworkConnectivityConfigEgressConfigDefaultRules struct { + AwsStableIpRule *ResourceMwsNetworkConnectivityConfigEgressConfigDefaultRulesAwsStableIpRule `json:"aws_stable_ip_rule,omitempty"` + AzureServiceEndpointRule *ResourceMwsNetworkConnectivityConfigEgressConfigDefaultRulesAzureServiceEndpointRule `json:"azure_service_endpoint_rule,omitempty"` +} + +type ResourceMwsNetworkConnectivityConfigEgressConfigTargetRulesAzurePrivateEndpointRules struct { + ConnectionState string `json:"connection_state,omitempty"` + CreationTime int `json:"creation_time,omitempty"` + Deactivated bool `json:"deactivated,omitempty"` + DeactivatedAt int `json:"deactivated_at,omitempty"` + EndpointName string `json:"endpoint_name,omitempty"` + GroupId string `json:"group_id,omitempty"` + NetworkConnectivityConfigId string `json:"network_connectivity_config_id,omitempty"` + ResourceId string `json:"resource_id,omitempty"` + RuleId string `json:"rule_id,omitempty"` + UpdatedTime int `json:"updated_time,omitempty"` +} + +type ResourceMwsNetworkConnectivityConfigEgressConfigTargetRules struct { + AzurePrivateEndpointRules []ResourceMwsNetworkConnectivityConfigEgressConfigTargetRulesAzurePrivateEndpointRules `json:"azure_private_endpoint_rules,omitempty"` +} + +type ResourceMwsNetworkConnectivityConfigEgressConfig struct { + DefaultRules *ResourceMwsNetworkConnectivityConfigEgressConfigDefaultRules `json:"default_rules,omitempty"` + TargetRules *ResourceMwsNetworkConnectivityConfigEgressConfigTargetRules `json:"target_rules,omitempty"` +} + +type ResourceMwsNetworkConnectivityConfig struct { + AccountId string `json:"account_id,omitempty"` + CreationTime int `json:"creation_time,omitempty"` + Id string `json:"id,omitempty"` + Name string `json:"name"` + NetworkConnectivityConfigId string `json:"network_connectivity_config_id,omitempty"` + Region string `json:"region"` + UpdatedTime int `json:"updated_time,omitempty"` + EgressConfig *ResourceMwsNetworkConnectivityConfigEgressConfig `json:"egress_config,omitempty"` +} diff --git a/bundle/internal/tf/schema/resources.go b/bundle/internal/tf/schema/resources.go index b1b1841d..e5eacc86 100644 --- a/bundle/internal/tf/schema/resources.go +++ b/bundle/internal/tf/schema/resources.go @@ -45,6 +45,9 @@ type Resources struct { MwsCredentials map[string]any `json:"databricks_mws_credentials,omitempty"` MwsCustomerManagedKeys map[string]any `json:"databricks_mws_customer_managed_keys,omitempty"` MwsLogDelivery map[string]any `json:"databricks_mws_log_delivery,omitempty"` + MwsNccBinding map[string]any `json:"databricks_mws_ncc_binding,omitempty"` + MwsNccPrivateEndpointRule map[string]any `json:"databricks_mws_ncc_private_endpoint_rule,omitempty"` + MwsNetworkConnectivityConfig map[string]any `json:"databricks_mws_network_connectivity_config,omitempty"` MwsNetworks map[string]any `json:"databricks_mws_networks,omitempty"` MwsPermissionAssignment map[string]any `json:"databricks_mws_permission_assignment,omitempty"` MwsPrivateAccessSettings map[string]any `json:"databricks_mws_private_access_settings,omitempty"` @@ -137,6 +140,9 @@ func NewResources() *Resources { MwsCredentials: make(map[string]any), MwsCustomerManagedKeys: make(map[string]any), MwsLogDelivery: make(map[string]any), + MwsNccBinding: make(map[string]any), + MwsNccPrivateEndpointRule: make(map[string]any), + MwsNetworkConnectivityConfig: make(map[string]any), MwsNetworks: make(map[string]any), MwsPermissionAssignment: make(map[string]any), MwsPrivateAccessSettings: make(map[string]any), diff --git a/bundle/internal/tf/schema/root.go b/bundle/internal/tf/schema/root.go index be6852bc..50d05daa 100644 --- a/bundle/internal/tf/schema/root.go +++ b/bundle/internal/tf/schema/root.go @@ -21,7 +21,7 @@ type Root struct { const ProviderHost = "registry.terraform.io" const ProviderSource = "databricks/databricks" -const ProviderVersion = "1.40.0" +const ProviderVersion = "1.42.0" func NewRoot() *Root { return &Root{