@pulumi/null 0.0.4-alpha.1713334088 → 0.0.4-alpha.1713901035

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/null",
3
- "version": "v0.0.4-alpha.1713334088+c4a3e7bb",
3
+ "version": "v0.0.4-alpha.1713901035+66045a83",
4
4
  "description": "A Pulumi package for creating and managing Null cloud resources.",
5
5
  "keywords": [
6
6
  "pulumi",
package/resource.d.ts CHANGED
@@ -1,6 +1,35 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  /**
3
3
  * ## Example Usage
4
+ *
5
+ * ```typescript
6
+ * import * as pulumi from "@pulumi/pulumi";
7
+ * import * as _null from "@pulumi/null";
8
+ * import * as aws from "@pulumi/aws";
9
+ * import * as std from "@pulumi/std";
10
+ *
11
+ * const cluster: aws.index.Instance[] = [];
12
+ * for (const range = {value: 0}; range.value < 3; range.value++) {
13
+ * cluster.push(new aws.index.Instance(`cluster-${range.value}`, {
14
+ * ami: "ami-0dcc1e21636832c5d",
15
+ * instanceType: "m5.large",
16
+ * }));
17
+ * }
18
+ * // The primary use-case for the null resource is as a do-nothing container
19
+ * // for arbitrary actions taken by a provisioner.
20
+ * //
21
+ * // In this example, three EC2 instances are created and then a
22
+ * // null_resource instance is used to gather data about all three
23
+ * // and execute a single action that affects them all. Due to the triggers
24
+ * // map, the null_resource will be replaced each time the instance ids
25
+ * // change, and thus the remote-exec provisioner will be re-run.
26
+ * const clusterResource = new _null.Resource("cluster", {triggers: {
27
+ * cluster_instance_ids: std.join({
28
+ * separator: ",",
29
+ * input: cluster.map(__item => __item.id),
30
+ * }).then(invoke => invoke.result),
31
+ * }});
32
+ * ```
4
33
  */
5
34
  export declare class Resource extends pulumi.CustomResource {
6
35
  /**
package/resource.js CHANGED
@@ -7,6 +7,35 @@ const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
8
  /**
9
9
  * ## Example Usage
10
+ *
11
+ * ```typescript
12
+ * import * as pulumi from "@pulumi/pulumi";
13
+ * import * as _null from "@pulumi/null";
14
+ * import * as aws from "@pulumi/aws";
15
+ * import * as std from "@pulumi/std";
16
+ *
17
+ * const cluster: aws.index.Instance[] = [];
18
+ * for (const range = {value: 0}; range.value < 3; range.value++) {
19
+ * cluster.push(new aws.index.Instance(`cluster-${range.value}`, {
20
+ * ami: "ami-0dcc1e21636832c5d",
21
+ * instanceType: "m5.large",
22
+ * }));
23
+ * }
24
+ * // The primary use-case for the null resource is as a do-nothing container
25
+ * // for arbitrary actions taken by a provisioner.
26
+ * //
27
+ * // In this example, three EC2 instances are created and then a
28
+ * // null_resource instance is used to gather data about all three
29
+ * // and execute a single action that affects them all. Due to the triggers
30
+ * // map, the null_resource will be replaced each time the instance ids
31
+ * // change, and thus the remote-exec provisioner will be re-run.
32
+ * const clusterResource = new _null.Resource("cluster", {triggers: {
33
+ * cluster_instance_ids: std.join({
34
+ * separator: ",",
35
+ * input: cluster.map(__item => __item.id),
36
+ * }).then(invoke => invoke.result),
37
+ * }});
38
+ * ```
10
39
  */
11
40
  class Resource extends pulumi.CustomResource {
12
41
  /**
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;;GAEG;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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