@pulumi/random 4.9.0 → 4.10.0-alpha.1674847484
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 +2 -2
- package/package.json.dev +2 -2
- package/randomId.d.ts +34 -19
- package/randomId.js +7 -7
- package/randomId.js.map +1 -1
- package/randomInteger.d.ts +29 -18
- package/randomInteger.js +15 -10
- package/randomInteger.js.map +1 -1
- package/randomPassword.d.ts +67 -123
- package/randomPassword.js +15 -58
- package/randomPassword.js.map +1 -1
- package/randomPet.d.ts +33 -21
- package/randomPet.js +13 -7
- package/randomPet.js.map +1 -1
- package/randomShuffle.d.ts +39 -15
- package/randomShuffle.js +3 -3
- package/randomShuffle.js.map +1 -1
- package/randomString.d.ts +93 -118
- package/randomString.js +8 -56
- package/randomString.js.map +1 -1
- package/randomUuid.d.ts +19 -9
- package/randomUuid.js +7 -3
- package/randomUuid.js.map +1 -1
package/randomShuffle.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
/**
|
|
3
|
-
* The resource `random.RandomShuffle` generates a random permutation of a list
|
|
3
|
+
* The resource `random.RandomShuffle` generates a random permutation of a list
|
|
4
|
+
* of strings given as an argument.
|
|
4
5
|
*
|
|
5
6
|
* ## Example Usage
|
|
6
7
|
*
|
|
@@ -18,8 +19,7 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
18
19
|
* ],
|
|
19
20
|
* resultCount: 2,
|
|
20
21
|
* });
|
|
21
|
-
* const example = new aws.elb.LoadBalancer("example", {availabilityZones:
|
|
22
|
-
* // ... and other aws_elb arguments ...
|
|
22
|
+
* const example = new aws.elb.LoadBalancer("example", {availabilityZones: az.results});
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
export declare class RandomShuffle extends pulumi.CustomResource {
|
|
@@ -43,13 +43,19 @@ export declare class RandomShuffle extends pulumi.CustomResource {
|
|
|
43
43
|
*/
|
|
44
44
|
readonly inputs: pulumi.Output<string[]>;
|
|
45
45
|
/**
|
|
46
|
-
* Arbitrary map of values that, when changed, will
|
|
46
|
+
* Arbitrary map of values that, when changed, will
|
|
47
|
+
* trigger a new id to be generated. See
|
|
48
|
+
* the main provider documentation for more information.
|
|
47
49
|
*/
|
|
48
50
|
readonly keepers: pulumi.Output<{
|
|
49
|
-
[key: string]:
|
|
51
|
+
[key: string]: any;
|
|
50
52
|
} | undefined>;
|
|
51
53
|
/**
|
|
52
|
-
* The number of results to return. Defaults to
|
|
54
|
+
* The number of results to return. Defaults to
|
|
55
|
+
* the number of items in the `input` list. If fewer items are requested,
|
|
56
|
+
* some elements will be excluded from the result. If more items are requested,
|
|
57
|
+
* items will be repeated in the result but not more frequently than the number
|
|
58
|
+
* of items in the input list.
|
|
53
59
|
*/
|
|
54
60
|
readonly resultCount: pulumi.Output<number | undefined>;
|
|
55
61
|
/**
|
|
@@ -57,7 +63,9 @@ export declare class RandomShuffle extends pulumi.CustomResource {
|
|
|
57
63
|
*/
|
|
58
64
|
readonly results: pulumi.Output<string[]>;
|
|
59
65
|
/**
|
|
60
|
-
* Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the
|
|
66
|
+
* Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the
|
|
67
|
+
* list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across
|
|
68
|
+
* different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time.
|
|
61
69
|
*/
|
|
62
70
|
readonly seed: pulumi.Output<string | undefined>;
|
|
63
71
|
/**
|
|
@@ -78,13 +86,19 @@ export interface RandomShuffleState {
|
|
|
78
86
|
*/
|
|
79
87
|
inputs?: pulumi.Input<pulumi.Input<string>[]>;
|
|
80
88
|
/**
|
|
81
|
-
* Arbitrary map of values that, when changed, will
|
|
89
|
+
* Arbitrary map of values that, when changed, will
|
|
90
|
+
* trigger a new id to be generated. See
|
|
91
|
+
* the main provider documentation for more information.
|
|
82
92
|
*/
|
|
83
93
|
keepers?: pulumi.Input<{
|
|
84
|
-
[key: string]:
|
|
94
|
+
[key: string]: any;
|
|
85
95
|
}>;
|
|
86
96
|
/**
|
|
87
|
-
* The number of results to return. Defaults to
|
|
97
|
+
* The number of results to return. Defaults to
|
|
98
|
+
* the number of items in the `input` list. If fewer items are requested,
|
|
99
|
+
* some elements will be excluded from the result. If more items are requested,
|
|
100
|
+
* items will be repeated in the result but not more frequently than the number
|
|
101
|
+
* of items in the input list.
|
|
88
102
|
*/
|
|
89
103
|
resultCount?: pulumi.Input<number>;
|
|
90
104
|
/**
|
|
@@ -92,7 +106,9 @@ export interface RandomShuffleState {
|
|
|
92
106
|
*/
|
|
93
107
|
results?: pulumi.Input<pulumi.Input<string>[]>;
|
|
94
108
|
/**
|
|
95
|
-
* Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the
|
|
109
|
+
* Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the
|
|
110
|
+
* list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across
|
|
111
|
+
* different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time.
|
|
96
112
|
*/
|
|
97
113
|
seed?: pulumi.Input<string>;
|
|
98
114
|
}
|
|
@@ -105,17 +121,25 @@ export interface RandomShuffleArgs {
|
|
|
105
121
|
*/
|
|
106
122
|
inputs: pulumi.Input<pulumi.Input<string>[]>;
|
|
107
123
|
/**
|
|
108
|
-
* Arbitrary map of values that, when changed, will
|
|
124
|
+
* Arbitrary map of values that, when changed, will
|
|
125
|
+
* trigger a new id to be generated. See
|
|
126
|
+
* the main provider documentation for more information.
|
|
109
127
|
*/
|
|
110
128
|
keepers?: pulumi.Input<{
|
|
111
|
-
[key: string]:
|
|
129
|
+
[key: string]: any;
|
|
112
130
|
}>;
|
|
113
131
|
/**
|
|
114
|
-
* The number of results to return. Defaults to
|
|
132
|
+
* The number of results to return. Defaults to
|
|
133
|
+
* the number of items in the `input` list. If fewer items are requested,
|
|
134
|
+
* some elements will be excluded from the result. If more items are requested,
|
|
135
|
+
* items will be repeated in the result but not more frequently than the number
|
|
136
|
+
* of items in the input list.
|
|
115
137
|
*/
|
|
116
138
|
resultCount?: pulumi.Input<number>;
|
|
117
139
|
/**
|
|
118
|
-
* Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the
|
|
140
|
+
* Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the
|
|
141
|
+
* list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across
|
|
142
|
+
* different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time.
|
|
119
143
|
*/
|
|
120
144
|
seed?: pulumi.Input<string>;
|
|
121
145
|
}
|
package/randomShuffle.js
CHANGED
|
@@ -6,7 +6,8 @@ exports.RandomShuffle = void 0;
|
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
8
|
/**
|
|
9
|
-
* The resource `random.RandomShuffle` generates a random permutation of a list
|
|
9
|
+
* The resource `random.RandomShuffle` generates a random permutation of a list
|
|
10
|
+
* of strings given as an argument.
|
|
10
11
|
*
|
|
11
12
|
* ## Example Usage
|
|
12
13
|
*
|
|
@@ -24,8 +25,7 @@ const utilities = require("./utilities");
|
|
|
24
25
|
* ],
|
|
25
26
|
* resultCount: 2,
|
|
26
27
|
* });
|
|
27
|
-
* const example = new aws.elb.LoadBalancer("example", {availabilityZones:
|
|
28
|
-
* // ... and other aws_elb arguments ...
|
|
28
|
+
* const example = new aws.elb.LoadBalancer("example", {availabilityZones: az.results});
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
class RandomShuffle extends pulumi.CustomResource {
|
package/randomShuffle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"randomShuffle.js","sourceRoot":"","sources":["../randomShuffle.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;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cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,cAAc,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACjD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC;;AAxFL,sCAyFC;AA3EG,gBAAgB;AACO,0BAAY,GAAG,0CAA0C,CAAC"}
|
package/randomString.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
/**
|
|
3
|
-
* The resource `random.RandomString` generates a random permutation of alphanumeric
|
|
3
|
+
* The resource `random.RandomString` generates a random permutation of alphanumeric
|
|
4
|
+
* characters and optionally special characters.
|
|
4
5
|
*
|
|
5
6
|
* This resource *does* use a cryptographic random number generator.
|
|
6
7
|
*
|
|
7
|
-
* Historically this resource's intended usage has been ambiguous as the original example
|
|
8
|
+
* Historically this resource's intended usage has been ambiguous as the original example
|
|
9
|
+
* used it in a password. For backwards compatibility it will
|
|
10
|
+
* continue to exist. For unique ids please use random_id, for sensitive
|
|
11
|
+
* random values please use random_password.
|
|
8
12
|
*
|
|
9
13
|
* ## Example Usage
|
|
10
14
|
*
|
|
@@ -21,61 +25,11 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
21
25
|
*
|
|
22
26
|
* ## Import
|
|
23
27
|
*
|
|
24
|
-
*
|
|
28
|
+
* Strings can be imported by just specifying the value of the string
|
|
25
29
|
*
|
|
26
30
|
* ```sh
|
|
27
|
-
* $ pulumi import random:index/randomString:RandomString
|
|
31
|
+
* $ pulumi import random:index/randomString:RandomString test test
|
|
28
32
|
* ```
|
|
29
|
-
*
|
|
30
|
-
* replacement can be avoided by using1. Attribute values that match the imported ID and defaults:
|
|
31
|
-
*
|
|
32
|
-
* terraform
|
|
33
|
-
*
|
|
34
|
-
* resource "random_string" "test" {
|
|
35
|
-
*
|
|
36
|
-
* length = 4
|
|
37
|
-
*
|
|
38
|
-
* lower
|
|
39
|
-
*
|
|
40
|
-
* = true
|
|
41
|
-
*
|
|
42
|
-
* } 2. Attribute values that match the imported ID and omit the attributes with defaults:
|
|
43
|
-
*
|
|
44
|
-
* terraform
|
|
45
|
-
*
|
|
46
|
-
* resource "random_string" "test" {
|
|
47
|
-
*
|
|
48
|
-
* length = 4
|
|
49
|
-
*
|
|
50
|
-
* } 3. `ignore_changes` specifying the attributes to ignore:
|
|
51
|
-
*
|
|
52
|
-
* terraform
|
|
53
|
-
*
|
|
54
|
-
* resource "random_string" "test" {
|
|
55
|
-
*
|
|
56
|
-
* length = 16
|
|
57
|
-
*
|
|
58
|
-
* lower
|
|
59
|
-
*
|
|
60
|
-
* = false
|
|
61
|
-
*
|
|
62
|
-
* lifecycle {
|
|
63
|
-
*
|
|
64
|
-
* ignore_changes = [
|
|
65
|
-
*
|
|
66
|
-
* length,
|
|
67
|
-
*
|
|
68
|
-
* lower,
|
|
69
|
-
*
|
|
70
|
-
* ]
|
|
71
|
-
*
|
|
72
|
-
* }
|
|
73
|
-
*
|
|
74
|
-
* }
|
|
75
|
-
*
|
|
76
|
-
* **NOTE** `ignore_changes` is only required until the resource is recreated after import,
|
|
77
|
-
*
|
|
78
|
-
* after which it will use the configuration values specified.
|
|
79
33
|
*/
|
|
80
34
|
export declare class RandomString extends pulumi.CustomResource {
|
|
81
35
|
/**
|
|
@@ -94,61 +48,68 @@ export declare class RandomString extends pulumi.CustomResource {
|
|
|
94
48
|
*/
|
|
95
49
|
static isInstance(obj: any): obj is RandomString;
|
|
96
50
|
/**
|
|
97
|
-
* Arbitrary map of values that, when changed, will
|
|
51
|
+
* Arbitrary map of values that, when changed, will
|
|
52
|
+
* trigger a new id to be generated. See
|
|
53
|
+
* the main provider documentation for more information.
|
|
98
54
|
*/
|
|
99
55
|
readonly keepers: pulumi.Output<{
|
|
100
|
-
[key: string]:
|
|
56
|
+
[key: string]: any;
|
|
101
57
|
} | undefined>;
|
|
102
58
|
/**
|
|
103
|
-
* The length of the string desired
|
|
59
|
+
* The length of the string desired
|
|
104
60
|
*/
|
|
105
61
|
readonly length: pulumi.Output<number>;
|
|
106
62
|
/**
|
|
107
|
-
* Include lowercase alphabet characters
|
|
63
|
+
* (default true) Include lowercase alphabet characters
|
|
64
|
+
* in random string.
|
|
108
65
|
*/
|
|
109
|
-
readonly lower: pulumi.Output<boolean>;
|
|
66
|
+
readonly lower: pulumi.Output<boolean | undefined>;
|
|
110
67
|
/**
|
|
111
|
-
* Minimum number of lowercase alphabet
|
|
68
|
+
* (default 0) Minimum number of lowercase alphabet
|
|
69
|
+
* characters in random string.
|
|
112
70
|
*/
|
|
113
|
-
readonly minLower: pulumi.Output<number>;
|
|
71
|
+
readonly minLower: pulumi.Output<number | undefined>;
|
|
114
72
|
/**
|
|
115
|
-
* Minimum number of numeric characters
|
|
73
|
+
* (default 0) Minimum number of numeric characters
|
|
74
|
+
* in random string.
|
|
116
75
|
*/
|
|
117
|
-
readonly minNumeric: pulumi.Output<number>;
|
|
76
|
+
readonly minNumeric: pulumi.Output<number | undefined>;
|
|
118
77
|
/**
|
|
119
|
-
* Minimum number of special characters
|
|
78
|
+
* (default 0) Minimum number of special characters
|
|
79
|
+
* in random string.
|
|
120
80
|
*/
|
|
121
|
-
readonly minSpecial: pulumi.Output<number>;
|
|
81
|
+
readonly minSpecial: pulumi.Output<number | undefined>;
|
|
122
82
|
/**
|
|
123
|
-
* Minimum number of uppercase alphabet
|
|
83
|
+
* (default 0) Minimum number of uppercase alphabet
|
|
84
|
+
* characters in random string.
|
|
124
85
|
*/
|
|
125
|
-
readonly minUpper: pulumi.Output<number>;
|
|
86
|
+
readonly minUpper: pulumi.Output<number | undefined>;
|
|
126
87
|
/**
|
|
127
|
-
* Include numeric characters in
|
|
128
|
-
*
|
|
129
|
-
* @deprecated **NOTE**: This is deprecated, use `numeric` instead.
|
|
88
|
+
* (default true) Include numeric characters in random
|
|
89
|
+
* string.
|
|
130
90
|
*/
|
|
131
|
-
readonly number: pulumi.Output<boolean>;
|
|
91
|
+
readonly number: pulumi.Output<boolean | undefined>;
|
|
132
92
|
/**
|
|
133
|
-
*
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
* Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.
|
|
93
|
+
* Supply your own list of special characters to
|
|
94
|
+
* use for string generation. This overrides the default character list in the special
|
|
95
|
+
* argument. The special argument must still be set to true for any overwritten
|
|
96
|
+
* characters to be used in generation.
|
|
138
97
|
*/
|
|
139
98
|
readonly overrideSpecial: pulumi.Output<string | undefined>;
|
|
140
99
|
/**
|
|
141
|
-
*
|
|
100
|
+
* Random string generated.
|
|
142
101
|
*/
|
|
143
102
|
readonly result: pulumi.Output<string>;
|
|
144
103
|
/**
|
|
145
|
-
* Include special characters in
|
|
104
|
+
* (default true) Include special characters in random
|
|
105
|
+
* string. These are `!@#$%&*()-_=+[]{}<>:?`
|
|
146
106
|
*/
|
|
147
|
-
readonly special: pulumi.Output<boolean>;
|
|
107
|
+
readonly special: pulumi.Output<boolean | undefined>;
|
|
148
108
|
/**
|
|
149
|
-
* Include uppercase alphabet characters
|
|
109
|
+
* (default true) Include uppercase alphabet characters
|
|
110
|
+
* in random string.
|
|
150
111
|
*/
|
|
151
|
-
readonly upper: pulumi.Output<boolean>;
|
|
112
|
+
readonly upper: pulumi.Output<boolean | undefined>;
|
|
152
113
|
/**
|
|
153
114
|
* Create a RandomString resource with the given unique name, arguments, and options.
|
|
154
115
|
*
|
|
@@ -163,59 +124,66 @@ export declare class RandomString extends pulumi.CustomResource {
|
|
|
163
124
|
*/
|
|
164
125
|
export interface RandomStringState {
|
|
165
126
|
/**
|
|
166
|
-
* Arbitrary map of values that, when changed, will
|
|
127
|
+
* Arbitrary map of values that, when changed, will
|
|
128
|
+
* trigger a new id to be generated. See
|
|
129
|
+
* the main provider documentation for more information.
|
|
167
130
|
*/
|
|
168
131
|
keepers?: pulumi.Input<{
|
|
169
|
-
[key: string]:
|
|
132
|
+
[key: string]: any;
|
|
170
133
|
}>;
|
|
171
134
|
/**
|
|
172
|
-
* The length of the string desired
|
|
135
|
+
* The length of the string desired
|
|
173
136
|
*/
|
|
174
137
|
length?: pulumi.Input<number>;
|
|
175
138
|
/**
|
|
176
|
-
* Include lowercase alphabet characters
|
|
139
|
+
* (default true) Include lowercase alphabet characters
|
|
140
|
+
* in random string.
|
|
177
141
|
*/
|
|
178
142
|
lower?: pulumi.Input<boolean>;
|
|
179
143
|
/**
|
|
180
|
-
* Minimum number of lowercase alphabet
|
|
144
|
+
* (default 0) Minimum number of lowercase alphabet
|
|
145
|
+
* characters in random string.
|
|
181
146
|
*/
|
|
182
147
|
minLower?: pulumi.Input<number>;
|
|
183
148
|
/**
|
|
184
|
-
* Minimum number of numeric characters
|
|
149
|
+
* (default 0) Minimum number of numeric characters
|
|
150
|
+
* in random string.
|
|
185
151
|
*/
|
|
186
152
|
minNumeric?: pulumi.Input<number>;
|
|
187
153
|
/**
|
|
188
|
-
* Minimum number of special characters
|
|
154
|
+
* (default 0) Minimum number of special characters
|
|
155
|
+
* in random string.
|
|
189
156
|
*/
|
|
190
157
|
minSpecial?: pulumi.Input<number>;
|
|
191
158
|
/**
|
|
192
|
-
* Minimum number of uppercase alphabet
|
|
159
|
+
* (default 0) Minimum number of uppercase alphabet
|
|
160
|
+
* characters in random string.
|
|
193
161
|
*/
|
|
194
162
|
minUpper?: pulumi.Input<number>;
|
|
195
163
|
/**
|
|
196
|
-
* Include numeric characters in
|
|
197
|
-
*
|
|
198
|
-
* @deprecated **NOTE**: This is deprecated, use `numeric` instead.
|
|
164
|
+
* (default true) Include numeric characters in random
|
|
165
|
+
* string.
|
|
199
166
|
*/
|
|
200
167
|
number?: pulumi.Input<boolean>;
|
|
201
168
|
/**
|
|
202
|
-
*
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
* Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.
|
|
169
|
+
* Supply your own list of special characters to
|
|
170
|
+
* use for string generation. This overrides the default character list in the special
|
|
171
|
+
* argument. The special argument must still be set to true for any overwritten
|
|
172
|
+
* characters to be used in generation.
|
|
207
173
|
*/
|
|
208
174
|
overrideSpecial?: pulumi.Input<string>;
|
|
209
175
|
/**
|
|
210
|
-
*
|
|
176
|
+
* Random string generated.
|
|
211
177
|
*/
|
|
212
178
|
result?: pulumi.Input<string>;
|
|
213
179
|
/**
|
|
214
|
-
* Include special characters in
|
|
180
|
+
* (default true) Include special characters in random
|
|
181
|
+
* string. These are `!@#$%&*()-_=+[]{}<>:?`
|
|
215
182
|
*/
|
|
216
183
|
special?: pulumi.Input<boolean>;
|
|
217
184
|
/**
|
|
218
|
-
* Include uppercase alphabet characters
|
|
185
|
+
* (default true) Include uppercase alphabet characters
|
|
186
|
+
* in random string.
|
|
219
187
|
*/
|
|
220
188
|
upper?: pulumi.Input<boolean>;
|
|
221
189
|
}
|
|
@@ -224,55 +192,62 @@ export interface RandomStringState {
|
|
|
224
192
|
*/
|
|
225
193
|
export interface RandomStringArgs {
|
|
226
194
|
/**
|
|
227
|
-
* Arbitrary map of values that, when changed, will
|
|
195
|
+
* Arbitrary map of values that, when changed, will
|
|
196
|
+
* trigger a new id to be generated. See
|
|
197
|
+
* the main provider documentation for more information.
|
|
228
198
|
*/
|
|
229
199
|
keepers?: pulumi.Input<{
|
|
230
|
-
[key: string]:
|
|
200
|
+
[key: string]: any;
|
|
231
201
|
}>;
|
|
232
202
|
/**
|
|
233
|
-
* The length of the string desired
|
|
203
|
+
* The length of the string desired
|
|
234
204
|
*/
|
|
235
205
|
length: pulumi.Input<number>;
|
|
236
206
|
/**
|
|
237
|
-
* Include lowercase alphabet characters
|
|
207
|
+
* (default true) Include lowercase alphabet characters
|
|
208
|
+
* in random string.
|
|
238
209
|
*/
|
|
239
210
|
lower?: pulumi.Input<boolean>;
|
|
240
211
|
/**
|
|
241
|
-
* Minimum number of lowercase alphabet
|
|
212
|
+
* (default 0) Minimum number of lowercase alphabet
|
|
213
|
+
* characters in random string.
|
|
242
214
|
*/
|
|
243
215
|
minLower?: pulumi.Input<number>;
|
|
244
216
|
/**
|
|
245
|
-
* Minimum number of numeric characters
|
|
217
|
+
* (default 0) Minimum number of numeric characters
|
|
218
|
+
* in random string.
|
|
246
219
|
*/
|
|
247
220
|
minNumeric?: pulumi.Input<number>;
|
|
248
221
|
/**
|
|
249
|
-
* Minimum number of special characters
|
|
222
|
+
* (default 0) Minimum number of special characters
|
|
223
|
+
* in random string.
|
|
250
224
|
*/
|
|
251
225
|
minSpecial?: pulumi.Input<number>;
|
|
252
226
|
/**
|
|
253
|
-
* Minimum number of uppercase alphabet
|
|
227
|
+
* (default 0) Minimum number of uppercase alphabet
|
|
228
|
+
* characters in random string.
|
|
254
229
|
*/
|
|
255
230
|
minUpper?: pulumi.Input<number>;
|
|
256
231
|
/**
|
|
257
|
-
* Include numeric characters in
|
|
258
|
-
*
|
|
259
|
-
* @deprecated **NOTE**: This is deprecated, use `numeric` instead.
|
|
232
|
+
* (default true) Include numeric characters in random
|
|
233
|
+
* string.
|
|
260
234
|
*/
|
|
261
235
|
number?: pulumi.Input<boolean>;
|
|
262
236
|
/**
|
|
263
|
-
*
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
* Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.
|
|
237
|
+
* Supply your own list of special characters to
|
|
238
|
+
* use for string generation. This overrides the default character list in the special
|
|
239
|
+
* argument. The special argument must still be set to true for any overwritten
|
|
240
|
+
* characters to be used in generation.
|
|
268
241
|
*/
|
|
269
242
|
overrideSpecial?: pulumi.Input<string>;
|
|
270
243
|
/**
|
|
271
|
-
* Include special characters in
|
|
244
|
+
* (default true) Include special characters in random
|
|
245
|
+
* string. These are `!@#$%&*()-_=+[]{}<>:?`
|
|
272
246
|
*/
|
|
273
247
|
special?: pulumi.Input<boolean>;
|
|
274
248
|
/**
|
|
275
|
-
* Include uppercase alphabet characters
|
|
249
|
+
* (default true) Include uppercase alphabet characters
|
|
250
|
+
* in random string.
|
|
276
251
|
*/
|
|
277
252
|
upper?: pulumi.Input<boolean>;
|
|
278
253
|
}
|
package/randomString.js
CHANGED
|
@@ -6,11 +6,15 @@ exports.RandomString = void 0;
|
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
8
|
/**
|
|
9
|
-
* The resource `random.RandomString` generates a random permutation of alphanumeric
|
|
9
|
+
* The resource `random.RandomString` generates a random permutation of alphanumeric
|
|
10
|
+
* characters and optionally special characters.
|
|
10
11
|
*
|
|
11
12
|
* This resource *does* use a cryptographic random number generator.
|
|
12
13
|
*
|
|
13
|
-
* Historically this resource's intended usage has been ambiguous as the original example
|
|
14
|
+
* Historically this resource's intended usage has been ambiguous as the original example
|
|
15
|
+
* used it in a password. For backwards compatibility it will
|
|
16
|
+
* continue to exist. For unique ids please use random_id, for sensitive
|
|
17
|
+
* random values please use random_password.
|
|
14
18
|
*
|
|
15
19
|
* ## Example Usage
|
|
16
20
|
*
|
|
@@ -27,61 +31,11 @@ const utilities = require("./utilities");
|
|
|
27
31
|
*
|
|
28
32
|
* ## Import
|
|
29
33
|
*
|
|
30
|
-
*
|
|
34
|
+
* Strings can be imported by just specifying the value of the string
|
|
31
35
|
*
|
|
32
36
|
* ```sh
|
|
33
|
-
* $ pulumi import random:index/randomString:RandomString
|
|
37
|
+
* $ pulumi import random:index/randomString:RandomString test test
|
|
34
38
|
* ```
|
|
35
|
-
*
|
|
36
|
-
* replacement can be avoided by using1. Attribute values that match the imported ID and defaults:
|
|
37
|
-
*
|
|
38
|
-
* terraform
|
|
39
|
-
*
|
|
40
|
-
* resource "random_string" "test" {
|
|
41
|
-
*
|
|
42
|
-
* length = 4
|
|
43
|
-
*
|
|
44
|
-
* lower
|
|
45
|
-
*
|
|
46
|
-
* = true
|
|
47
|
-
*
|
|
48
|
-
* } 2. Attribute values that match the imported ID and omit the attributes with defaults:
|
|
49
|
-
*
|
|
50
|
-
* terraform
|
|
51
|
-
*
|
|
52
|
-
* resource "random_string" "test" {
|
|
53
|
-
*
|
|
54
|
-
* length = 4
|
|
55
|
-
*
|
|
56
|
-
* } 3. `ignore_changes` specifying the attributes to ignore:
|
|
57
|
-
*
|
|
58
|
-
* terraform
|
|
59
|
-
*
|
|
60
|
-
* resource "random_string" "test" {
|
|
61
|
-
*
|
|
62
|
-
* length = 16
|
|
63
|
-
*
|
|
64
|
-
* lower
|
|
65
|
-
*
|
|
66
|
-
* = false
|
|
67
|
-
*
|
|
68
|
-
* lifecycle {
|
|
69
|
-
*
|
|
70
|
-
* ignore_changes = [
|
|
71
|
-
*
|
|
72
|
-
* length,
|
|
73
|
-
*
|
|
74
|
-
* lower,
|
|
75
|
-
*
|
|
76
|
-
* ]
|
|
77
|
-
*
|
|
78
|
-
* }
|
|
79
|
-
*
|
|
80
|
-
* }
|
|
81
|
-
*
|
|
82
|
-
* **NOTE** `ignore_changes` is only required until the resource is recreated after import,
|
|
83
|
-
*
|
|
84
|
-
* after which it will use the configuration values specified.
|
|
85
39
|
*/
|
|
86
40
|
class RandomString extends pulumi.CustomResource {
|
|
87
41
|
/**
|
|
@@ -119,7 +73,6 @@ class RandomString extends pulumi.CustomResource {
|
|
|
119
73
|
resourceInputs["minSpecial"] = state ? state.minSpecial : undefined;
|
|
120
74
|
resourceInputs["minUpper"] = state ? state.minUpper : undefined;
|
|
121
75
|
resourceInputs["number"] = state ? state.number : undefined;
|
|
122
|
-
resourceInputs["numeric"] = state ? state.numeric : undefined;
|
|
123
76
|
resourceInputs["overrideSpecial"] = state ? state.overrideSpecial : undefined;
|
|
124
77
|
resourceInputs["result"] = state ? state.result : undefined;
|
|
125
78
|
resourceInputs["special"] = state ? state.special : undefined;
|
|
@@ -138,7 +91,6 @@ class RandomString extends pulumi.CustomResource {
|
|
|
138
91
|
resourceInputs["minSpecial"] = args ? args.minSpecial : undefined;
|
|
139
92
|
resourceInputs["minUpper"] = args ? args.minUpper : undefined;
|
|
140
93
|
resourceInputs["number"] = args ? args.number : undefined;
|
|
141
|
-
resourceInputs["numeric"] = args ? args.numeric : undefined;
|
|
142
94
|
resourceInputs["overrideSpecial"] = args ? args.overrideSpecial : undefined;
|
|
143
95
|
resourceInputs["special"] = args ? args.special : undefined;
|
|
144
96
|
resourceInputs["upper"] = args ? args.upper : undefined;
|
package/randomString.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"randomString.js","sourceRoot":"","sources":["../randomString.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"randomString.js","sourceRoot":"","sources":["../randomString.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,YAAa,SAAQ,MAAM,CAAC,cAAc;IACnD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAyB,EAAE,IAAmC;QACvH,OAAO,IAAI,YAAY,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACnE,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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