@pulumi/null 0.0.4-alpha.1712988544 → 0.0.4-alpha.1713561652
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/package.json +1 -1
- package/resource.d.ts +31 -0
- package/resource.js +31 -0
- package/resource.js.map +1 -1
package/package.json
CHANGED
package/resource.d.ts
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
/**
|
|
3
3
|
* ## Example Usage
|
|
4
|
+
*
|
|
5
|
+
* <!--Start PulumiCodeChooser -->
|
|
6
|
+
* ```typescript
|
|
7
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
8
|
+
* import * as _null from "@pulumi/null";
|
|
9
|
+
* import * as aws from "@pulumi/aws";
|
|
10
|
+
* import * as std from "@pulumi/std";
|
|
11
|
+
*
|
|
12
|
+
* const cluster: aws.index.Instance[] = [];
|
|
13
|
+
* for (const range = {value: 0}; range.value < 3; range.value++) {
|
|
14
|
+
* cluster.push(new aws.index.Instance(`cluster-${range.value}`, {
|
|
15
|
+
* ami: "ami-0dcc1e21636832c5d",
|
|
16
|
+
* instanceType: "m5.large",
|
|
17
|
+
* }));
|
|
18
|
+
* }
|
|
19
|
+
* // The primary use-case for the null resource is as a do-nothing container
|
|
20
|
+
* // for arbitrary actions taken by a provisioner.
|
|
21
|
+
* //
|
|
22
|
+
* // In this example, three EC2 instances are created and then a
|
|
23
|
+
* // null_resource instance is used to gather data about all three
|
|
24
|
+
* // and execute a single action that affects them all. Due to the triggers
|
|
25
|
+
* // map, the null_resource will be replaced each time the instance ids
|
|
26
|
+
* // change, and thus the remote-exec provisioner will be re-run.
|
|
27
|
+
* const clusterResource = new _null.Resource("cluster", {triggers: {
|
|
28
|
+
* cluster_instance_ids: std.join({
|
|
29
|
+
* separator: ",",
|
|
30
|
+
* input: cluster.map(__item => __item.id),
|
|
31
|
+
* }).then(invoke => invoke.result),
|
|
32
|
+
* }});
|
|
33
|
+
* ```
|
|
34
|
+
* <!--End PulumiCodeChooser -->
|
|
4
35
|
*/
|
|
5
36
|
export declare class Resource extends pulumi.CustomResource {
|
|
6
37
|
/**
|
package/resource.js
CHANGED
|
@@ -7,6 +7,37 @@ const pulumi = require("@pulumi/pulumi");
|
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
8
|
/**
|
|
9
9
|
* ## Example Usage
|
|
10
|
+
*
|
|
11
|
+
* <!--Start PulumiCodeChooser -->
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
14
|
+
* import * as _null from "@pulumi/null";
|
|
15
|
+
* import * as aws from "@pulumi/aws";
|
|
16
|
+
* import * as std from "@pulumi/std";
|
|
17
|
+
*
|
|
18
|
+
* const cluster: aws.index.Instance[] = [];
|
|
19
|
+
* for (const range = {value: 0}; range.value < 3; range.value++) {
|
|
20
|
+
* cluster.push(new aws.index.Instance(`cluster-${range.value}`, {
|
|
21
|
+
* ami: "ami-0dcc1e21636832c5d",
|
|
22
|
+
* instanceType: "m5.large",
|
|
23
|
+
* }));
|
|
24
|
+
* }
|
|
25
|
+
* // The primary use-case for the null resource is as a do-nothing container
|
|
26
|
+
* // for arbitrary actions taken by a provisioner.
|
|
27
|
+
* //
|
|
28
|
+
* // In this example, three EC2 instances are created and then a
|
|
29
|
+
* // null_resource instance is used to gather data about all three
|
|
30
|
+
* // and execute a single action that affects them all. Due to the triggers
|
|
31
|
+
* // map, the null_resource will be replaced each time the instance ids
|
|
32
|
+
* // change, and thus the remote-exec provisioner will be re-run.
|
|
33
|
+
* const clusterResource = new _null.Resource("cluster", {triggers: {
|
|
34
|
+
* cluster_instance_ids: std.join({
|
|
35
|
+
* separator: ",",
|
|
36
|
+
* input: cluster.map(__item => __item.id),
|
|
37
|
+
* }).then(invoke => invoke.result),
|
|
38
|
+
* }});
|
|
39
|
+
* ```
|
|
40
|
+
* <!--End PulumiCodeChooser -->
|
|
10
41
|
*/
|
|
11
42
|
class Resource extends pulumi.CustomResource {
|
|
12
43
|
/**
|
package/resource.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.js","sourceRoot":"","sources":["../resource.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"resource.js","sourceRoot":"","sources":["../resource.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAa,QAAS,SAAQ,MAAM,CAAC,cAAc;IAC/C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAqB,EAAE,IAAmC;QACnH,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC/D,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,QAAQ,CAAC,YAAY,CAAC;IACzD,CAAC;IAeD,YAAY,IAAY,EAAE,WAA0C,EAAE,IAAmC;QACrG,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAwC,CAAC;YACvD,cAAc,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;SACnE;aAAM;YACH,MAAM,IAAI,GAAG,WAAuC,CAAC;YACrD,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;SACjE;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;;AArDL,4BAsDC;AAxCG,gBAAgB;AACO,qBAAY,GAAG,8BAA8B,CAAC"}
|