@pulumi/databricks 1.91.0 → 1.91.1
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.
- package/externalLocation.d.ts +1 -1
- package/getPostgresDatabase.d.ts +34 -0
- package/getPostgresDatabase.js +34 -0
- package/getPostgresDatabase.js.map +1 -1
- package/getPostgresDatabases.d.ts +34 -0
- package/getPostgresDatabases.js +34 -0
- package/getPostgresDatabases.js.map +1 -1
- package/getPostgresProject.d.ts +11 -1
- package/getPostgresProject.js.map +1 -1
- package/getPostgresProjects.d.ts +13 -0
- package/getPostgresProjects.js +2 -0
- package/getPostgresProjects.js.map +1 -1
- package/getPostgresRole.d.ts +36 -0
- package/getPostgresRole.js +36 -0
- package/getPostgresRole.js.map +1 -1
- package/getPostgresRoles.d.ts +34 -0
- package/getPostgresRoles.js +34 -0
- package/getPostgresRoles.js.map +1 -1
- package/package.json +2 -2
- package/postgresBranch.d.ts +37 -3
- package/postgresBranch.js +27 -3
- package/postgresBranch.js.map +1 -1
- package/postgresDatabase.d.ts +97 -0
- package/postgresDatabase.js +97 -0
- package/postgresDatabase.js.map +1 -1
- package/postgresEndpoint.d.ts +35 -9
- package/postgresEndpoint.js +25 -9
- package/postgresEndpoint.js.map +1 -1
- package/postgresProject.d.ts +60 -5
- package/postgresProject.js +28 -2
- package/postgresProject.js.map +1 -1
- package/postgresRole.d.ts +108 -0
- package/postgresRole.js +108 -0
- package/postgresRole.js.map +1 -1
- package/types/input.d.ts +67 -9
- package/types/output.d.ts +179 -28
package/postgresBranch.js
CHANGED
|
@@ -10,7 +10,11 @@ const utilities = require("./utilities");
|
|
|
10
10
|
*
|
|
11
11
|
* ## Example Usage
|
|
12
12
|
*
|
|
13
|
-
* ###
|
|
13
|
+
* ### Managing Implicitly Created Root Branch
|
|
14
|
+
*
|
|
15
|
+
* A root branch named `production` is implicitly created for every project. Since Pulumi is declarative, managing an already-existing resource requires `replaceExisting = true`: it lets Pulumi take ownership of the implicitly created branch and immediately apply the provided configuration to it. Support for providing a custom `branchId` will be available in later versions.
|
|
16
|
+
*
|
|
17
|
+
* This resource is only required if you want to apply configuration changes to the implicitly created branch.
|
|
14
18
|
*
|
|
15
19
|
* ```typescript
|
|
16
20
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -23,6 +27,22 @@ const utilities = require("./utilities");
|
|
|
23
27
|
* displayName: "My Project",
|
|
24
28
|
* },
|
|
25
29
|
* });
|
|
30
|
+
* const production = new databricks.PostgresBranch("production", {
|
|
31
|
+
* branchId: "production",
|
|
32
|
+
* parent: _this.name,
|
|
33
|
+
* spec: {
|
|
34
|
+
* noExpiry: true,
|
|
35
|
+
* },
|
|
36
|
+
* replaceExisting: true,
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* ### Basic Branch Creation
|
|
41
|
+
*
|
|
42
|
+
* ```typescript
|
|
43
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
44
|
+
* import * as databricks from "@pulumi/databricks";
|
|
45
|
+
*
|
|
26
46
|
* const dev = new databricks.PostgresBranch("dev", {
|
|
27
47
|
* branchId: "dev-branch",
|
|
28
48
|
* parent: _this.name,
|
|
@@ -34,12 +54,14 @@ const utilities = require("./utilities");
|
|
|
34
54
|
*
|
|
35
55
|
* ### Protected Branch
|
|
36
56
|
*
|
|
57
|
+
* Only one branch per project can be protected at a time.
|
|
58
|
+
*
|
|
37
59
|
* ```typescript
|
|
38
60
|
* import * as pulumi from "@pulumi/pulumi";
|
|
39
61
|
* import * as databricks from "@pulumi/databricks";
|
|
40
62
|
*
|
|
41
|
-
* const
|
|
42
|
-
* branchId: "
|
|
63
|
+
* const _protected = new databricks.PostgresBranch("protected", {
|
|
64
|
+
* branchId: "protected-branch",
|
|
43
65
|
* parent: _this.name,
|
|
44
66
|
* spec: {
|
|
45
67
|
* isProtected: true,
|
|
@@ -96,6 +118,7 @@ class PostgresBranch extends pulumi.CustomResource {
|
|
|
96
118
|
resourceInputs["name"] = state?.name;
|
|
97
119
|
resourceInputs["parent"] = state?.parent;
|
|
98
120
|
resourceInputs["providerConfig"] = state?.providerConfig;
|
|
121
|
+
resourceInputs["replaceExisting"] = state?.replaceExisting;
|
|
99
122
|
resourceInputs["spec"] = state?.spec;
|
|
100
123
|
resourceInputs["status"] = state?.status;
|
|
101
124
|
resourceInputs["uid"] = state?.uid;
|
|
@@ -112,6 +135,7 @@ class PostgresBranch extends pulumi.CustomResource {
|
|
|
112
135
|
resourceInputs["branchId"] = args?.branchId;
|
|
113
136
|
resourceInputs["parent"] = args?.parent;
|
|
114
137
|
resourceInputs["providerConfig"] = args?.providerConfig;
|
|
138
|
+
resourceInputs["replaceExisting"] = args?.replaceExisting;
|
|
115
139
|
resourceInputs["spec"] = args?.spec;
|
|
116
140
|
resourceInputs["createTime"] = undefined /*out*/;
|
|
117
141
|
resourceInputs["name"] = undefined /*out*/;
|
package/postgresBranch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgresBranch.js","sourceRoot":"","sources":["../postgresBranch.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"postgresBranch.js","sourceRoot":"","sources":["../postgresBranch.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AACH,MAAa,cAAe,SAAQ,MAAM,CAAC,cAAc;IACrD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA2B,EAAE,IAAmC;QACzH,OAAO,IAAI,cAAc,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,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AsC,CAAC,CAAC;aAC3D;YACD,IAAI,IAAI,EAAE,MAAM,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACzC,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;aACzD;YACD,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC;YAC5C,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC;YACxC,cAAc,CAAC,gBAAgB,CAAC,GAAG,IAAI,EAAE,cAAc,CAAC;YACxD,cAAc,CAAC,iBAAiB,CAAC,GAAG,IAAI,EAAE,eAAe,CAAC;YAC1D,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,cAAc,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YACjD,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC3C,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC7C,cAAc,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC1C,cAAc,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACpD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;;AAxHL,wCAyHC;AA3GG,gBAAgB;AACO,2BAAY,GAAG,gDAAgD,CAAC"}
|
package/postgresDatabase.d.ts
CHANGED
|
@@ -3,6 +3,103 @@ import * as inputs from "./types/input";
|
|
|
3
3
|
import * as outputs from "./types/output";
|
|
4
4
|
/**
|
|
5
5
|
* [](https://docs.databricks.com/aws/en/release-notes/release-types)
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ### Database Owned by a Specific Role
|
|
10
|
+
*
|
|
11
|
+
* Assign ownership to a role you manage alongside the database. The Postgres database will be created with the specified role as its owner.
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as databricks from "@pulumi/databricks";
|
|
16
|
+
*
|
|
17
|
+
* const appOwner = new databricks.PostgresRole("app_owner", {
|
|
18
|
+
* roleId: "app-owner",
|
|
19
|
+
* parent: main.name,
|
|
20
|
+
* spec: {
|
|
21
|
+
* postgresRole: "app_owner",
|
|
22
|
+
* },
|
|
23
|
+
* });
|
|
24
|
+
* const app = new databricks.PostgresDatabase("app", {
|
|
25
|
+
* databaseId: "app",
|
|
26
|
+
* parent: main.name,
|
|
27
|
+
* spec: {
|
|
28
|
+
* postgresDatabase: "app",
|
|
29
|
+
* role: appOwner.name,
|
|
30
|
+
* },
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* ### Renaming a Database
|
|
35
|
+
*
|
|
36
|
+
* Changing `spec.postgres_database` renames the underlying Postgres database without replacing the resource. The resource identifier (`databaseId`) is separate from the Postgres database name, and stays intact in the example below.
|
|
37
|
+
*
|
|
38
|
+
* ```typescript
|
|
39
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
40
|
+
* import * as databricks from "@pulumi/databricks";
|
|
41
|
+
*
|
|
42
|
+
* const analytics = new databricks.PostgresDatabase("analytics", {
|
|
43
|
+
* databaseId: "analytics",
|
|
44
|
+
* parent: main.name,
|
|
45
|
+
* spec: {
|
|
46
|
+
* postgresDatabase: "analytics_v2",
|
|
47
|
+
* },
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* ### Multiple databases in a branch
|
|
52
|
+
*
|
|
53
|
+
* By default, Pulumi creates resources in parallel if the dependency graph allows for that. However, Lakebase
|
|
54
|
+
* doesn't allow the parallel management of resource inside a single branch. Only one of these resources can
|
|
55
|
+
* be created at a time:
|
|
56
|
+
*
|
|
57
|
+
* - Role
|
|
58
|
+
* - Database
|
|
59
|
+
* - Endpoint
|
|
60
|
+
*
|
|
61
|
+
* If you try to create resources in parallel, you'll see a conflict error like:
|
|
62
|
+
*
|
|
63
|
+
* > Your project already has conflicting operations in progress. Please wait until they are complete, and then try again.
|
|
64
|
+
*
|
|
65
|
+
* Pulumi serializes automatically when one resource references another, forming an edge in the dependency graph.
|
|
66
|
+
* For example, if a database's `spec.role` points at a role, Pulumi creates the role before the database.
|
|
67
|
+
* For resources that don't reference each other, like two sibling databases in the same branch, add `dependsOn` so
|
|
68
|
+
* Pulumi knows to wait for complete creation of the first resource, before starting the creation of the second one.
|
|
69
|
+
*
|
|
70
|
+
* For example:
|
|
71
|
+
*
|
|
72
|
+
* ```typescript
|
|
73
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
74
|
+
* import * as databricks from "@pulumi/databricks";
|
|
75
|
+
*
|
|
76
|
+
* const schemaOwner = new databricks.PostgresRole("schema_owner", {
|
|
77
|
+
* roleId: "schemamigrator",
|
|
78
|
+
* parent: test.name,
|
|
79
|
+
* spec: {
|
|
80
|
+
* postgresRole: "schemamigrator",
|
|
81
|
+
* membershipRoles: ["DATABRICKS_SUPERUSER"],
|
|
82
|
+
* },
|
|
83
|
+
* });
|
|
84
|
+
* const application1 = new databricks.PostgresDatabase("application1", {
|
|
85
|
+
* databaseId: "application1",
|
|
86
|
+
* parent: test.name,
|
|
87
|
+
* spec: {
|
|
88
|
+
* postgresDatabase: "application1",
|
|
89
|
+
* role: schemaOwner.name,
|
|
90
|
+
* },
|
|
91
|
+
* });
|
|
92
|
+
* const application2 = new databricks.PostgresDatabase("application2", {
|
|
93
|
+
* databaseId: "application2",
|
|
94
|
+
* parent: test.name,
|
|
95
|
+
* spec: {
|
|
96
|
+
* postgresDatabase: "application2",
|
|
97
|
+
* role: schemaOwner.name,
|
|
98
|
+
* },
|
|
99
|
+
* }, {
|
|
100
|
+
* dependsOn: [application1],
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
6
103
|
*/
|
|
7
104
|
export declare class PostgresDatabase extends pulumi.CustomResource {
|
|
8
105
|
/**
|
package/postgresDatabase.js
CHANGED
|
@@ -7,6 +7,103 @@ const pulumi = require("@pulumi/pulumi");
|
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
8
|
/**
|
|
9
9
|
* [](https://docs.databricks.com/aws/en/release-notes/release-types)
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* ### Database Owned by a Specific Role
|
|
14
|
+
*
|
|
15
|
+
* Assign ownership to a role you manage alongside the database. The Postgres database will be created with the specified role as its owner.
|
|
16
|
+
*
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
19
|
+
* import * as databricks from "@pulumi/databricks";
|
|
20
|
+
*
|
|
21
|
+
* const appOwner = new databricks.PostgresRole("app_owner", {
|
|
22
|
+
* roleId: "app-owner",
|
|
23
|
+
* parent: main.name,
|
|
24
|
+
* spec: {
|
|
25
|
+
* postgresRole: "app_owner",
|
|
26
|
+
* },
|
|
27
|
+
* });
|
|
28
|
+
* const app = new databricks.PostgresDatabase("app", {
|
|
29
|
+
* databaseId: "app",
|
|
30
|
+
* parent: main.name,
|
|
31
|
+
* spec: {
|
|
32
|
+
* postgresDatabase: "app",
|
|
33
|
+
* role: appOwner.name,
|
|
34
|
+
* },
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* ### Renaming a Database
|
|
39
|
+
*
|
|
40
|
+
* Changing `spec.postgres_database` renames the underlying Postgres database without replacing the resource. The resource identifier (`databaseId`) is separate from the Postgres database name, and stays intact in the example below.
|
|
41
|
+
*
|
|
42
|
+
* ```typescript
|
|
43
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
44
|
+
* import * as databricks from "@pulumi/databricks";
|
|
45
|
+
*
|
|
46
|
+
* const analytics = new databricks.PostgresDatabase("analytics", {
|
|
47
|
+
* databaseId: "analytics",
|
|
48
|
+
* parent: main.name,
|
|
49
|
+
* spec: {
|
|
50
|
+
* postgresDatabase: "analytics_v2",
|
|
51
|
+
* },
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* ### Multiple databases in a branch
|
|
56
|
+
*
|
|
57
|
+
* By default, Pulumi creates resources in parallel if the dependency graph allows for that. However, Lakebase
|
|
58
|
+
* doesn't allow the parallel management of resource inside a single branch. Only one of these resources can
|
|
59
|
+
* be created at a time:
|
|
60
|
+
*
|
|
61
|
+
* - Role
|
|
62
|
+
* - Database
|
|
63
|
+
* - Endpoint
|
|
64
|
+
*
|
|
65
|
+
* If you try to create resources in parallel, you'll see a conflict error like:
|
|
66
|
+
*
|
|
67
|
+
* > Your project already has conflicting operations in progress. Please wait until they are complete, and then try again.
|
|
68
|
+
*
|
|
69
|
+
* Pulumi serializes automatically when one resource references another, forming an edge in the dependency graph.
|
|
70
|
+
* For example, if a database's `spec.role` points at a role, Pulumi creates the role before the database.
|
|
71
|
+
* For resources that don't reference each other, like two sibling databases in the same branch, add `dependsOn` so
|
|
72
|
+
* Pulumi knows to wait for complete creation of the first resource, before starting the creation of the second one.
|
|
73
|
+
*
|
|
74
|
+
* For example:
|
|
75
|
+
*
|
|
76
|
+
* ```typescript
|
|
77
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
78
|
+
* import * as databricks from "@pulumi/databricks";
|
|
79
|
+
*
|
|
80
|
+
* const schemaOwner = new databricks.PostgresRole("schema_owner", {
|
|
81
|
+
* roleId: "schemamigrator",
|
|
82
|
+
* parent: test.name,
|
|
83
|
+
* spec: {
|
|
84
|
+
* postgresRole: "schemamigrator",
|
|
85
|
+
* membershipRoles: ["DATABRICKS_SUPERUSER"],
|
|
86
|
+
* },
|
|
87
|
+
* });
|
|
88
|
+
* const application1 = new databricks.PostgresDatabase("application1", {
|
|
89
|
+
* databaseId: "application1",
|
|
90
|
+
* parent: test.name,
|
|
91
|
+
* spec: {
|
|
92
|
+
* postgresDatabase: "application1",
|
|
93
|
+
* role: schemaOwner.name,
|
|
94
|
+
* },
|
|
95
|
+
* });
|
|
96
|
+
* const application2 = new databricks.PostgresDatabase("application2", {
|
|
97
|
+
* databaseId: "application2",
|
|
98
|
+
* parent: test.name,
|
|
99
|
+
* spec: {
|
|
100
|
+
* postgresDatabase: "application2",
|
|
101
|
+
* role: schemaOwner.name,
|
|
102
|
+
* },
|
|
103
|
+
* }, {
|
|
104
|
+
* dependsOn: [application1],
|
|
105
|
+
* });
|
|
106
|
+
* ```
|
|
10
107
|
*/
|
|
11
108
|
class PostgresDatabase extends pulumi.CustomResource {
|
|
12
109
|
/**
|
package/postgresDatabase.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgresDatabase.js","sourceRoot":"","sources":["../postgresDatabase.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"postgresDatabase.js","sourceRoot":"","sources":["../postgresDatabase.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmGG;AACH,MAAa,gBAAiB,SAAQ,MAAM,CAAC,cAAc;IACvD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA6B,EAAE,IAAmC;QAC3H,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACvE,CAAC;IAKD;;;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AC,GAAG,IAAI,EAAE,cAAc,CAAC;YACxD,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,cAAc,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YACjD,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC3C,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC7C,cAAc,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACpD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACrE,CAAC;;AA3GL,4CA4GC;AA9FG,gBAAgB;AACO,6BAAY,GAAG,oDAAoD,CAAC"}
|
package/postgresEndpoint.d.ts
CHANGED
|
@@ -6,7 +6,11 @@ import * as outputs from "./types/output";
|
|
|
6
6
|
*
|
|
7
7
|
* ## Example Usage
|
|
8
8
|
*
|
|
9
|
-
* ###
|
|
9
|
+
* ### Managing Implicitly Created Read-Write Endpoint
|
|
10
|
+
*
|
|
11
|
+
* A read-write endpoint named `primary` is implicitly created for every branch. Since Pulumi is declarative, managing an already-existing resource requires `replaceExisting = true`: it lets Pulumi take ownership of the implicitly created endpoint and immediately apply the provided configuration to it. Support for providing a custom `endpointId` will be available in later versions.
|
|
12
|
+
*
|
|
13
|
+
* This resource is only required if you want to apply configuration changes to the implicitly created endpoint.
|
|
10
14
|
*
|
|
11
15
|
* ```typescript
|
|
12
16
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -31,7 +35,11 @@ import * as outputs from "./types/output";
|
|
|
31
35
|
* parent: dev.name,
|
|
32
36
|
* spec: {
|
|
33
37
|
* endpointType: "ENDPOINT_TYPE_READ_WRITE",
|
|
38
|
+
* autoscalingLimitMinCu: 0.5,
|
|
39
|
+
* autoscalingLimitMaxCu: 4,
|
|
40
|
+
* suspendTimeoutDuration: "600s",
|
|
34
41
|
* },
|
|
42
|
+
* replaceExisting: true,
|
|
35
43
|
* });
|
|
36
44
|
* ```
|
|
37
45
|
*
|
|
@@ -107,20 +115,27 @@ import * as outputs from "./types/output";
|
|
|
107
115
|
* Configure a single endpoint with multiple compute instances for high availability.
|
|
108
116
|
* One compute instance acts as the read-write primary, while the remaining secondary compute instances stand ready for automatic failover.
|
|
109
117
|
*
|
|
118
|
+
* High availability requires scale-to-zero to be disabled.
|
|
119
|
+
* Set `noSuspension = true` in `spec` as shown in the example below.
|
|
120
|
+
*
|
|
110
121
|
* ```typescript
|
|
111
122
|
* import * as pulumi from "@pulumi/pulumi";
|
|
112
123
|
* import * as databricks from "@pulumi/databricks";
|
|
113
124
|
*
|
|
114
125
|
* const haPrimary = new databricks.PostgresEndpoint("ha_primary", {
|
|
115
126
|
* endpointId: "primary",
|
|
116
|
-
* parent:
|
|
127
|
+
* parent: dev.name,
|
|
117
128
|
* spec: {
|
|
118
129
|
* endpointType: "ENDPOINT_TYPE_READ_WRITE",
|
|
130
|
+
* noSuspension: true,
|
|
131
|
+
* autoscalingLimitMinCu: 0.5,
|
|
132
|
+
* autoscalingLimitMaxCu: 4,
|
|
119
133
|
* group: {
|
|
120
134
|
* min: 2,
|
|
121
135
|
* max: 2,
|
|
122
136
|
* },
|
|
123
137
|
* },
|
|
138
|
+
* replaceExisting: true,
|
|
124
139
|
* });
|
|
125
140
|
* ```
|
|
126
141
|
*
|
|
@@ -131,27 +146,25 @@ import * as outputs from "./types/output";
|
|
|
131
146
|
* on read-write endpoints with more than one compute. The secondaries are optionally
|
|
132
147
|
* exposed as read-only host via `enableReadableSecondaries`.
|
|
133
148
|
*
|
|
134
|
-
* High availability requires scale-to-zero to be disabled.
|
|
135
|
-
* Set `noSuspension = true` in `defaultEndpointSettings` as shown in the example below.
|
|
136
|
-
*
|
|
137
149
|
* ```typescript
|
|
138
150
|
* import * as pulumi from "@pulumi/pulumi";
|
|
139
151
|
* import * as databricks from "@pulumi/databricks";
|
|
140
152
|
*
|
|
141
153
|
* const haReadable = new databricks.PostgresEndpoint("ha_readable", {
|
|
142
154
|
* endpointId: "primary",
|
|
143
|
-
* parent:
|
|
155
|
+
* parent: dev.name,
|
|
144
156
|
* spec: {
|
|
145
157
|
* endpointType: "ENDPOINT_TYPE_READ_WRITE",
|
|
158
|
+
* noSuspension: true,
|
|
159
|
+
* autoscalingLimitMinCu: 0.5,
|
|
160
|
+
* autoscalingLimitMaxCu: 4,
|
|
146
161
|
* group: {
|
|
147
162
|
* min: 2,
|
|
148
163
|
* max: 2,
|
|
149
164
|
* enableReadableSecondaries: true,
|
|
150
165
|
* },
|
|
151
|
-
* defaultEndpointSettings: {
|
|
152
|
-
* noSuspension: true,
|
|
153
|
-
* },
|
|
154
166
|
* },
|
|
167
|
+
* replaceExisting: true,
|
|
155
168
|
* });
|
|
156
169
|
* ```
|
|
157
170
|
*
|
|
@@ -195,6 +208,7 @@ import * as outputs from "./types/output";
|
|
|
195
208
|
* enableReadableSecondaries: true,
|
|
196
209
|
* },
|
|
197
210
|
* },
|
|
211
|
+
* replaceExisting: true,
|
|
198
212
|
* });
|
|
199
213
|
* const readReplica = new databricks.PostgresEndpoint("read_replica", {
|
|
200
214
|
* endpointId: "read-replica",
|
|
@@ -248,6 +262,10 @@ export declare class PostgresEndpoint extends pulumi.CustomResource {
|
|
|
248
262
|
* Configure the provider for management through account provider.
|
|
249
263
|
*/
|
|
250
264
|
readonly providerConfig: pulumi.Output<outputs.PostgresEndpointProviderConfig | undefined>;
|
|
265
|
+
/**
|
|
266
|
+
* If true, update the endpoint if it already exists instead of returning an error
|
|
267
|
+
*/
|
|
268
|
+
readonly replaceExisting: pulumi.Output<boolean | undefined>;
|
|
251
269
|
/**
|
|
252
270
|
* The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
|
|
253
271
|
*/
|
|
@@ -301,6 +319,10 @@ export interface PostgresEndpointState {
|
|
|
301
319
|
* Configure the provider for management through account provider.
|
|
302
320
|
*/
|
|
303
321
|
providerConfig?: pulumi.Input<inputs.PostgresEndpointProviderConfig>;
|
|
322
|
+
/**
|
|
323
|
+
* If true, update the endpoint if it already exists instead of returning an error
|
|
324
|
+
*/
|
|
325
|
+
replaceExisting?: pulumi.Input<boolean>;
|
|
304
326
|
/**
|
|
305
327
|
* The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
|
|
306
328
|
*/
|
|
@@ -337,6 +359,10 @@ export interface PostgresEndpointArgs {
|
|
|
337
359
|
* Configure the provider for management through account provider.
|
|
338
360
|
*/
|
|
339
361
|
providerConfig?: pulumi.Input<inputs.PostgresEndpointProviderConfig>;
|
|
362
|
+
/**
|
|
363
|
+
* If true, update the endpoint if it already exists instead of returning an error
|
|
364
|
+
*/
|
|
365
|
+
replaceExisting?: pulumi.Input<boolean>;
|
|
340
366
|
/**
|
|
341
367
|
* The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
|
|
342
368
|
*/
|
package/postgresEndpoint.js
CHANGED
|
@@ -10,7 +10,11 @@ const utilities = require("./utilities");
|
|
|
10
10
|
*
|
|
11
11
|
* ## Example Usage
|
|
12
12
|
*
|
|
13
|
-
* ###
|
|
13
|
+
* ### Managing Implicitly Created Read-Write Endpoint
|
|
14
|
+
*
|
|
15
|
+
* A read-write endpoint named `primary` is implicitly created for every branch. Since Pulumi is declarative, managing an already-existing resource requires `replaceExisting = true`: it lets Pulumi take ownership of the implicitly created endpoint and immediately apply the provided configuration to it. Support for providing a custom `endpointId` will be available in later versions.
|
|
16
|
+
*
|
|
17
|
+
* This resource is only required if you want to apply configuration changes to the implicitly created endpoint.
|
|
14
18
|
*
|
|
15
19
|
* ```typescript
|
|
16
20
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -35,7 +39,11 @@ const utilities = require("./utilities");
|
|
|
35
39
|
* parent: dev.name,
|
|
36
40
|
* spec: {
|
|
37
41
|
* endpointType: "ENDPOINT_TYPE_READ_WRITE",
|
|
42
|
+
* autoscalingLimitMinCu: 0.5,
|
|
43
|
+
* autoscalingLimitMaxCu: 4,
|
|
44
|
+
* suspendTimeoutDuration: "600s",
|
|
38
45
|
* },
|
|
46
|
+
* replaceExisting: true,
|
|
39
47
|
* });
|
|
40
48
|
* ```
|
|
41
49
|
*
|
|
@@ -111,20 +119,27 @@ const utilities = require("./utilities");
|
|
|
111
119
|
* Configure a single endpoint with multiple compute instances for high availability.
|
|
112
120
|
* One compute instance acts as the read-write primary, while the remaining secondary compute instances stand ready for automatic failover.
|
|
113
121
|
*
|
|
122
|
+
* High availability requires scale-to-zero to be disabled.
|
|
123
|
+
* Set `noSuspension = true` in `spec` as shown in the example below.
|
|
124
|
+
*
|
|
114
125
|
* ```typescript
|
|
115
126
|
* import * as pulumi from "@pulumi/pulumi";
|
|
116
127
|
* import * as databricks from "@pulumi/databricks";
|
|
117
128
|
*
|
|
118
129
|
* const haPrimary = new databricks.PostgresEndpoint("ha_primary", {
|
|
119
130
|
* endpointId: "primary",
|
|
120
|
-
* parent:
|
|
131
|
+
* parent: dev.name,
|
|
121
132
|
* spec: {
|
|
122
133
|
* endpointType: "ENDPOINT_TYPE_READ_WRITE",
|
|
134
|
+
* noSuspension: true,
|
|
135
|
+
* autoscalingLimitMinCu: 0.5,
|
|
136
|
+
* autoscalingLimitMaxCu: 4,
|
|
123
137
|
* group: {
|
|
124
138
|
* min: 2,
|
|
125
139
|
* max: 2,
|
|
126
140
|
* },
|
|
127
141
|
* },
|
|
142
|
+
* replaceExisting: true,
|
|
128
143
|
* });
|
|
129
144
|
* ```
|
|
130
145
|
*
|
|
@@ -135,27 +150,25 @@ const utilities = require("./utilities");
|
|
|
135
150
|
* on read-write endpoints with more than one compute. The secondaries are optionally
|
|
136
151
|
* exposed as read-only host via `enableReadableSecondaries`.
|
|
137
152
|
*
|
|
138
|
-
* High availability requires scale-to-zero to be disabled.
|
|
139
|
-
* Set `noSuspension = true` in `defaultEndpointSettings` as shown in the example below.
|
|
140
|
-
*
|
|
141
153
|
* ```typescript
|
|
142
154
|
* import * as pulumi from "@pulumi/pulumi";
|
|
143
155
|
* import * as databricks from "@pulumi/databricks";
|
|
144
156
|
*
|
|
145
157
|
* const haReadable = new databricks.PostgresEndpoint("ha_readable", {
|
|
146
158
|
* endpointId: "primary",
|
|
147
|
-
* parent:
|
|
159
|
+
* parent: dev.name,
|
|
148
160
|
* spec: {
|
|
149
161
|
* endpointType: "ENDPOINT_TYPE_READ_WRITE",
|
|
162
|
+
* noSuspension: true,
|
|
163
|
+
* autoscalingLimitMinCu: 0.5,
|
|
164
|
+
* autoscalingLimitMaxCu: 4,
|
|
150
165
|
* group: {
|
|
151
166
|
* min: 2,
|
|
152
167
|
* max: 2,
|
|
153
168
|
* enableReadableSecondaries: true,
|
|
154
169
|
* },
|
|
155
|
-
* defaultEndpointSettings: {
|
|
156
|
-
* noSuspension: true,
|
|
157
|
-
* },
|
|
158
170
|
* },
|
|
171
|
+
* replaceExisting: true,
|
|
159
172
|
* });
|
|
160
173
|
* ```
|
|
161
174
|
*
|
|
@@ -199,6 +212,7 @@ const utilities = require("./utilities");
|
|
|
199
212
|
* enableReadableSecondaries: true,
|
|
200
213
|
* },
|
|
201
214
|
* },
|
|
215
|
+
* replaceExisting: true,
|
|
202
216
|
* });
|
|
203
217
|
* const readReplica = new databricks.PostgresEndpoint("read_replica", {
|
|
204
218
|
* endpointId: "read-replica",
|
|
@@ -245,6 +259,7 @@ class PostgresEndpoint extends pulumi.CustomResource {
|
|
|
245
259
|
resourceInputs["name"] = state?.name;
|
|
246
260
|
resourceInputs["parent"] = state?.parent;
|
|
247
261
|
resourceInputs["providerConfig"] = state?.providerConfig;
|
|
262
|
+
resourceInputs["replaceExisting"] = state?.replaceExisting;
|
|
248
263
|
resourceInputs["spec"] = state?.spec;
|
|
249
264
|
resourceInputs["status"] = state?.status;
|
|
250
265
|
resourceInputs["uid"] = state?.uid;
|
|
@@ -261,6 +276,7 @@ class PostgresEndpoint extends pulumi.CustomResource {
|
|
|
261
276
|
resourceInputs["endpointId"] = args?.endpointId;
|
|
262
277
|
resourceInputs["parent"] = args?.parent;
|
|
263
278
|
resourceInputs["providerConfig"] = args?.providerConfig;
|
|
279
|
+
resourceInputs["replaceExisting"] = args?.replaceExisting;
|
|
264
280
|
resourceInputs["spec"] = args?.spec;
|
|
265
281
|
resourceInputs["createTime"] = undefined /*out*/;
|
|
266
282
|
resourceInputs["name"] = undefined /*out*/;
|
package/postgresEndpoint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgresEndpoint.js","sourceRoot":"","sources":["../postgresEndpoint.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"postgresEndpoint.js","sourceRoot":"","sources":["../postgresEndpoint.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4NG;AACH,MAAa,gBAAiB,SAAQ,MAAM,CAAC,cAAc;IACvD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA6B,EAAE,IAAmC;QAC3H,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,C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