Skip to content

Commit

Permalink
Upgrade terraform-provider-databricks to v1.21.0 (#153)
Browse files Browse the repository at this point in the history
* make tfgen

* make build_sdks

* Fix lint -> Remove deprecated functions

---------

Co-authored-by: pulumi-bot <runner@fv-az455-920.5mqodooyfmgunjgvckzlc4qzae.dx.internal.cloudapp.net>
Co-authored-by: Ian Wahbe <ian@wahbe.com>
  • Loading branch information
3 people authored Jul 10, 2023
1 parent 78a13e3 commit 84f3536
Show file tree
Hide file tree
Showing 153 changed files with 9,688 additions and 616 deletions.
108 changes: 98 additions & 10 deletions provider/cmd/pulumi-resource-databricks/bridge-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,16 @@
"current": "databricks:index/job:Job",
"majorVersion": 1,
"fields": {
"compute": {
"maxItemsOne": false,
"elem": {
"fields": {
"spec": {
"maxItemsOne": true
}
}
}
},
"continuous": {
"maxItemsOne": true
},
Expand Down Expand Up @@ -556,6 +566,9 @@
"maxItemsOne": false,
"elem": {
"fields": {
"condition_task": {
"maxItemsOne": true
},
"dbt_task": {
"maxItemsOne": true,
"elem": {
Expand Down Expand Up @@ -749,10 +762,24 @@
"elem": {
"fields": {
"alert": {
"maxItemsOne": true
"maxItemsOne": true,
"elem": {
"fields": {
"subscriptions": {
"maxItemsOne": false
}
}
}
},
"dashboard": {
"maxItemsOne": true
"maxItemsOne": true,
"elem": {
"fields": {
"subscriptions": {
"maxItemsOne": false
}
}
}
},
"file": {
"maxItemsOne": true
Expand Down Expand Up @@ -1794,6 +1821,16 @@
"maxItemsOne": true,
"elem": {
"fields": {
"compute": {
"maxItemsOne": false,
"elem": {
"fields": {
"spec": {
"maxItemsOne": true
}
}
}
},
"continuous": {
"maxItemsOne": true
},
Expand Down Expand Up @@ -2098,6 +2135,9 @@
"maxItemsOne": false,
"elem": {
"fields": {
"condition_task": {
"maxItemsOne": true
},
"dbt_task": {
"maxItemsOne": true,
"elem": {
Expand Down Expand Up @@ -2291,10 +2331,24 @@
"elem": {
"fields": {
"alert": {
"maxItemsOne": true
"maxItemsOne": true,
"elem": {
"fields": {
"subscriptions": {
"maxItemsOne": false
}
}
}
},
"dashboard": {
"maxItemsOne": true
"maxItemsOne": true,
"elem": {
"fields": {
"subscriptions": {
"maxItemsOne": false
}
}
}
},
"file": {
"maxItemsOne": true
Expand Down Expand Up @@ -2698,6 +2752,9 @@
"databricks:index/InstancePoolPreloadedDockerImage:InstancePoolPreloadedDockerImage": {
"basicAuth": "basic_auth"
},
"databricks:index/JobCompute:JobCompute": {
"computeKey": "compute_key"
},
"databricks:index/JobContinuous:JobContinuous": {
"pauseStatus": "pause_status"
},
Expand Down Expand Up @@ -2906,6 +2963,8 @@
"pythonFile": "python_file"
},
"databricks:index/JobTask:JobTask": {
"computeKey": "compute_key",
"conditionTask": "condition_task",
"dbtTask": "dbt_task",
"dependsOns": "depends_on",
"emailNotifications": "email_notifications",
Expand Down Expand Up @@ -3043,10 +3102,21 @@
"warehouseId": "warehouse_id"
},
"databricks:index/JobTaskSqlTaskAlert:JobTaskSqlTaskAlert": {
"alertId": "alert_id"
"alertId": "alert_id",
"pauseSubscriptions": "pause_subscriptions"
},
"databricks:index/JobTaskSqlTaskAlertSubscription:JobTaskSqlTaskAlertSubscription": {
"destinationId": "destination_id",
"userName": "user_name"
},
"databricks:index/JobTaskSqlTaskDashboard:JobTaskSqlTaskDashboard": {
"dashboardId": "dashboard_id"
"customSubject": "custom_subject",
"dashboardId": "dashboard_id",
"pauseSubscriptions": "pause_subscriptions"
},
"databricks:index/JobTaskSqlTaskDashboardSubscription:JobTaskSqlTaskDashboardSubscription": {
"destinationId": "destination_id",
"userName": "user_name"
},
"databricks:index/JobTaskSqlTaskQuery:JobTaskSqlTaskQuery": {
"queryId": "query_id"
Expand All @@ -3056,7 +3126,7 @@
"pauseStatus": "pause_status"
},
"databricks:index/JobTriggerFileArrival:JobTriggerFileArrival": {
"minTimeBetweenTriggerSeconds": "min_time_between_trigger_seconds",
"minTimeBetweenTriggersSeconds": "min_time_between_triggers_seconds",
"waitAfterLastChangeSeconds": "wait_after_last_change_seconds"
},
"databricks:index/JobWebhookNotifications:JobWebhookNotifications": {
Expand Down Expand Up @@ -3665,6 +3735,7 @@
"runAsUserName": "run_as_user_name"
},
"databricks:index/getJobJobSettingsSettings:getJobJobSettingsSettings": {
"computes": "compute",
"dbtTask": "dbt_task",
"emailNotifications": "email_notifications",
"existingClusterId": "existing_cluster_id",
Expand All @@ -3688,6 +3759,9 @@
"timeoutSeconds": "timeout_seconds",
"webhookNotifications": "webhook_notifications"
},
"databricks:index/getJobJobSettingsSettingsCompute:getJobJobSettingsSettingsCompute": {
"computeKey": "compute_key"
},
"databricks:index/getJobJobSettingsSettingsContinuous:getJobJobSettingsSettingsContinuous": {
"pauseStatus": "pause_status"
},
Expand Down Expand Up @@ -3896,6 +3970,8 @@
"pythonFile": "python_file"
},
"databricks:index/getJobJobSettingsSettingsTask:getJobJobSettingsSettingsTask": {
"computeKey": "compute_key",
"conditionTask": "condition_task",
"dbtTask": "dbt_task",
"dependsOns": "depends_on",
"emailNotifications": "email_notifications",
Expand Down Expand Up @@ -4033,10 +4109,21 @@
"warehouseId": "warehouse_id"
},
"databricks:index/getJobJobSettingsSettingsTaskSqlTaskAlert:getJobJobSettingsSettingsTaskSqlTaskAlert": {
"alertId": "alert_id"
"alertId": "alert_id",
"pauseSubscriptions": "pause_subscriptions"
},
"databricks:index/getJobJobSettingsSettingsTaskSqlTaskAlertSubscription:getJobJobSettingsSettingsTaskSqlTaskAlertSubscription": {
"destinationId": "destination_id",
"userName": "user_name"
},
"databricks:index/getJobJobSettingsSettingsTaskSqlTaskDashboard:getJobJobSettingsSettingsTaskSqlTaskDashboard": {
"dashboardId": "dashboard_id"
"customSubject": "custom_subject",
"dashboardId": "dashboard_id",
"pauseSubscriptions": "pause_subscriptions"
},
"databricks:index/getJobJobSettingsSettingsTaskSqlTaskDashboardSubscription:getJobJobSettingsSettingsTaskSqlTaskDashboardSubscription": {
"destinationId": "destination_id",
"userName": "user_name"
},
"databricks:index/getJobJobSettingsSettingsTaskSqlTaskQuery:getJobJobSettingsSettingsTaskSqlTaskQuery": {
"queryId": "query_id"
Expand All @@ -4046,7 +4133,7 @@
"pauseStatus": "pause_status"
},
"databricks:index/getJobJobSettingsSettingsTriggerFileArrival:getJobJobSettingsSettingsTriggerFileArrival": {
"minTimeBetweenTriggerSeconds": "min_time_between_trigger_seconds",
"minTimeBetweenTriggersSeconds": "min_time_between_triggers_seconds",
"waitAfterLastChangeSeconds": "wait_after_last_change_seconds"
},
"databricks:index/getJobJobSettingsSettingsWebhookNotifications:getJobJobSettingsSettingsWebhookNotifications": {
Expand Down Expand Up @@ -4214,6 +4301,7 @@
},
"databricks:index/job:Job": {
"alwaysRunning": "always_running",
"computes": "compute",
"dbtTask": "dbt_task",
"emailNotifications": "email_notifications",
"existingClusterId": "existing_cluster_id",
Expand Down
241 changes: 227 additions & 14 deletions provider/cmd/pulumi-resource-databricks/schema.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraf

require (
github.com/databricks/databricks-sdk-go v0.12.0
github.com/databricks/terraform-provider-databricks v1.20.0
github.com/pulumi/pulumi-terraform-bridge/v3 v3.51.1
github.com/databricks/terraform-provider-databricks v1.21.0
github.com/pulumi/pulumi-terraform-bridge/v3 v3.53.0
github.com/pulumi/pulumi/sdk/v3 v3.73.1-0.20230623071431-db579129f4c9
)

Expand Down
8 changes: 4 additions & 4 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,8 @@ github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/
github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I=
github.com/databricks/databricks-sdk-go v0.12.0 h1:VgMJpvEiyRRrJ0mQx22Rkc73zjxUe125Ou9c5C99phM=
github.com/databricks/databricks-sdk-go v0.12.0/go.mod h1:h/oWnnfWcJQAotAhZS/GMnlcaE/8WhuZ5Vj7el/6Gn8=
github.com/databricks/terraform-provider-databricks v1.20.0 h1:7tkxm+CViG6VkdyED+JKLmUJPaFKlDzrN/1AmA8yHnc=
github.com/databricks/terraform-provider-databricks v1.20.0/go.mod h1:l64j3+lZPIP6Dr7vKkqAfoJXfFlGhFbmqLsK1yxacpg=
github.com/databricks/terraform-provider-databricks v1.21.0 h1:KS5WM7yU7QXd0crwkEl9imJBIanUTeGa6vNz3bmEwIA=
github.com/databricks/terraform-provider-databricks v1.21.0/go.mod h1:l64j3+lZPIP6Dr7vKkqAfoJXfFlGhFbmqLsK1yxacpg=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -2065,8 +2065,8 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T
github.com/pulumi/pulumi-java/pkg v0.9.4 h1:gIQZmlUI1o9ye8CL2XFqtmAX6Lwr9uj/+HzjboiSmK4=
github.com/pulumi/pulumi-java/pkg v0.9.4/go.mod h1:c6rSw/+q4O0IImgJ9axxoC6QesbPYWBaG5gimbHouUQ=
github.com/pulumi/pulumi-terraform-bridge/testing v0.0.1 h1:SCg1gjfY9N4yn8U8peIUYATifjoDABkyR7H9lmefsfc=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.51.1 h1:ZvKmqrhICJISvyhAJh4/wxE6kbkMasZYRft3aoy3A3g=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.51.1/go.mod h1:Bm1kuEs0xouFxEG2Lv/I3OhnME+VId9DbkRClnwFqsI=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.53.0 h1:XP754+36CpyiT5tEzqd43U8gYGqDML9hkiWMaoV0WG0=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.53.0/go.mod h1:Bm1kuEs0xouFxEG2Lv/I3OhnME+VId9DbkRClnwFqsI=
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 h1:rIzMmtcVpPX8ynaz6/nW5AHNY63DiNfCohqmxWvMpM4=
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4/go.mod h1:Kt8RIZWa/N8rW3+0g6NrqCBmF3o+HuIhFaZpssEkG6w=
github.com/pulumi/pulumi-yaml v1.1.1 h1:8pyBNIU8+ym0wYpjhsCqN+cutygfK1XbhY2YEeNfyXY=
Expand Down
11 changes: 4 additions & 7 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ import (
databricksProv "github.com/databricks/terraform-provider-databricks/provider"
"github.com/pulumi/pulumi-databricks/provider/pkg/version"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/x"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens"
shimv2 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2"
"github.com/pulumi/pulumi/sdk/v3/go/common/util/contract"
)

//go:embed cmd/pulumi-resource-databricks/bridge-metadata.json
Expand Down Expand Up @@ -241,12 +240,10 @@ func Provider() tfbridge.ProviderInfo {
},
}

err := x.ComputeDefaults(&prov, x.TokensSingleModule("databricks_",
mainMod, x.MakeStandardToken(mainPkg)))
contract.AssertNoErrorf(err, "auto token mapping failed")
prov.MustComputeTokens(tokens.SingleModule("databricks_",
mainMod, tokens.MakeStandard(mainPkg)))

err = x.AutoAliasing(&prov, prov.GetMetadata())
contract.AssertNoErrorf(err, "auto aliasing failed")
prov.MustApplyAutoAliases()
prov.SetAutonaming(255, "-")

return prov
Expand Down
8 changes: 8 additions & 0 deletions sdk/dotnet/Inputs/GetJobJobSettingsSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ namespace Pulumi.Databricks.Inputs

public sealed class GetJobJobSettingsSettingsArgs : global::Pulumi.InvokeArgs
{
[Input("computes")]
private List<Inputs.GetJobJobSettingsSettingsComputeArgs>? _computes;
public List<Inputs.GetJobJobSettingsSettingsComputeArgs> Computes
{
get => _computes ?? (_computes = new List<Inputs.GetJobJobSettingsSettingsComputeArgs>());
set => _computes = value;
}

[Input("continuous")]
public Inputs.GetJobJobSettingsSettingsContinuousArgs? Continuous { get; set; }

Expand Down
8 changes: 8 additions & 0 deletions sdk/dotnet/Inputs/GetJobJobSettingsSettingsArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ namespace Pulumi.Databricks.Inputs

public sealed class GetJobJobSettingsSettingsInputArgs : global::Pulumi.ResourceArgs
{
[Input("computes")]
private InputList<Inputs.GetJobJobSettingsSettingsComputeInputArgs>? _computes;
public InputList<Inputs.GetJobJobSettingsSettingsComputeInputArgs> Computes
{
get => _computes ?? (_computes = new InputList<Inputs.GetJobJobSettingsSettingsComputeInputArgs>());
set => _computes = value;
}

[Input("continuous")]
public Input<Inputs.GetJobJobSettingsSettingsContinuousInputArgs>? Continuous { get; set; }

Expand Down
26 changes: 26 additions & 0 deletions sdk/dotnet/Inputs/GetJobJobSettingsSettingsCompute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Databricks.Inputs
{

public sealed class GetJobJobSettingsSettingsComputeArgs : global::Pulumi.InvokeArgs
{
[Input("computeKey")]
public string? ComputeKey { get; set; }

[Input("spec")]
public Inputs.GetJobJobSettingsSettingsComputeSpecArgs? Spec { get; set; }

public GetJobJobSettingsSettingsComputeArgs()
{
}
public static new GetJobJobSettingsSettingsComputeArgs Empty => new GetJobJobSettingsSettingsComputeArgs();
}
}
26 changes: 26 additions & 0 deletions sdk/dotnet/Inputs/GetJobJobSettingsSettingsComputeArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Databricks.Inputs
{

public sealed class GetJobJobSettingsSettingsComputeInputArgs : global::Pulumi.ResourceArgs
{
[Input("computeKey")]
public Input<string>? ComputeKey { get; set; }

[Input("spec")]
public Input<Inputs.GetJobJobSettingsSettingsComputeSpecInputArgs>? Spec { get; set; }

public GetJobJobSettingsSettingsComputeInputArgs()
{
}
public static new GetJobJobSettingsSettingsComputeInputArgs Empty => new GetJobJobSettingsSettingsComputeInputArgs();
}
}
23 changes: 23 additions & 0 deletions sdk/dotnet/Inputs/GetJobJobSettingsSettingsComputeSpec.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Databricks.Inputs
{

public sealed class GetJobJobSettingsSettingsComputeSpecArgs : global::Pulumi.InvokeArgs
{
[Input("kind")]
public string? Kind { get; set; }

public GetJobJobSettingsSettingsComputeSpecArgs()
{
}
public static new GetJobJobSettingsSettingsComputeSpecArgs Empty => new GetJobJobSettingsSettingsComputeSpecArgs();
}
}
Loading

0 comments on commit 84f3536

Please sign in to comment.