@pulumi/harness 0.17.1 → 0.17.2

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.
@@ -10,10 +10,10 @@ import * as outputs from "../types/output";
10
10
  * import * as harness from "@pulumi/harness";
11
11
  *
12
12
  * // ============================================================================
13
- * // Harness Chaos Experiment Data Source Examples
13
+ * // Harness Chaos Experiment Function Examples
14
14
  * // ============================================================================
15
15
  * //
16
- * // The harness_chaos_experiment data source retrieves information about
16
+ * // The harness_chaos_experiment function retrieves information about
17
17
  * // existing chaos experiments.
18
18
  * //
19
19
  * // Lookup Methods:
@@ -214,10 +214,10 @@ export interface GetExperimentResult {
214
214
  * import * as harness from "@pulumi/harness";
215
215
  *
216
216
  * // ============================================================================
217
- * // Harness Chaos Experiment Data Source Examples
217
+ * // Harness Chaos Experiment Function Examples
218
218
  * // ============================================================================
219
219
  * //
220
- * // The harness_chaos_experiment data source retrieves information about
220
+ * // The harness_chaos_experiment function retrieves information about
221
221
  * // existing chaos experiments.
222
222
  * //
223
223
  * // Lookup Methods:
@@ -38,10 +38,10 @@ const utilities = __importStar(require("../utilities"));
38
38
  * import * as harness from "@pulumi/harness";
39
39
  *
40
40
  * // ============================================================================
41
- * // Harness Chaos Experiment Data Source Examples
41
+ * // Harness Chaos Experiment Function Examples
42
42
  * // ============================================================================
43
43
  * //
44
- * // The harness_chaos_experiment data source retrieves information about
44
+ * // The harness_chaos_experiment function retrieves information about
45
45
  * // existing chaos experiments.
46
46
  * //
47
47
  * // Lookup Methods:
@@ -109,10 +109,10 @@ exports.getExperiment = getExperiment;
109
109
  * import * as harness from "@pulumi/harness";
110
110
  *
111
111
  * // ============================================================================
112
- * // Harness Chaos Experiment Data Source Examples
112
+ * // Harness Chaos Experiment Function Examples
113
113
  * // ============================================================================
114
114
  * //
115
- * // The harness_chaos_experiment data source retrieves information about
115
+ * // The harness_chaos_experiment function retrieves information about
116
116
  * // existing chaos experiments.
117
117
  * //
118
118
  * // Lookup Methods:
@@ -37,10 +37,10 @@ import * as outputs from "../types/output";
37
37
  * export const experimentId = byIdentity.then(byIdentity => byIdentity.id);
38
38
  * export const experimentIdentity = byIdentity.then(byIdentity => byIdentity.identity);
39
39
  * export const experimentSpec = byIdentity.then(byIdentity => byIdentity.specs);
40
- * export const faultsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.faults).length;
41
- * export const probesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.probes).length;
42
- * export const actionsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.actions).length;
43
- * export const verticesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.vertices).length;
40
+ * export const faultsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.faults.length);
41
+ * export const probesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.probes.length);
42
+ * export const actionsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.actions.length);
43
+ * export const verticesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.vertices.length);
44
44
  * ```
45
45
  */
46
46
  export declare function getExperimentTemplate(args: GetExperimentTemplateArgs, opts?: pulumi.InvokeOptions): Promise<GetExperimentTemplateResult>;
@@ -163,10 +163,10 @@ export interface GetExperimentTemplateResult {
163
163
  * export const experimentId = byIdentity.then(byIdentity => byIdentity.id);
164
164
  * export const experimentIdentity = byIdentity.then(byIdentity => byIdentity.identity);
165
165
  * export const experimentSpec = byIdentity.then(byIdentity => byIdentity.specs);
166
- * export const faultsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.faults).length;
167
- * export const probesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.probes).length;
168
- * export const actionsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.actions).length;
169
- * export const verticesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.vertices).length;
166
+ * export const faultsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.faults.length);
167
+ * export const probesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.probes.length);
168
+ * export const actionsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.actions.length);
169
+ * export const verticesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.vertices.length);
170
170
  * ```
171
171
  */
172
172
  export declare function getExperimentTemplateOutput(args: GetExperimentTemplateOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetExperimentTemplateResult>;
@@ -65,10 +65,10 @@ const utilities = __importStar(require("../utilities"));
65
65
  * export const experimentId = byIdentity.then(byIdentity => byIdentity.id);
66
66
  * export const experimentIdentity = byIdentity.then(byIdentity => byIdentity.identity);
67
67
  * export const experimentSpec = byIdentity.then(byIdentity => byIdentity.specs);
68
- * export const faultsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.faults).length;
69
- * export const probesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.probes).length;
70
- * export const actionsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.actions).length;
71
- * export const verticesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.vertices).length;
68
+ * export const faultsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.faults.length);
69
+ * export const probesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.probes.length);
70
+ * export const actionsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.actions.length);
71
+ * export const verticesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.vertices.length);
72
72
  * ```
73
73
  */
74
74
  function getExperimentTemplate(args, opts) {
@@ -119,10 +119,10 @@ exports.getExperimentTemplate = getExperimentTemplate;
119
119
  * export const experimentId = byIdentity.then(byIdentity => byIdentity.id);
120
120
  * export const experimentIdentity = byIdentity.then(byIdentity => byIdentity.identity);
121
121
  * export const experimentSpec = byIdentity.then(byIdentity => byIdentity.specs);
122
- * export const faultsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.faults).length;
123
- * export const probesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.probes).length;
124
- * export const actionsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.actions).length;
125
- * export const verticesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.vertices).length;
122
+ * export const faultsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.faults.length);
123
+ * export const probesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.probes.length);
124
+ * export const actionsCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.actions.length);
125
+ * export const verticesCount = byIdentity.then(byIdentity => byIdentity.specs?.[0]?.vertices.length);
126
126
  * ```
127
127
  */
128
128
  function getExperimentTemplateOutput(args, opts) {
@@ -58,11 +58,11 @@ import * as outputs from "../types/output";
58
58
  * const hasKubernetesSpec = tryOutput_(
59
59
  * () => byIdentity.then(byIdentity => byIdentity.spec[0].chaos[0].kubernetes),
60
60
  * () => []
61
- * ).length.apply(length => length > 0);
61
+ * ).apply(_try => Object.keys(_try).length).apply(length => length > 0);
62
62
  * const hasTargets = tryOutput_(
63
63
  * () => byIdentity.then(byIdentity => byIdentity.spec[0].target),
64
64
  * () => []
65
- * ).length.apply(length => length > 0);
65
+ * ).apply(_try => Object.keys(_try).length).apply(length => length > 0);
66
66
  * export const templateFeatures = {
67
67
  * hasKubernetesSpec: hasKubernetesSpec,
68
68
  * hasTargets: hasTargets,
@@ -263,11 +263,11 @@ export interface GetFaultTemplateResult {
263
263
  * const hasKubernetesSpec = tryOutput_(
264
264
  * () => byIdentity.then(byIdentity => byIdentity.spec[0].chaos[0].kubernetes),
265
265
  * () => []
266
- * ).length.apply(length => length > 0);
266
+ * ).apply(_try => Object.keys(_try).length).apply(length => length > 0);
267
267
  * const hasTargets = tryOutput_(
268
268
  * () => byIdentity.then(byIdentity => byIdentity.spec[0].target),
269
269
  * () => []
270
- * ).length.apply(length => length > 0);
270
+ * ).apply(_try => Object.keys(_try).length).apply(length => length > 0);
271
271
  * export const templateFeatures = {
272
272
  * hasKubernetesSpec: hasKubernetesSpec,
273
273
  * hasTargets: hasTargets,
@@ -86,11 +86,11 @@ const utilities = __importStar(require("../utilities"));
86
86
  * const hasKubernetesSpec = tryOutput_(
87
87
  * () => byIdentity.then(byIdentity => byIdentity.spec[0].chaos[0].kubernetes),
88
88
  * () => []
89
- * ).length.apply(length => length > 0);
89
+ * ).apply(_try => Object.keys(_try).length).apply(length => length > 0);
90
90
  * const hasTargets = tryOutput_(
91
91
  * () => byIdentity.then(byIdentity => byIdentity.spec[0].target),
92
92
  * () => []
93
- * ).length.apply(length => length > 0);
93
+ * ).apply(_try => Object.keys(_try).length).apply(length => length > 0);
94
94
  * export const templateFeatures = {
95
95
  * hasKubernetesSpec: hasKubernetesSpec,
96
96
  * hasTargets: hasTargets,
@@ -168,11 +168,11 @@ exports.getFaultTemplate = getFaultTemplate;
168
168
  * const hasKubernetesSpec = tryOutput_(
169
169
  * () => byIdentity.then(byIdentity => byIdentity.spec[0].chaos[0].kubernetes),
170
170
  * () => []
171
- * ).length.apply(length => length > 0);
171
+ * ).apply(_try => Object.keys(_try).length).apply(length => length > 0);
172
172
  * const hasTargets = tryOutput_(
173
173
  * () => byIdentity.then(byIdentity => byIdentity.spec[0].target),
174
174
  * () => []
175
- * ).length.apply(length => length > 0);
175
+ * ).apply(_try => Object.keys(_try).length).apply(length => length > 0);
176
176
  * export const templateFeatures = {
177
177
  * hasKubernetesSpec: hasKubernetesSpec,
178
178
  * hasTargets: hasTargets,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/harness",
3
- "version": "0.17.1",
3
+ "version": "0.17.2",
4
4
  "description": "A Pulumi package for creating and managing Harness resources.",
5
5
  "keywords": [
6
6
  "pulumi",
@@ -23,7 +23,7 @@
23
23
  "pulumi": {
24
24
  "resource": true,
25
25
  "name": "harness",
26
- "version": "0.17.1",
26
+ "version": "0.17.2",
27
27
  "server": "github://api.github.com/pulumi"
28
28
  }
29
29
  }
@@ -10,7 +10,7 @@ import * as outputs from "../types/output";
10
10
  * import * as pulumi from "@pulumi/pulumi";
11
11
  * import * as harness from "@pulumi/harness";
12
12
  *
13
- * // data source for gitops clusters mapped to a project level env
13
+ * // function for gitops clusters mapped to a project level env
14
14
  * const example = harness.platform.getEnvironmentClustersMapping({
15
15
  * clusters: [{
16
16
  * identifier: "incluster",
@@ -23,7 +23,7 @@ import * as outputs from "../types/output";
23
23
  * projectId: "projectIdentifier",
24
24
  * envId: "exampleEnvId",
25
25
  * });
26
- * // data source for two gitops clusters mapped to an account level env
26
+ * // function for two gitops clusters mapped to an account level env
27
27
  * const example2 = harness.platform.getEnvironmentClustersMapping({
28
28
  * clusters: [
29
29
  * {
@@ -112,7 +112,7 @@ export interface GetEnvironmentClustersMappingResult {
112
112
  * import * as pulumi from "@pulumi/pulumi";
113
113
  * import * as harness from "@pulumi/harness";
114
114
  *
115
- * // data source for gitops clusters mapped to a project level env
115
+ * // function for gitops clusters mapped to a project level env
116
116
  * const example = harness.platform.getEnvironmentClustersMapping({
117
117
  * clusters: [{
118
118
  * identifier: "incluster",
@@ -125,7 +125,7 @@ export interface GetEnvironmentClustersMappingResult {
125
125
  * projectId: "projectIdentifier",
126
126
  * envId: "exampleEnvId",
127
127
  * });
128
- * // data source for two gitops clusters mapped to an account level env
128
+ * // function for two gitops clusters mapped to an account level env
129
129
  * const example2 = harness.platform.getEnvironmentClustersMapping({
130
130
  * clusters: [
131
131
  * {
@@ -37,7 +37,7 @@ const utilities = __importStar(require("../utilities"));
37
37
  * import * as pulumi from "@pulumi/pulumi";
38
38
  * import * as harness from "@pulumi/harness";
39
39
  *
40
- * // data source for gitops clusters mapped to a project level env
40
+ * // function for gitops clusters mapped to a project level env
41
41
  * const example = harness.platform.getEnvironmentClustersMapping({
42
42
  * clusters: [{
43
43
  * identifier: "incluster",
@@ -50,7 +50,7 @@ const utilities = __importStar(require("../utilities"));
50
50
  * projectId: "projectIdentifier",
51
51
  * envId: "exampleEnvId",
52
52
  * });
53
- * // data source for two gitops clusters mapped to an account level env
53
+ * // function for two gitops clusters mapped to an account level env
54
54
  * const example2 = harness.platform.getEnvironmentClustersMapping({
55
55
  * clusters: [
56
56
  * {
@@ -91,7 +91,7 @@ exports.getEnvironmentClustersMapping = getEnvironmentClustersMapping;
91
91
  * import * as pulumi from "@pulumi/pulumi";
92
92
  * import * as harness from "@pulumi/harness";
93
93
  *
94
- * // data source for gitops clusters mapped to a project level env
94
+ * // function for gitops clusters mapped to a project level env
95
95
  * const example = harness.platform.getEnvironmentClustersMapping({
96
96
  * clusters: [{
97
97
  * identifier: "incluster",
@@ -104,7 +104,7 @@ exports.getEnvironmentClustersMapping = getEnvironmentClustersMapping;
104
104
  * projectId: "projectIdentifier",
105
105
  * envId: "exampleEnvId",
106
106
  * });
107
- * // data source for two gitops clusters mapped to an account level env
107
+ * // function for two gitops clusters mapped to an account level env
108
108
  * const example2 = harness.platform.getEnvironmentClustersMapping({
109
109
  * clusters: [
110
110
  * {
@@ -10,7 +10,7 @@ import * as outputs from "../types/output";
10
10
  * import * as harness from "@pulumi/harness";
11
11
  *
12
12
  * const all = harness.platform.getInfraProviders({});
13
- * export const providerCount = all.then(all => all.providers).length;
13
+ * export const providerCount = all.then(all => all.providers.length);
14
14
  * export const providerTypes = all.then(all => .map(p => (p.type)));
15
15
  * ```
16
16
  */
@@ -38,7 +38,7 @@ export interface GetInfraProvidersResult {
38
38
  * import * as harness from "@pulumi/harness";
39
39
  *
40
40
  * const all = harness.platform.getInfraProviders({});
41
- * export const providerCount = all.then(all => all.providers).length;
41
+ * export const providerCount = all.then(all => all.providers.length);
42
42
  * export const providerTypes = all.then(all => .map(p => (p.type)));
43
43
  * ```
44
44
  */
@@ -38,7 +38,7 @@ const utilities = __importStar(require("../utilities"));
38
38
  * import * as harness from "@pulumi/harness";
39
39
  *
40
40
  * const all = harness.platform.getInfraProviders({});
41
- * export const providerCount = all.then(all => all.providers).length;
41
+ * export const providerCount = all.then(all => all.providers.length);
42
42
  * export const providerTypes = all.then(all => .map(p => (p.type)));
43
43
  * ```
44
44
  */
@@ -57,7 +57,7 @@ exports.getInfraProviders = getInfraProviders;
57
57
  * import * as harness from "@pulumi/harness";
58
58
  *
59
59
  * const all = harness.platform.getInfraProviders({});
60
- * export const providerCount = all.then(all => all.providers).length;
60
+ * export const providerCount = all.then(all => all.providers.length);
61
61
  * export const providerTypes = all.then(all => .map(p => (p.type)));
62
62
  * ```
63
63
  */
@@ -25,7 +25,7 @@ import * as outputs from "../types/output";
25
25
  * projectId: "project_identifier",
26
26
  * });
27
27
  * export const winrmPort = example.then(example => example.port);
28
- * export const winrmAuthType = example.then(example => example.ntlms).length.apply(length => length > 0 ? "NTLM" : "Kerberos");
28
+ * export const winrmAuthType = example.then(example => example.ntlms.length).then(length => length > 0 ? "NTLM" : "Kerberos");
29
29
  * ```
30
30
  */
31
31
  export declare function getSecretWinrm(args: GetSecretWinrmArgs, opts?: pulumi.InvokeOptions): Promise<GetSecretWinrmResult>;
@@ -120,7 +120,7 @@ export interface GetSecretWinrmResult {
120
120
  * projectId: "project_identifier",
121
121
  * });
122
122
  * export const winrmPort = example.then(example => example.port);
123
- * export const winrmAuthType = example.then(example => example.ntlms).length.apply(length => length > 0 ? "NTLM" : "Kerberos");
123
+ * export const winrmAuthType = example.then(example => example.ntlms.length).then(length => length > 0 ? "NTLM" : "Kerberos");
124
124
  * ```
125
125
  */
126
126
  export declare function getSecretWinrmOutput(args: GetSecretWinrmOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetSecretWinrmResult>;
@@ -53,7 +53,7 @@ const utilities = __importStar(require("../utilities"));
53
53
  * projectId: "project_identifier",
54
54
  * });
55
55
  * export const winrmPort = example.then(example => example.port);
56
- * export const winrmAuthType = example.then(example => example.ntlms).length.apply(length => length > 0 ? "NTLM" : "Kerberos");
56
+ * export const winrmAuthType = example.then(example => example.ntlms.length).then(length => length > 0 ? "NTLM" : "Kerberos");
57
57
  * ```
58
58
  */
59
59
  function getSecretWinrm(args, opts) {
@@ -91,7 +91,7 @@ exports.getSecretWinrm = getSecretWinrm;
91
91
  * projectId: "project_identifier",
92
92
  * });
93
93
  * export const winrmPort = example.then(example => example.port);
94
- * export const winrmAuthType = example.then(example => example.ntlms).length.apply(length => length > 0 ? "NTLM" : "Kerberos");
94
+ * export const winrmAuthType = example.then(example => example.ntlms.length).then(length => length > 0 ? "NTLM" : "Kerberos");
95
95
  * ```
96
96
  */
97
97
  function getSecretWinrmOutput(args, opts) {
@@ -160,7 +160,7 @@ import * as outputs from "../types/output";
160
160
  * packageType: "RUBY",
161
161
  * parentRef: "accountId/orgId/projectId",
162
162
  * });
163
- * // Example of a Virtual Terraform Registry
163
+ * // Example of a Virtual Pulumi Registry
164
164
  * const terraformVirtual = new harness.platform.HarRegistry("terraform_virtual", {
165
165
  * configs: [{
166
166
  * type: "VIRTUAL",
@@ -288,7 +288,7 @@ import * as outputs from "../types/output";
288
288
  * packageType: "HUGGINGFACE",
289
289
  * parentRef: "accountId/orgId/projectId",
290
290
  * });
291
- * // Example of a Virtual Terraform Backend Registry
291
+ * // Example of a Virtual Pulumi Backend Registry
292
292
  * // TERRAFORM_BACKEND supports VIRTUAL registries only - upstream is not supported.
293
293
  * const terraformBackendVirtual = new harness.platform.HarRegistry("terraform_backend_virtual", {
294
294
  * configs: [{
@@ -187,7 +187,7 @@ const utilities = __importStar(require("../utilities"));
187
187
  * packageType: "RUBY",
188
188
  * parentRef: "accountId/orgId/projectId",
189
189
  * });
190
- * // Example of a Virtual Terraform Registry
190
+ * // Example of a Virtual Pulumi Registry
191
191
  * const terraformVirtual = new harness.platform.HarRegistry("terraform_virtual", {
192
192
  * configs: [{
193
193
  * type: "VIRTUAL",
@@ -315,7 +315,7 @@ const utilities = __importStar(require("../utilities"));
315
315
  * packageType: "HUGGINGFACE",
316
316
  * parentRef: "accountId/orgId/projectId",
317
317
  * });
318
- * // Example of a Virtual Terraform Backend Registry
318
+ * // Example of a Virtual Pulumi Backend Registry
319
319
  * // TERRAFORM_BACKEND supports VIRTUAL registries only - upstream is not supported.
320
320
  * const terraformBackendVirtual = new harness.platform.HarRegistry("terraform_backend_virtual", {
321
321
  * configs: [{