@pulumi/nomad 2.6.0-alpha.1776321506 → 2.6.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/variable.d.ts CHANGED
@@ -7,6 +7,9 @@ import * as pulumi from "@pulumi/pulumi";
7
7
  * `items` in the Terraform's state file. Take care to
8
8
  * [protect your state file](https://www.terraform.io/docs/state/sensitive-data.html).
9
9
  *
10
+ * > **Note:** Use `itemsWo` with `itemsWoVersion` when you want Terraform to
11
+ * write variable items without storing those values in the state file.
12
+ *
10
13
  * ## Example Usage
11
14
  *
12
15
  * Creating a variable in the default namespace:
@@ -23,6 +26,21 @@ import * as pulumi from "@pulumi/pulumi";
23
26
  * });
24
27
  * ```
25
28
  *
29
+ * Creating a variable with write-only items:
30
+ *
31
+ * ```typescript
32
+ * import * as pulumi from "@pulumi/pulumi";
33
+ * import * as nomad from "@pulumi/nomad";
34
+ *
35
+ * const example = new nomad.Variable("example", {
36
+ * path: "some/path/of/your/choosing",
37
+ * itemsWo: JSON.stringify({
38
+ * example_key: "example_value",
39
+ * }),
40
+ * itemsWoVersion: 1,
41
+ * });
42
+ * ```
43
+ *
26
44
  * Creating a variable in a custom namespace:
27
45
  *
28
46
  * ```typescript
@@ -59,11 +77,20 @@ export declare class Variable extends pulumi.CustomResource {
59
77
  */
60
78
  static isInstance(obj: any): obj is Variable;
61
79
  /**
62
- * `(map[string]string: <required>)` - An arbitrary map of items to create in the variable.
80
+ * `(map[string]string)` - An arbitrary map of items to create in the variable. Conflicts with `itemsWo` and `itemsWoVersion`.
63
81
  */
64
82
  readonly items: pulumi.Output<{
65
83
  [key: string]: string;
66
- }>;
84
+ } | undefined>;
85
+ /**
86
+ * **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
87
+ * `(string)` - A JSON-encoded map of variable items to write without storing those values in Terraform state. Conflicts with `items` and requires `itemsWoVersion`.
88
+ */
89
+ readonly itemsWo: pulumi.Output<string | undefined>;
90
+ /**
91
+ * `(number)` - A version marker for `itemsWo`. Required when using `itemsWo`, conflicts with `items`, and should be incremented to apply a new write-only payload.
92
+ */
93
+ readonly itemsWoVersion: pulumi.Output<number | undefined>;
67
94
  /**
68
95
  * `(string: "default")` - The namepsace to create the variable in.
69
96
  */
@@ -86,11 +113,20 @@ export declare class Variable extends pulumi.CustomResource {
86
113
  */
87
114
  export interface VariableState {
88
115
  /**
89
- * `(map[string]string: <required>)` - An arbitrary map of items to create in the variable.
116
+ * `(map[string]string)` - An arbitrary map of items to create in the variable. Conflicts with `itemsWo` and `itemsWoVersion`.
90
117
  */
91
118
  items?: pulumi.Input<{
92
119
  [key: string]: pulumi.Input<string>;
93
120
  }>;
121
+ /**
122
+ * **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
123
+ * `(string)` - A JSON-encoded map of variable items to write without storing those values in Terraform state. Conflicts with `items` and requires `itemsWoVersion`.
124
+ */
125
+ itemsWo?: pulumi.Input<string>;
126
+ /**
127
+ * `(number)` - A version marker for `itemsWo`. Required when using `itemsWo`, conflicts with `items`, and should be incremented to apply a new write-only payload.
128
+ */
129
+ itemsWoVersion?: pulumi.Input<number>;
94
130
  /**
95
131
  * `(string: "default")` - The namepsace to create the variable in.
96
132
  */
@@ -105,11 +141,20 @@ export interface VariableState {
105
141
  */
106
142
  export interface VariableArgs {
107
143
  /**
108
- * `(map[string]string: <required>)` - An arbitrary map of items to create in the variable.
144
+ * `(map[string]string)` - An arbitrary map of items to create in the variable. Conflicts with `itemsWo` and `itemsWoVersion`.
109
145
  */
110
- items: pulumi.Input<{
146
+ items?: pulumi.Input<{
111
147
  [key: string]: pulumi.Input<string>;
112
148
  }>;
149
+ /**
150
+ * **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
151
+ * `(string)` - A JSON-encoded map of variable items to write without storing those values in Terraform state. Conflicts with `items` and requires `itemsWoVersion`.
152
+ */
153
+ itemsWo?: pulumi.Input<string>;
154
+ /**
155
+ * `(number)` - A version marker for `itemsWo`. Required when using `itemsWo`, conflicts with `items`, and should be incremented to apply a new write-only payload.
156
+ */
157
+ itemsWoVersion?: pulumi.Input<number>;
113
158
  /**
114
159
  * `(string: "default")` - The namepsace to create the variable in.
115
160
  */
package/variable.js CHANGED
@@ -13,6 +13,9 @@ const utilities = require("./utilities");
13
13
  * `items` in the Terraform's state file. Take care to
14
14
  * [protect your state file](https://www.terraform.io/docs/state/sensitive-data.html).
15
15
  *
16
+ * > **Note:** Use `itemsWo` with `itemsWoVersion` when you want Terraform to
17
+ * write variable items without storing those values in the state file.
18
+ *
16
19
  * ## Example Usage
17
20
  *
18
21
  * Creating a variable in the default namespace:
@@ -29,6 +32,21 @@ const utilities = require("./utilities");
29
32
  * });
30
33
  * ```
31
34
  *
35
+ * Creating a variable with write-only items:
36
+ *
37
+ * ```typescript
38
+ * import * as pulumi from "@pulumi/pulumi";
39
+ * import * as nomad from "@pulumi/nomad";
40
+ *
41
+ * const example = new nomad.Variable("example", {
42
+ * path: "some/path/of/your/choosing",
43
+ * itemsWo: JSON.stringify({
44
+ * example_key: "example_value",
45
+ * }),
46
+ * itemsWoVersion: 1,
47
+ * });
48
+ * ```
49
+ *
32
50
  * Creating a variable in a custom namespace:
33
51
  *
34
52
  * ```typescript
@@ -77,23 +95,24 @@ class Variable extends pulumi.CustomResource {
77
95
  if (opts.id) {
78
96
  const state = argsOrState;
79
97
  resourceInputs["items"] = state?.items;
98
+ resourceInputs["itemsWo"] = state?.itemsWo;
99
+ resourceInputs["itemsWoVersion"] = state?.itemsWoVersion;
80
100
  resourceInputs["namespace"] = state?.namespace;
81
101
  resourceInputs["path"] = state?.path;
82
102
  }
83
103
  else {
84
104
  const args = argsOrState;
85
- if (args?.items === undefined && !opts.urn) {
86
- throw new Error("Missing required property 'items'");
87
- }
88
105
  if (args?.path === undefined && !opts.urn) {
89
106
  throw new Error("Missing required property 'path'");
90
107
  }
91
108
  resourceInputs["items"] = args?.items ? pulumi.secret(args.items) : undefined;
109
+ resourceInputs["itemsWo"] = args?.itemsWo ? pulumi.secret(args.itemsWo) : undefined;
110
+ resourceInputs["itemsWoVersion"] = args?.itemsWoVersion;
92
111
  resourceInputs["namespace"] = args?.namespace;
93
112
  resourceInputs["path"] = args?.path;
94
113
  }
95
114
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
96
- const secretOpts = { additionalSecretOutputs: ["items"] };
115
+ const secretOpts = { additionalSecretOutputs: ["items", "itemsWo"] };
97
116
  opts = pulumi.mergeOptions(opts, secretOpts);
98
117
  super(Variable.__pulumiType, name, resourceInputs, opts);
99
118
  }
package/variable.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"variable.js","sourceRoot":"","sources":["../variable.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;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,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,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;IAuBD,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,KA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