@pulumi/random 4.9.0-alpha.1673556316 → 4.9.0

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/random",
3
- "version": "v4.9.0-alpha.1673556316+20991696",
3
+ "version": "v4.9.0",
4
4
  "description": "A Pulumi package to safely use randomness in Pulumi programs.",
5
5
  "keywords": [
6
6
  "pulumi",
@@ -11,7 +11,7 @@
11
11
  "license": "Apache-2.0",
12
12
  "scripts": {
13
13
  "build": "tsc",
14
- "install": "node scripts/install-pulumi-plugin.js resource random v4.9.0-alpha.1673556316+20991696"
14
+ "install": "node scripts/install-pulumi-plugin.js resource random v4.9.0"
15
15
  },
16
16
  "dependencies": {
17
17
  "@pulumi/pulumi": "^3.0.0"
package/package.json.dev CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/random",
3
- "version": "v4.9.0-alpha.1673556316+20991696",
3
+ "version": "v4.9.0",
4
4
  "description": "A Pulumi package to safely use randomness in Pulumi programs.",
5
5
  "keywords": [
6
6
  "pulumi",
@@ -11,7 +11,7 @@
11
11
  "license": "Apache-2.0",
12
12
  "scripts": {
13
13
  "build": "tsc",
14
- "install": "node scripts/install-pulumi-plugin.js resource random v4.9.0-alpha.1673556316+20991696"
14
+ "install": "node scripts/install-pulumi-plugin.js resource random v4.9.0"
15
15
  },
16
16
  "dependencies": {
17
17
  "@pulumi/pulumi": "^3.0.0"
package/randomId.d.ts CHANGED
@@ -15,37 +15,37 @@ import * as pulumi from "@pulumi/pulumi";
15
15
  *
16
16
  * ## Example Usage
17
17
  *
18
- * The following example shows how to generate a unique name for an AWS EC2
19
- * instance that changes each time a new AMI id is selected.
20
- *
21
18
  * ```typescript
22
19
  * import * as pulumi from "@pulumi/pulumi";
23
20
  * import * as aws from "@pulumi/aws";
24
21
  * import * as random from "@pulumi/random";
25
22
  *
23
+ * // The following example shows how to generate a unique name for an AWS EC2
24
+ * // instance that changes each time a new AMI id is selected.
26
25
  * const serverRandomId = new random.RandomId("serverRandomId", {
27
- * byteLength: 8,
28
26
  * keepers: {
29
27
  * ami_id: _var.ami_id,
30
28
  * },
29
+ * byteLength: 8,
31
30
  * });
32
31
  * const serverInstance = new aws.ec2.Instance("serverInstance", {
33
- * ami: serverRandomId.keepers.apply(keepers => keepers?.amiId),
34
32
  * tags: {
35
33
  * Name: pulumi.interpolate`web-server ${serverRandomId.hex}`,
36
34
  * },
35
+ * ami: serverRandomId.keepers.apply(keepers => keepers?.amiId),
37
36
  * });
37
+ * // ... (other aws_instance arguments) ...
38
38
  * ```
39
39
  *
40
40
  * ## Import
41
41
  *
42
- * Random Ids can be imported using the `b64_url` with an optional `prefix`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix
42
+ * Random IDs can be imported using the b64_url with an optional prefix. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix
43
43
  *
44
44
  * ```sh
45
45
  * $ pulumi import random:index/randomId:RandomId server p-9hUg
46
46
  * ```
47
47
  *
48
- * Example with prefix (prefix is separated by a `,`)
48
+ * Example with prefix (prefix is separated by a ,)
49
49
  *
50
50
  * ```sh
51
51
  * $ pulumi import random:index/randomId:RandomId server my-prefix-,p-9hUg
@@ -76,8 +76,7 @@ export declare class RandomId extends pulumi.CustomResource {
76
76
  */
77
77
  readonly b64Url: pulumi.Output<string>;
78
78
  /**
79
- * The number of random bytes to produce. The
80
- * minimum value is 1, which produces eight bits of randomness.
79
+ * The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness.
81
80
  */
82
81
  readonly byteLength: pulumi.Output<number>;
83
82
  /**
@@ -89,17 +88,13 @@ export declare class RandomId extends pulumi.CustomResource {
89
88
  */
90
89
  readonly hex: pulumi.Output<string>;
91
90
  /**
92
- * Arbitrary map of values that, when changed, will
93
- * trigger a new id to be generated. See
94
- * the main provider documentation for more information.
91
+ * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
95
92
  */
96
93
  readonly keepers: pulumi.Output<{
97
- [key: string]: any;
94
+ [key: string]: string;
98
95
  } | undefined>;
99
96
  /**
100
- * Arbitrary string to prefix the output value with. This
101
- * string is supplied as-is, meaning it is not guaranteed to be URL-safe or
102
- * base64 encoded.
97
+ * Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded.
103
98
  */
104
99
  readonly prefix: pulumi.Output<string | undefined>;
105
100
  /**
@@ -124,8 +119,7 @@ export interface RandomIdState {
124
119
  */
125
120
  b64Url?: pulumi.Input<string>;
126
121
  /**
127
- * The number of random bytes to produce. The
128
- * minimum value is 1, which produces eight bits of randomness.
122
+ * The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness.
129
123
  */
130
124
  byteLength?: pulumi.Input<number>;
131
125
  /**
@@ -137,17 +131,13 @@ export interface RandomIdState {
137
131
  */
138
132
  hex?: pulumi.Input<string>;
139
133
  /**
140
- * Arbitrary map of values that, when changed, will
141
- * trigger a new id to be generated. See
142
- * the main provider documentation for more information.
134
+ * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
143
135
  */
144
136
  keepers?: pulumi.Input<{
145
- [key: string]: any;
137
+ [key: string]: pulumi.Input<string>;
146
138
  }>;
147
139
  /**
148
- * Arbitrary string to prefix the output value with. This
149
- * string is supplied as-is, meaning it is not guaranteed to be URL-safe or
150
- * base64 encoded.
140
+ * Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded.
151
141
  */
152
142
  prefix?: pulumi.Input<string>;
153
143
  }
@@ -156,22 +146,17 @@ export interface RandomIdState {
156
146
  */
157
147
  export interface RandomIdArgs {
158
148
  /**
159
- * The number of random bytes to produce. The
160
- * minimum value is 1, which produces eight bits of randomness.
149
+ * The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness.
161
150
  */
162
151
  byteLength: pulumi.Input<number>;
163
152
  /**
164
- * Arbitrary map of values that, when changed, will
165
- * trigger a new id to be generated. See
166
- * the main provider documentation for more information.
153
+ * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
167
154
  */
168
155
  keepers?: pulumi.Input<{
169
- [key: string]: any;
156
+ [key: string]: pulumi.Input<string>;
170
157
  }>;
171
158
  /**
172
- * Arbitrary string to prefix the output value with. This
173
- * string is supplied as-is, meaning it is not guaranteed to be URL-safe or
174
- * base64 encoded.
159
+ * Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded.
175
160
  */
176
161
  prefix?: pulumi.Input<string>;
177
162
  }
package/randomId.js CHANGED
@@ -21,37 +21,37 @@ const utilities = require("./utilities");
21
21
  *
22
22
  * ## Example Usage
23
23
  *
24
- * The following example shows how to generate a unique name for an AWS EC2
25
- * instance that changes each time a new AMI id is selected.
26
- *
27
24
  * ```typescript
28
25
  * import * as pulumi from "@pulumi/pulumi";
29
26
  * import * as aws from "@pulumi/aws";
30
27
  * import * as random from "@pulumi/random";
31
28
  *
29
+ * // The following example shows how to generate a unique name for an AWS EC2
30
+ * // instance that changes each time a new AMI id is selected.
32
31
  * const serverRandomId = new random.RandomId("serverRandomId", {
33
- * byteLength: 8,
34
32
  * keepers: {
35
33
  * ami_id: _var.ami_id,
36
34
  * },
35
+ * byteLength: 8,
37
36
  * });
38
37
  * const serverInstance = new aws.ec2.Instance("serverInstance", {
39
- * ami: serverRandomId.keepers.apply(keepers => keepers?.amiId),
40
38
  * tags: {
41
39
  * Name: pulumi.interpolate`web-server ${serverRandomId.hex}`,
42
40
  * },
41
+ * ami: serverRandomId.keepers.apply(keepers => keepers?.amiId),
43
42
  * });
43
+ * // ... (other aws_instance arguments) ...
44
44
  * ```
45
45
  *
46
46
  * ## Import
47
47
  *
48
- * Random Ids can be imported using the `b64_url` with an optional `prefix`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix
48
+ * Random IDs can be imported using the b64_url with an optional prefix. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix
49
49
  *
50
50
  * ```sh
51
51
  * $ pulumi import random:index/randomId:RandomId server p-9hUg
52
52
  * ```
53
53
  *
54
- * Example with prefix (prefix is separated by a `,`)
54
+ * Example with prefix (prefix is separated by a ,)
55
55
  *
56
56
  * ```sh
57
57
  * $ pulumi import random:index/randomId:RandomId server my-prefix-,p-9hUg
package/randomId.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"randomId.js","sourceRoot":"","sources":["../randomId.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;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;IA4CD,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,QAAQ,CAAC,GAAG,KAAK,CAAC,CAAC,CAA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C,CAAC,SAAS,CAAC;YAClE,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5D,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC7C,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC7C,cAAc,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC1C,cAAc,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAC7C;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;;AA5FL,4BA6FC;AA/EG,gBAAgB;AACO,qBAAY,GAAG,gCAAgC,CAAC"}
@@ -2,43 +2,38 @@ import * as pulumi from "@pulumi/pulumi";
2
2
  /**
3
3
  * The resource `random.RandomInteger` generates random values from a given range, described by the `min` and `max` attributes of a given resource.
4
4
  *
5
- * This resource can be used in conjunction with resources that have
6
- * the `createBeforeDestroy` lifecycle flag set, to avoid conflicts with
7
- * unique names during the brief period where both the old and new resources
8
- * exist concurrently.
5
+ * This resource can be used in conjunction with resources that have the `createBeforeDestroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently.
9
6
  *
10
7
  * ## Example Usage
11
8
  *
12
- * The following example shows how to generate a random priority between 1 and 50000 for
13
- * a `awsAlbListenerRule` resource:
14
- *
15
9
  * ```typescript
16
10
  * import * as pulumi from "@pulumi/pulumi";
17
11
  * import * as aws from "@pulumi/aws";
18
12
  * import * as random from "@pulumi/random";
19
13
  *
14
+ * // The following example shows how to generate a random priority
15
+ * // between 1 and 50000 for a aws_alb_listener_rule resource:
20
16
  * const priority = new random.RandomInteger("priority", {
17
+ * min: 1,
18
+ * max: 50000,
21
19
  * keepers: {
22
20
  * listener_arn: _var.listener_arn,
23
21
  * },
24
- * max: 50000,
25
- * min: 1,
26
22
  * });
27
23
  * const main = new aws.alb.ListenerRule("main", {
24
+ * listenerArn: priority.keepers.apply(keepers => keepers?.listenerArn),
25
+ * priority: priority.result,
28
26
  * actions: [{
29
- * targetGroupArn: _var.target_group_arn,
30
27
  * type: "forward",
28
+ * targetGroupArn: _var.target_group_arn,
31
29
  * }],
32
- * listenerArn: _var.listener_arn,
33
- * priority: priority.result,
34
30
  * });
31
+ * // ... (other aws_alb_listener_rule arguments) ...
35
32
  * ```
36
33
  *
37
- * The result of the above will set a random priority.
38
- *
39
34
  * ## Import
40
35
  *
41
- * Random integers can be imported using the `result`, `min`, and `max`, with an optional `seed`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a `,`)
36
+ * Random integers can be imported using the result, min, and max, with an optional seed. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a ,)
42
37
  *
43
38
  * ```sh
44
39
  * $ pulumi import random:index/randomInteger:RandomInteger priority 15390,1,50000
@@ -61,12 +56,10 @@ export declare class RandomInteger extends pulumi.CustomResource {
61
56
  */
62
57
  static isInstance(obj: any): obj is RandomInteger;
63
58
  /**
64
- * Arbitrary map of values that, when changed, will
65
- * trigger a new id to be generated. See
66
- * the main provider documentation for more information.
59
+ * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
67
60
  */
68
61
  readonly keepers: pulumi.Output<{
69
- [key: string]: any;
62
+ [key: string]: string;
70
63
  } | undefined>;
71
64
  /**
72
65
  * The maximum inclusive value of the range.
@@ -77,7 +70,7 @@ export declare class RandomInteger extends pulumi.CustomResource {
77
70
  */
78
71
  readonly min: pulumi.Output<number>;
79
72
  /**
80
- * (int) The random Integer result.
73
+ * The random integer result.
81
74
  */
82
75
  readonly result: pulumi.Output<number>;
83
76
  /**
@@ -98,12 +91,10 @@ export declare class RandomInteger extends pulumi.CustomResource {
98
91
  */
99
92
  export interface RandomIntegerState {
100
93
  /**
101
- * Arbitrary map of values that, when changed, will
102
- * trigger a new id to be generated. See
103
- * the main provider documentation for more information.
94
+ * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
104
95
  */
105
96
  keepers?: pulumi.Input<{
106
- [key: string]: any;
97
+ [key: string]: pulumi.Input<string>;
107
98
  }>;
108
99
  /**
109
100
  * The maximum inclusive value of the range.
@@ -114,7 +105,7 @@ export interface RandomIntegerState {
114
105
  */
115
106
  min?: pulumi.Input<number>;
116
107
  /**
117
- * (int) The random Integer result.
108
+ * The random integer result.
118
109
  */
119
110
  result?: pulumi.Input<number>;
120
111
  /**
@@ -127,12 +118,10 @@ export interface RandomIntegerState {
127
118
  */
128
119
  export interface RandomIntegerArgs {
129
120
  /**
130
- * Arbitrary map of values that, when changed, will
131
- * trigger a new id to be generated. See
132
- * the main provider documentation for more information.
121
+ * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
133
122
  */
134
123
  keepers?: pulumi.Input<{
135
- [key: string]: any;
124
+ [key: string]: pulumi.Input<string>;
136
125
  }>;
137
126
  /**
138
127
  * The maximum inclusive value of the range.
package/randomInteger.js CHANGED
@@ -8,43 +8,38 @@ const utilities = require("./utilities");
8
8
  /**
9
9
  * The resource `random.RandomInteger` generates random values from a given range, described by the `min` and `max` attributes of a given resource.
10
10
  *
11
- * This resource can be used in conjunction with resources that have
12
- * the `createBeforeDestroy` lifecycle flag set, to avoid conflicts with
13
- * unique names during the brief period where both the old and new resources
14
- * exist concurrently.
11
+ * This resource can be used in conjunction with resources that have the `createBeforeDestroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently.
15
12
  *
16
13
  * ## Example Usage
17
14
  *
18
- * The following example shows how to generate a random priority between 1 and 50000 for
19
- * a `awsAlbListenerRule` resource:
20
- *
21
15
  * ```typescript
22
16
  * import * as pulumi from "@pulumi/pulumi";
23
17
  * import * as aws from "@pulumi/aws";
24
18
  * import * as random from "@pulumi/random";
25
19
  *
20
+ * // The following example shows how to generate a random priority
21
+ * // between 1 and 50000 for a aws_alb_listener_rule resource:
26
22
  * const priority = new random.RandomInteger("priority", {
23
+ * min: 1,
24
+ * max: 50000,
27
25
  * keepers: {
28
26
  * listener_arn: _var.listener_arn,
29
27
  * },
30
- * max: 50000,
31
- * min: 1,
32
28
  * });
33
29
  * const main = new aws.alb.ListenerRule("main", {
30
+ * listenerArn: priority.keepers.apply(keepers => keepers?.listenerArn),
31
+ * priority: priority.result,
34
32
  * actions: [{
35
- * targetGroupArn: _var.target_group_arn,
36
33
  * type: "forward",
34
+ * targetGroupArn: _var.target_group_arn,
37
35
  * }],
38
- * listenerArn: _var.listener_arn,
39
- * priority: priority.result,
40
36
  * });
37
+ * // ... (other aws_alb_listener_rule arguments) ...
41
38
  * ```
42
39
  *
43
- * The result of the above will set a random priority.
44
- *
45
40
  * ## Import
46
41
  *
47
- * Random integers can be imported using the `result`, `min`, and `max`, with an optional `seed`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a `,`)
42
+ * Random integers can be imported using the result, min, and max, with an optional seed. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a ,)
48
43
  *
49
44
  * ```sh
50
45
  * $ pulumi import random:index/randomInteger:RandomInteger priority 15390,1,50000
@@ -1 +1 @@
1
- {"version":3,"file":"randomInteger.js","sourceRoot":"","sources":["../randomInteger.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAa,aAAc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