@pulumi/databricks 1.78.0-alpha.1762407761 → 1.78.0-alpha.1762486781

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/accountFederationPolicy.d.ts +13 -0
  2. package/accountFederationPolicy.js +13 -0
  3. package/accountFederationPolicy.js.map +1 -1
  4. package/accountNetworkPolicy.d.ts +26 -0
  5. package/accountNetworkPolicy.js +26 -0
  6. package/accountNetworkPolicy.js.map +1 -1
  7. package/alertV2.d.ts +37 -0
  8. package/alertV2.js +37 -0
  9. package/alertV2.js.map +1 -1
  10. package/app.d.ts +33 -0
  11. package/app.js +33 -0
  12. package/app.js.map +1 -1
  13. package/appsSettingsCustomTemplate.d.ts +34 -0
  14. package/appsSettingsCustomTemplate.js +34 -0
  15. package/appsSettingsCustomTemplate.js.map +1 -1
  16. package/catalog.d.ts +3 -3
  17. package/clusterPolicy.d.ts +63 -0
  18. package/clusterPolicy.js +63 -0
  19. package/clusterPolicy.js.map +1 -1
  20. package/config/vars.d.ts +2 -0
  21. package/config/vars.js +12 -0
  22. package/config/vars.js.map +1 -1
  23. package/databaseSyncedDatabaseTable.d.ts +113 -0
  24. package/databaseSyncedDatabaseTable.js +113 -0
  25. package/databaseSyncedDatabaseTable.js.map +1 -1
  26. package/externalLocation.d.ts +75 -3
  27. package/externalLocation.js +72 -0
  28. package/externalLocation.js.map +1 -1
  29. package/file.d.ts +1 -1
  30. package/file.js +1 -1
  31. package/getAwsAssumeRolePolicy.d.ts +10 -10
  32. package/getAwsAssumeRolePolicy.js +10 -10
  33. package/getAwsBucketPolicy.d.ts +12 -12
  34. package/getAwsBucketPolicy.js +12 -12
  35. package/getAwsUnityCatalogAssumeRolePolicy.d.ts +10 -10
  36. package/getAwsUnityCatalogAssumeRolePolicy.js +10 -10
  37. package/getAwsUnityCatalogPolicy.d.ts +10 -10
  38. package/getAwsUnityCatalogPolicy.js +10 -10
  39. package/getCluster.d.ts +62 -0
  40. package/getCluster.js +62 -0
  41. package/getCluster.js.map +1 -1
  42. package/getCurrentConfig.d.ts +4 -4
  43. package/getCurrentConfig.js +4 -4
  44. package/getMetastore.d.ts +4 -4
  45. package/getMetastore.js +4 -4
  46. package/getNotebook.d.ts +11 -0
  47. package/getNotebook.js +2 -0
  48. package/getNotebook.js.map +1 -1
  49. package/getServicePrincipals.d.ts +88 -0
  50. package/getServicePrincipals.js +88 -0
  51. package/getServicePrincipals.js.map +1 -1
  52. package/instanceProfile.d.ts +0 -107
  53. package/instanceProfile.js +0 -107
  54. package/instanceProfile.js.map +1 -1
  55. package/metastore.d.ts +46 -3
  56. package/metastore.js +43 -0
  57. package/metastore.js.map +1 -1
  58. package/metastoreDataAccess.d.ts +28 -0
  59. package/metastoreDataAccess.js +28 -0
  60. package/metastoreDataAccess.js.map +1 -1
  61. package/mlflowWebhook.d.ts +2 -2
  62. package/mlflowWebhook.js +2 -2
  63. package/mwsCredentials.d.ts +4 -4
  64. package/mwsCredentials.js +4 -4
  65. package/mwsCustomerManagedKeys.d.ts +0 -152
  66. package/mwsCustomerManagedKeys.js +0 -152
  67. package/mwsCustomerManagedKeys.js.map +1 -1
  68. package/mwsLogDelivery.d.ts +90 -0
  69. package/mwsLogDelivery.js +90 -0
  70. package/mwsLogDelivery.js.map +1 -1
  71. package/mwsStorageConfigurations.d.ts +5 -5
  72. package/mwsStorageConfigurations.js +5 -5
  73. package/mwsVpcEndpoint.d.ts +5 -5
  74. package/mwsVpcEndpoint.js +5 -5
  75. package/mwsWorkspaces.d.ts +24 -21
  76. package/mwsWorkspaces.js +20 -18
  77. package/mwsWorkspaces.js.map +1 -1
  78. package/notebook.d.ts +14 -0
  79. package/notebook.js +2 -0
  80. package/notebook.js.map +1 -1
  81. package/package.json +2 -2
  82. package/permissionAssignment.d.ts +14 -0
  83. package/permissionAssignment.js +2 -0
  84. package/permissionAssignment.js.map +1 -1
  85. package/permissions.d.ts +3 -3
  86. package/permissions.js +3 -3
  87. package/provider.d.ts +3 -0
  88. package/provider.js +2 -0
  89. package/provider.js.map +1 -1
  90. package/recipient.d.ts +41 -0
  91. package/recipient.js +41 -0
  92. package/recipient.js.map +1 -1
  93. package/registeredModel.d.ts +3 -3
  94. package/schema.d.ts +3 -3
  95. package/servicePrincipalFederationPolicy.d.ts +15 -0
  96. package/servicePrincipalFederationPolicy.js +15 -0
  97. package/servicePrincipalFederationPolicy.js.map +1 -1
  98. package/sqlTable.d.ts +3 -3
  99. package/types/input.d.ts +30 -42
  100. package/types/output.d.ts +24 -42
  101. package/volume.d.ts +3 -3
@@ -37,6 +37,34 @@ const utilities = require("./utilities");
37
37
  *
38
38
  * For Azure using managed identity as credential (recommended)
39
39
  *
40
+ * ```typescript
41
+ * import * as pulumi from "@pulumi/pulumi";
42
+ * import * as databricks from "@pulumi/databricks";
43
+ * import * as std from "@pulumi/std";
44
+ *
45
+ * const _this = new databricks.Metastore("this", {
46
+ * name: "primary",
47
+ * storageRoot: std.format({
48
+ * input: "abfss://%s@%s.dfs.core.windows.net/",
49
+ * args: [
50
+ * unityCatalog.name,
51
+ * unityCatalogAzurermStorageAccount.name,
52
+ * ],
53
+ * }).then(invoke => invoke.result),
54
+ * owner: "uc admins",
55
+ * region: "eastus",
56
+ * forceDestroy: true,
57
+ * });
58
+ * const thisMetastoreDataAccess = new databricks.MetastoreDataAccess("this", {
59
+ * metastoreId: _this.id,
60
+ * name: "mi_dac",
61
+ * azureManagedIdentity: {
62
+ * accessConnectorId: accessConnectorId,
63
+ * },
64
+ * isDefault: true,
65
+ * });
66
+ * ```
67
+ *
40
68
  * ## Import
41
69
  *
42
70
  * This resource can be imported by combination of metastore id and the data access name.
@@ -1 +1 @@
1
- {"version":3,"file":"metastoreDataAccess.js","sourceRoot":"","sources":["../metastoreDataAccess.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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cAAc,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;;AAlGL,kDAmGC;AArFG,gBAAgB;AACO,gCAAY,GAAG,0DAA0D,CAAC"}
@@ -26,9 +26,9 @@ import * as outputs from "./types/output";
26
26
  * contentBase64: std.base64encode({
27
27
  * input: `import json
28
28
  *
29
- * event_message = dbutils.widgets.get("event_message")
29
+ * event_message = dbutils.widgets.get(\\"event_message\\")
30
30
  * event_message_dict = json.loads(event_message)
31
- * print(f"event data={event_message_dict}")
31
+ * print(f\\"event data={event_message_dict}\\")
32
32
  * `,
33
33
  * }).then(invoke => invoke.result),
34
34
  * });
package/mlflowWebhook.js CHANGED
@@ -30,9 +30,9 @@ const utilities = require("./utilities");
30
30
  * contentBase64: std.base64encode({
31
31
  * input: `import json
32
32
  *
33
- * event_message = dbutils.widgets.get("event_message")
33
+ * event_message = dbutils.widgets.get(\\"event_message\\")
34
34
  * event_message_dict = json.loads(event_message)
35
- * print(f"event data={event_message_dict}")
35
+ * print(f\\"event data={event_message_dict}\\")
36
36
  * `,
37
37
  * }).then(invoke => invoke.result),
38
38
  * });
@@ -15,16 +15,16 @@ import * as pulumi from "@pulumi/pulumi";
15
15
  * const _this = databricks.getAwsAssumeRolePolicy({
16
16
  * externalId: databricksAccountId,
17
17
  * });
18
- * const crossAccountRole = new aws.iam.Role("cross_account_role", {
18
+ * const crossAccountRole = new aws.index.IamRole("cross_account_role", {
19
19
  * name: `${prefix}-crossaccount`,
20
- * assumeRolePolicy: _this.then(_this => _this.json),
20
+ * assumeRolePolicy: _this.json,
21
21
  * tags: tags,
22
22
  * });
23
23
  * const thisGetAwsCrossAccountPolicy = databricks.getAwsCrossAccountPolicy({});
24
- * const thisRolePolicy = new aws.iam.RolePolicy("this", {
24
+ * const thisIamRolePolicy = new aws.index.IamRolePolicy("this", {
25
25
  * name: `${prefix}-policy`,
26
26
  * role: crossAccountRole.id,
27
- * policy: thisGetAwsCrossAccountPolicy.then(thisGetAwsCrossAccountPolicy => thisGetAwsCrossAccountPolicy.json),
27
+ * policy: thisGetAwsCrossAccountPolicy.json,
28
28
  * });
29
29
  * const thisMwsCredentials = new databricks.MwsCredentials("this", {
30
30
  * credentialsName: `${prefix}-creds`,
package/mwsCredentials.js CHANGED
@@ -21,16 +21,16 @@ const utilities = require("./utilities");
21
21
  * const _this = databricks.getAwsAssumeRolePolicy({
22
22
  * externalId: databricksAccountId,
23
23
  * });
24
- * const crossAccountRole = new aws.iam.Role("cross_account_role", {
24
+ * const crossAccountRole = new aws.index.IamRole("cross_account_role", {
25
25
  * name: `${prefix}-crossaccount`,
26
- * assumeRolePolicy: _this.then(_this => _this.json),
26
+ * assumeRolePolicy: _this.json,
27
27
  * tags: tags,
28
28
  * });
29
29
  * const thisGetAwsCrossAccountPolicy = databricks.getAwsCrossAccountPolicy({});
30
- * const thisRolePolicy = new aws.iam.RolePolicy("this", {
30
+ * const thisIamRolePolicy = new aws.index.IamRolePolicy("this", {
31
31
  * name: `${prefix}-policy`,
32
32
  * role: crossAccountRole.id,
33
- * policy: thisGetAwsCrossAccountPolicy.then(thisGetAwsCrossAccountPolicy => thisGetAwsCrossAccountPolicy.json),
33
+ * policy: thisGetAwsCrossAccountPolicy.json,
34
34
  * });
35
35
  * const thisMwsCredentials = new databricks.MwsCredentials("this", {
36
36
  * credentialsName: `${prefix}-creds`,
@@ -10,60 +10,6 @@ import * as outputs from "./types/output";
10
10
  *
11
11
  * You must configure this during workspace creation
12
12
  *
13
- * ### For AWS
14
- *
15
- * ```typescript
16
- * import * as pulumi from "@pulumi/pulumi";
17
- * import * as aws from "@pulumi/aws";
18
- * import * as databricks from "@pulumi/databricks";
19
- *
20
- * const config = new pulumi.Config();
21
- * // Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
22
- * const databricksAccountId = config.requireObject<any>("databricksAccountId");
23
- * const current = aws.getCallerIdentity({});
24
- * const databricksManagedServicesCmk = current.then(current => aws.iam.getPolicyDocument({
25
- * version: "2012-10-17",
26
- * statements: [
27
- * {
28
- * sid: "Enable IAM User Permissions",
29
- * effect: "Allow",
30
- * principals: [{
31
- * type: "AWS",
32
- * identifiers: [current.accountId],
33
- * }],
34
- * actions: ["kms:*"],
35
- * resources: ["*"],
36
- * },
37
- * {
38
- * sid: "Allow Databricks to use KMS key for control plane managed services",
39
- * effect: "Allow",
40
- * principals: [{
41
- * type: "AWS",
42
- * identifiers: ["arn:aws:iam::414351767826:root"],
43
- * }],
44
- * actions: [
45
- * "kms:Encrypt",
46
- * "kms:Decrypt",
47
- * ],
48
- * resources: ["*"],
49
- * },
50
- * ],
51
- * }));
52
- * const managedServicesCustomerManagedKey = new aws.kms.Key("managed_services_customer_managed_key", {policy: databricksManagedServicesCmk.then(databricksManagedServicesCmk => databricksManagedServicesCmk.json)});
53
- * const managedServicesCustomerManagedKeyAlias = new aws.kms.Alias("managed_services_customer_managed_key_alias", {
54
- * name: "alias/managed-services-customer-managed-key-alias",
55
- * targetKeyId: managedServicesCustomerManagedKey.keyId,
56
- * });
57
- * const managedServices = new databricks.MwsCustomerManagedKeys("managed_services", {
58
- * accountId: databricksAccountId,
59
- * awsKeyInfo: {
60
- * keyArn: managedServicesCustomerManagedKey.arn,
61
- * keyAlias: managedServicesCustomerManagedKeyAlias.name,
62
- * },
63
- * useCases: ["MANAGED_SERVICES"],
64
- * });
65
- * ```
66
- *
67
13
  * ### For GCP
68
14
  *
69
15
  * ```typescript
@@ -86,104 +32,6 @@ import * as outputs from "./types/output";
86
32
  *
87
33
  * ### Customer-managed key for workspace storage
88
34
  *
89
- * ### For AWS
90
- *
91
- * ```typescript
92
- * import * as pulumi from "@pulumi/pulumi";
93
- * import * as aws from "@pulumi/aws";
94
- * import * as databricks from "@pulumi/databricks";
95
- *
96
- * const config = new pulumi.Config();
97
- * // Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
98
- * const databricksAccountId = config.requireObject<any>("databricksAccountId");
99
- * // AWS ARN for the Databricks cross account role
100
- * const databricksCrossAccountRole = config.requireObject<any>("databricksCrossAccountRole");
101
- * const current = aws.getCallerIdentity({});
102
- * const databricksStorageCmk = current.then(current => aws.iam.getPolicyDocument({
103
- * version: "2012-10-17",
104
- * statements: [
105
- * {
106
- * sid: "Enable IAM User Permissions",
107
- * effect: "Allow",
108
- * principals: [{
109
- * type: "AWS",
110
- * identifiers: [current.accountId],
111
- * }],
112
- * actions: ["kms:*"],
113
- * resources: ["*"],
114
- * },
115
- * {
116
- * sid: "Allow Databricks to use KMS key for DBFS",
117
- * effect: "Allow",
118
- * principals: [{
119
- * type: "AWS",
120
- * identifiers: ["arn:aws:iam::414351767826:root"],
121
- * }],
122
- * actions: [
123
- * "kms:Encrypt",
124
- * "kms:Decrypt",
125
- * "kms:ReEncrypt*",
126
- * "kms:GenerateDataKey*",
127
- * "kms:DescribeKey",
128
- * ],
129
- * resources: ["*"],
130
- * },
131
- * {
132
- * sid: "Allow Databricks to use KMS key for DBFS (Grants)",
133
- * effect: "Allow",
134
- * principals: [{
135
- * type: "AWS",
136
- * identifiers: ["arn:aws:iam::414351767826:root"],
137
- * }],
138
- * actions: [
139
- * "kms:CreateGrant",
140
- * "kms:ListGrants",
141
- * "kms:RevokeGrant",
142
- * ],
143
- * resources: ["*"],
144
- * conditions: [{
145
- * test: "Bool",
146
- * variable: "kms:GrantIsForAWSResource",
147
- * values: ["true"],
148
- * }],
149
- * },
150
- * {
151
- * sid: "Allow Databricks to use KMS key for EBS",
152
- * effect: "Allow",
153
- * principals: [{
154
- * type: "AWS",
155
- * identifiers: [databricksCrossAccountRole],
156
- * }],
157
- * actions: [
158
- * "kms:Decrypt",
159
- * "kms:GenerateDataKey*",
160
- * "kms:CreateGrant",
161
- * "kms:DescribeKey",
162
- * ],
163
- * resources: ["*"],
164
- * conditions: [{
165
- * test: "ForAnyValue:StringLike",
166
- * variable: "kms:ViaService",
167
- * values: ["ec2.*.amazonaws.com"],
168
- * }],
169
- * },
170
- * ],
171
- * }));
172
- * const storageCustomerManagedKey = new aws.kms.Key("storage_customer_managed_key", {policy: databricksStorageCmk.then(databricksStorageCmk => databricksStorageCmk.json)});
173
- * const storageCustomerManagedKeyAlias = new aws.kms.Alias("storage_customer_managed_key_alias", {
174
- * name: "alias/storage-customer-managed-key-alias",
175
- * targetKeyId: storageCustomerManagedKey.keyId,
176
- * });
177
- * const storage = new databricks.MwsCustomerManagedKeys("storage", {
178
- * accountId: databricksAccountId,
179
- * awsKeyInfo: {
180
- * keyArn: storageCustomerManagedKey.arn,
181
- * keyAlias: storageCustomerManagedKeyAlias.name,
182
- * },
183
- * useCases: ["STORAGE"],
184
- * });
185
- * ```
186
- *
187
35
  * ### For GCP
188
36
  *
189
37
  * ```typescript
@@ -14,60 +14,6 @@ const utilities = require("./utilities");
14
14
  *
15
15
  * You must configure this during workspace creation
16
16
  *
17
- * ### For AWS
18
- *
19
- * ```typescript
20
- * import * as pulumi from "@pulumi/pulumi";
21
- * import * as aws from "@pulumi/aws";
22
- * import * as databricks from "@pulumi/databricks";
23
- *
24
- * const config = new pulumi.Config();
25
- * // Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
26
- * const databricksAccountId = config.requireObject<any>("databricksAccountId");
27
- * const current = aws.getCallerIdentity({});
28
- * const databricksManagedServicesCmk = current.then(current => aws.iam.getPolicyDocument({
29
- * version: "2012-10-17",
30
- * statements: [
31
- * {
32
- * sid: "Enable IAM User Permissions",
33
- * effect: "Allow",
34
- * principals: [{
35
- * type: "AWS",
36
- * identifiers: [current.accountId],
37
- * }],
38
- * actions: ["kms:*"],
39
- * resources: ["*"],
40
- * },
41
- * {
42
- * sid: "Allow Databricks to use KMS key for control plane managed services",
43
- * effect: "Allow",
44
- * principals: [{
45
- * type: "AWS",
46
- * identifiers: ["arn:aws:iam::414351767826:root"],
47
- * }],
48
- * actions: [
49
- * "kms:Encrypt",
50
- * "kms:Decrypt",
51
- * ],
52
- * resources: ["*"],
53
- * },
54
- * ],
55
- * }));
56
- * const managedServicesCustomerManagedKey = new aws.kms.Key("managed_services_customer_managed_key", {policy: databricksManagedServicesCmk.then(databricksManagedServicesCmk => databricksManagedServicesCmk.json)});
57
- * const managedServicesCustomerManagedKeyAlias = new aws.kms.Alias("managed_services_customer_managed_key_alias", {
58
- * name: "alias/managed-services-customer-managed-key-alias",
59
- * targetKeyId: managedServicesCustomerManagedKey.keyId,
60
- * });
61
- * const managedServices = new databricks.MwsCustomerManagedKeys("managed_services", {
62
- * accountId: databricksAccountId,
63
- * awsKeyInfo: {
64
- * keyArn: managedServicesCustomerManagedKey.arn,
65
- * keyAlias: managedServicesCustomerManagedKeyAlias.name,
66
- * },
67
- * useCases: ["MANAGED_SERVICES"],
68
- * });
69
- * ```
70
- *
71
17
  * ### For GCP
72
18
  *
73
19
  * ```typescript
@@ -90,104 +36,6 @@ const utilities = require("./utilities");
90
36
  *
91
37
  * ### Customer-managed key for workspace storage
92
38
  *
93
- * ### For AWS
94
- *
95
- * ```typescript
96
- * import * as pulumi from "@pulumi/pulumi";
97
- * import * as aws from "@pulumi/aws";
98
- * import * as databricks from "@pulumi/databricks";
99
- *
100
- * const config = new pulumi.Config();
101
- * // Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
102
- * const databricksAccountId = config.requireObject<any>("databricksAccountId");
103
- * // AWS ARN for the Databricks cross account role
104
- * const databricksCrossAccountRole = config.requireObject<any>("databricksCrossAccountRole");
105
- * const current = aws.getCallerIdentity({});
106
- * const databricksStorageCmk = current.then(current => aws.iam.getPolicyDocument({
107
- * version: "2012-10-17",
108
- * statements: [
109
- * {
110
- * sid: "Enable IAM User Permissions",
111
- * effect: "Allow",
112
- * principals: [{
113
- * type: "AWS",
114
- * identifiers: [current.accountId],
115
- * }],
116
- * actions: ["kms:*"],
117
- * resources: ["*"],
118
- * },
119
- * {
120
- * sid: "Allow Databricks to use KMS key for DBFS",
121
- * effect: "Allow",
122
- * principals: [{
123
- * type: "AWS",
124
- * identifiers: ["arn:aws:iam::414351767826:root"],
125
- * }],
126
- * actions: [
127
- * "kms:Encrypt",
128
- * "kms:Decrypt",
129
- * "kms:ReEncrypt*",
130
- * "kms:GenerateDataKey*",
131
- * "kms:DescribeKey",
132
- * ],
133
- * resources: ["*"],
134
- * },
135
- * {
136
- * sid: "Allow Databricks to use KMS key for DBFS (Grants)",
137
- * effect: "Allow",
138
- * principals: [{
139
- * type: "AWS",
140
- * identifiers: ["arn:aws:iam::414351767826:root"],
141
- * }],
142
- * actions: [
143
- * "kms:CreateGrant",
144
- * "kms:ListGrants",
145
- * "kms:RevokeGrant",
146
- * ],
147
- * resources: ["*"],
148
- * conditions: [{
149
- * test: "Bool",
150
- * variable: "kms:GrantIsForAWSResource",
151
- * values: ["true"],
152
- * }],
153
- * },
154
- * {
155
- * sid: "Allow Databricks to use KMS key for EBS",
156
- * effect: "Allow",
157
- * principals: [{
158
- * type: "AWS",
159
- * identifiers: [databricksCrossAccountRole],
160
- * }],
161
- * actions: [
162
- * "kms:Decrypt",
163
- * "kms:GenerateDataKey*",
164
- * "kms:CreateGrant",
165
- * "kms:DescribeKey",
166
- * ],
167
- * resources: ["*"],
168
- * conditions: [{
169
- * test: "ForAnyValue:StringLike",
170
- * variable: "kms:ViaService",
171
- * values: ["ec2.*.amazonaws.com"],
172
- * }],
173
- * },
174
- * ],
175
- * }));
176
- * const storageCustomerManagedKey = new aws.kms.Key("storage_customer_managed_key", {policy: databricksStorageCmk.then(databricksStorageCmk => databricksStorageCmk.json)});
177
- * const storageCustomerManagedKeyAlias = new aws.kms.Alias("storage_customer_managed_key_alias", {
178
- * name: "alias/storage-customer-managed-key-alias",
179
- * targetKeyId: storageCustomerManagedKey.keyId,
180
- * });
181
- * const storage = new databricks.MwsCustomerManagedKeys("storage", {
182
- * accountId: databricksAccountId,
183
- * awsKeyInfo: {
184
- * keyArn: storageCustomerManagedKey.arn,
185
- * keyAlias: storageCustomerManagedKeyAlias.name,
186
- * },
187
- * useCases: ["STORAGE"],
188
- * });
189
- * ```
190
- *
191
39
  * ### For GCP
192
40
  *
193
41
  * ```typescript
@@ -1 +1 @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CAAC,GAAG,KAAK,EAAE,UAAU,CAAC;YACjD,cAAc,CAAC,UAAU,CAAC,GAAG,KAAK,EAAE,QAAQ,CAAC;SAChD;aAAM;YACH,MAAM,IAAI,GAAG,WAAqD,CAAC;YACnE,IAAI,IAAI,EAAE,SAAS,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC5C,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;aAC5D;YACD,IAAI,IAAI,EAAE,QAAQ,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC3C,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;aAC3D;YACD,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,EAAE,SAAS,CAAC;YAC9C,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC;YAChD,cAAc,CAAC,cAAc,CAAC,GAAG,IAAI,EAAE,YAAY,CAAC;YACpD,cAAc,CAAC,sBAAsB,CAAC,GAAG,IAAI,EAAE,oBAAoB,CAAC;YACpE,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC;YAChD,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC;SAC/C;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,sBAAsB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;;AA3FL,wDA4FC;AA9EG,gBAAgB;AACO,mCAAY,GAAG,gEAAgE,CAAC"}
@@ -6,6 +6,96 @@ import * as pulumi from "@pulumi/pulumi";
6
6
  *
7
7
  * You cannot delete a log delivery configuration, but you can disable it when you no longer need it. This fact is important because there is a limit to the number of enabled log delivery configurations that you can create for an account. You can create a maximum of two enabled configurations that use the account level (no workspace filter) and two enabled configurations for every specific workspace (a workspaceId can occur in the workspace filter for two configurations). You can re-enable a disabled configuration, but the request fails if it violates the limits previously described.
8
8
  *
9
+ * ## Example Usage
10
+ *
11
+ * End-to-end example of usage and audit log delivery:
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as aws from "@pulumi/aws";
16
+ * import * as databricks from "@pulumi/databricks";
17
+ * import * as std from "@pulumi/std";
18
+ * import * as time from "@pulumiverse/time";
19
+ *
20
+ * const config = new pulumi.Config();
21
+ * // Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
22
+ * const databricksAccountId = config.requireObject<any>("databricksAccountId");
23
+ * const logdeliveryS3Bucket = new aws.index.S3Bucket("logdelivery", {
24
+ * bucket: `${prefix}-logdelivery`,
25
+ * acl: "private",
26
+ * forceDestroy: true,
27
+ * tags: std.merge({
28
+ * input: [
29
+ * tags,
30
+ * {
31
+ * name: `${prefix}-logdelivery`,
32
+ * },
33
+ * ],
34
+ * }).result,
35
+ * });
36
+ * const logdeliveryS3BucketPublicAccessBlock = new aws.index.S3BucketPublicAccessBlock("logdelivery", {
37
+ * bucket: logdeliveryS3Bucket.id,
38
+ * ignorePublicAcls: true,
39
+ * });
40
+ * const logdelivery = databricks.getAwsAssumeRolePolicy({
41
+ * externalId: databricksAccountId,
42
+ * forLogDelivery: true,
43
+ * });
44
+ * const logdeliveryVersioning = new aws.index.S3BucketVersioning("logdelivery_versioning", {
45
+ * bucket: logdeliveryS3Bucket.id,
46
+ * versioningConfiguration: [{
47
+ * status: "Disabled",
48
+ * }],
49
+ * });
50
+ * const logdeliveryIamRole = new aws.index.IamRole("logdelivery", {
51
+ * name: `${prefix}-logdelivery`,
52
+ * description: `(${prefix}) UsageDelivery role`,
53
+ * assumeRolePolicy: logdelivery.json,
54
+ * tags: tags,
55
+ * });
56
+ * const logdeliveryGetAwsBucketPolicy = databricks.getAwsBucketPolicy({
57
+ * fullAccessRole: logdeliveryIamRole.arn,
58
+ * bucket: logdeliveryS3Bucket.bucket,
59
+ * });
60
+ * const logdeliveryS3BucketPolicy = new aws.index.S3BucketPolicy("logdelivery", {
61
+ * bucket: logdeliveryS3Bucket.id,
62
+ * policy: logdeliveryGetAwsBucketPolicy.json,
63
+ * });
64
+ * const wait = new time.Sleep("wait", {createDuration: "10s"}, {
65
+ * dependsOn: [logdeliveryIamRole],
66
+ * });
67
+ * const logWriter = new databricks.MwsCredentials("log_writer", {
68
+ * accountId: databricksAccountId,
69
+ * credentialsName: "Usage Delivery",
70
+ * roleArn: logdeliveryIamRole.arn,
71
+ * }, {
72
+ * dependsOn: [wait],
73
+ * });
74
+ * const logBucket = new databricks.MwsStorageConfigurations("log_bucket", {
75
+ * accountId: databricksAccountId,
76
+ * storageConfigurationName: "Usage Logs",
77
+ * bucketName: logdeliveryS3Bucket.bucket,
78
+ * });
79
+ * const usageLogs = new databricks.MwsLogDelivery("usage_logs", {
80
+ * accountId: databricksAccountId,
81
+ * credentialsId: logWriter.credentialsId,
82
+ * storageConfigurationId: logBucket.storageConfigurationId,
83
+ * deliveryPathPrefix: "billable-usage",
84
+ * configName: "Usage Logs",
85
+ * logType: "BILLABLE_USAGE",
86
+ * outputFormat: "CSV",
87
+ * });
88
+ * const auditLogs = new databricks.MwsLogDelivery("audit_logs", {
89
+ * accountId: databricksAccountId,
90
+ * credentialsId: logWriter.credentialsId,
91
+ * storageConfigurationId: logBucket.storageConfigurationId,
92
+ * deliveryPathPrefix: "audit-logs",
93
+ * configName: "Audit Logs",
94
+ * logType: "AUDIT_LOGS",
95
+ * outputFormat: "JSON",
96
+ * });
97
+ * ```
98
+ *
9
99
  * ## Billable Usage
10
100
  *
11
101
  * CSV files are delivered to `<delivery_path_prefix>/billable-usage/csv/` and are named `workspaceId=<workspace-id>-usageMonth=<month>.csv`, which are delivered daily by overwriting the month's CSV file for each workspace. Format of CSV file, as well as some usage examples, can be found [here](https://docs.databricks.com/administration-guide/account-settings/usage.html#download-usage-as-a-csv-file).
package/mwsLogDelivery.js CHANGED
@@ -12,6 +12,96 @@ const utilities = require("./utilities");
12
12
  *
13
13
  * You cannot delete a log delivery configuration, but you can disable it when you no longer need it. This fact is important because there is a limit to the number of enabled log delivery configurations that you can create for an account. You can create a maximum of two enabled configurations that use the account level (no workspace filter) and two enabled configurations for every specific workspace (a workspaceId can occur in the workspace filter for two configurations). You can re-enable a disabled configuration, but the request fails if it violates the limits previously described.
14
14
  *
15
+ * ## Example Usage
16
+ *
17
+ * End-to-end example of usage and audit log delivery:
18
+ *
19
+ * ```typescript
20
+ * import * as pulumi from "@pulumi/pulumi";
21
+ * import * as aws from "@pulumi/aws";
22
+ * import * as databricks from "@pulumi/databricks";
23
+ * import * as std from "@pulumi/std";
24
+ * import * as time from "@pulumiverse/time";
25
+ *
26
+ * const config = new pulumi.Config();
27
+ * // Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
28
+ * const databricksAccountId = config.requireObject<any>("databricksAccountId");
29
+ * const logdeliveryS3Bucket = new aws.index.S3Bucket("logdelivery", {
30
+ * bucket: `${prefix}-logdelivery`,
31
+ * acl: "private",
32
+ * forceDestroy: true,
33
+ * tags: std.merge({
34
+ * input: [
35
+ * tags,
36
+ * {
37
+ * name: `${prefix}-logdelivery`,
38
+ * },
39
+ * ],
40
+ * }).result,
41
+ * });
42
+ * const logdeliveryS3BucketPublicAccessBlock = new aws.index.S3BucketPublicAccessBlock("logdelivery", {
43
+ * bucket: logdeliveryS3Bucket.id,
44
+ * ignorePublicAcls: true,
45
+ * });
46
+ * const logdelivery = databricks.getAwsAssumeRolePolicy({
47
+ * externalId: databricksAccountId,
48
+ * forLogDelivery: true,
49
+ * });
50
+ * const logdeliveryVersioning = new aws.index.S3BucketVersioning("logdelivery_versioning", {
51
+ * bucket: logdeliveryS3Bucket.id,
52
+ * versioningConfiguration: [{
53
+ * status: "Disabled",
54
+ * }],
55
+ * });
56
+ * const logdeliveryIamRole = new aws.index.IamRole("logdelivery", {
57
+ * name: `${prefix}-logdelivery`,
58
+ * description: `(${prefix}) UsageDelivery role`,
59
+ * assumeRolePolicy: logdelivery.json,
60
+ * tags: tags,
61
+ * });
62
+ * const logdeliveryGetAwsBucketPolicy = databricks.getAwsBucketPolicy({
63
+ * fullAccessRole: logdeliveryIamRole.arn,
64
+ * bucket: logdeliveryS3Bucket.bucket,
65
+ * });
66
+ * const logdeliveryS3BucketPolicy = new aws.index.S3BucketPolicy("logdelivery", {
67
+ * bucket: logdeliveryS3Bucket.id,
68
+ * policy: logdeliveryGetAwsBucketPolicy.json,
69
+ * });
70
+ * const wait = new time.Sleep("wait", {createDuration: "10s"}, {
71
+ * dependsOn: [logdeliveryIamRole],
72
+ * });
73
+ * const logWriter = new databricks.MwsCredentials("log_writer", {
74
+ * accountId: databricksAccountId,
75
+ * credentialsName: "Usage Delivery",
76
+ * roleArn: logdeliveryIamRole.arn,
77
+ * }, {
78
+ * dependsOn: [wait],
79
+ * });
80
+ * const logBucket = new databricks.MwsStorageConfigurations("log_bucket", {
81
+ * accountId: databricksAccountId,
82
+ * storageConfigurationName: "Usage Logs",
83
+ * bucketName: logdeliveryS3Bucket.bucket,
84
+ * });
85
+ * const usageLogs = new databricks.MwsLogDelivery("usage_logs", {
86
+ * accountId: databricksAccountId,
87
+ * credentialsId: logWriter.credentialsId,
88
+ * storageConfigurationId: logBucket.storageConfigurationId,
89
+ * deliveryPathPrefix: "billable-usage",
90
+ * configName: "Usage Logs",
91
+ * logType: "BILLABLE_USAGE",
92
+ * outputFormat: "CSV",
93
+ * });
94
+ * const auditLogs = new databricks.MwsLogDelivery("audit_logs", {
95
+ * accountId: databricksAccountId,
96
+ * credentialsId: logWriter.credentialsId,
97
+ * storageConfigurationId: logBucket.storageConfigurationId,
98
+ * deliveryPathPrefix: "audit-logs",
99
+ * configName: "Audit Logs",
100
+ * logType: "AUDIT_LOGS",
101
+ * outputFormat: "JSON",
102
+ * });
103
+ * ```
104
+ *
15
105
  * ## Billable Usage
16
106
  *
17
107
  * CSV files are delivered to `<delivery_path_prefix>/billable-usage/csv/` and are named `workspaceId=<workspace-id>-usageMonth=<month>.csv`, which are delivered daily by overwriting the month's CSV file for each workspace. Format of CSV file, as well as some usage examples, can be found [here](https://docs.databricks.com/administration-guide/account-settings/usage.html#download-usage-as-a-csv-file).