@pulumi/harness 0.15.4 → 0.15.5
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/platform/getInfraVariableSet.d.ts +119 -68
- package/platform/getInfraVariableSet.d.ts.map +1 -1
- package/platform/getInfraVariableSet.js +102 -26
- package/platform/getInfraVariableSet.js.map +1 -1
- package/types/input.d.ts +0 -128
- package/types/input.d.ts.map +1 -1
- package/types/output.d.ts +14 -14
- package/types/output.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulumi/harness",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.5",
|
|
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.15.
|
|
26
|
+
"version": "0.15.5",
|
|
27
27
|
"server": "github://api.github.com/pulumi"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1,26 +1,67 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
-
import * as inputs from "../types/input";
|
|
3
2
|
import * as outputs from "../types/output";
|
|
4
3
|
/**
|
|
5
4
|
* Data source for retrieving Variable Sets.
|
|
6
5
|
*
|
|
6
|
+
* The Variable Set is looked up with `identifier` at the scope implied by `orgId` and `projectId`:
|
|
7
|
+
* omit both for an account level Variable Set, set `orgId` for an org level Variable Set, and set both for a
|
|
8
|
+
* project level Variable Set.
|
|
9
|
+
*
|
|
10
|
+
* The exported `id` is the bare identifier, without a scope prefix. When referencing a Variable Set from a
|
|
11
|
+
* resource in a lower scope, such as `harness.platform.Workspace`, prefix the reference with `account.` for an
|
|
12
|
+
* account level Variable Set or `org.` for an org level Variable Set. An unprefixed reference is resolved against
|
|
13
|
+
* the consuming resource's own project.
|
|
14
|
+
*
|
|
7
15
|
* ## Example Usage
|
|
8
16
|
*
|
|
9
17
|
* ```typescript
|
|
10
18
|
* import * as pulumi from "@pulumi/pulumi";
|
|
11
19
|
* import * as harness from "@pulumi/harness";
|
|
12
20
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
21
|
+
* // Look up an account level Variable Set. Omit both org_id and project_id.
|
|
22
|
+
* const accountLevel = harness.platform.getInfraVariableSet({
|
|
23
|
+
* identifier: "account_variable_set",
|
|
15
24
|
* });
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
25
|
+
* // Look up an org level Variable Set. Set org_id only.
|
|
26
|
+
* const orgLevel = harness.platform.getInfraVariableSet({
|
|
27
|
+
* identifier: "org_variable_set",
|
|
28
|
+
* orgId: exampleHarnessPlatformOrganization.id,
|
|
19
29
|
* });
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
30
|
+
* // Look up a project level Variable Set. Set both org_id and project_id.
|
|
31
|
+
* const projectLevel = harness.platform.getInfraVariableSet({
|
|
32
|
+
* identifier: "project_variable_set",
|
|
33
|
+
* orgId: exampleHarnessPlatformOrganization.id,
|
|
34
|
+
* projectId: exampleHarnessPlatformProject.id,
|
|
35
|
+
* });
|
|
36
|
+
* // Consuming a Variable Set from a Workspace.
|
|
37
|
+
* //
|
|
38
|
+
* // The exported `id` is the bare identifier, with no scope prefix. Harness resolves an
|
|
39
|
+
* // unprefixed reference against the Workspace's own org and project, so a Variable Set
|
|
40
|
+
* // that lives above the Workspace must be referenced with a scope prefix:
|
|
41
|
+
* //
|
|
42
|
+
* // account level -> "account.${...id}"
|
|
43
|
+
* // org level -> "org.${...id}"
|
|
44
|
+
* // project level -> "${...id}" (no prefix, must be the same project as the Workspace)
|
|
45
|
+
* //
|
|
46
|
+
* // Referencing an account or org level Variable Set without the prefix fails with
|
|
47
|
+
* // "404 Not Found ... variable set not found", because the lookup is scoped to the project.
|
|
48
|
+
* const example = new harness.platform.Workspace("example", {
|
|
49
|
+
* identifier: "example",
|
|
50
|
+
* name: "example",
|
|
51
|
+
* orgId: exampleHarnessPlatformOrganization.id,
|
|
52
|
+
* projectId: exampleHarnessPlatformProject.id,
|
|
53
|
+
* provisionerType: "terraform",
|
|
54
|
+
* provisionerVersion: "1.5.7",
|
|
55
|
+
* repository: "https://github.com/org/repo",
|
|
56
|
+
* repositoryBranch: "main",
|
|
57
|
+
* repositoryPath: "tf/aws/basic",
|
|
58
|
+
* repositoryConnector: exampleHarnessPlatformConnectorGithub.id,
|
|
59
|
+
* providerConnector: exampleHarnessPlatformConnectorAws.id,
|
|
60
|
+
* variableSets: [
|
|
61
|
+
* accountLevel.then(accountLevel => `account.${accountLevel.id}`),
|
|
62
|
+
* orgLevel.then(orgLevel => `org.${orgLevel.id}`),
|
|
63
|
+
* projectLevel.then(projectLevel => projectLevel.id),
|
|
64
|
+
* ],
|
|
24
65
|
* });
|
|
25
66
|
* ```
|
|
26
67
|
*/
|
|
@@ -30,48 +71,32 @@ export declare function getInfraVariableSet(args: GetInfraVariableSetArgs, opts?
|
|
|
30
71
|
*/
|
|
31
72
|
export interface GetInfraVariableSetArgs {
|
|
32
73
|
/**
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
connectors?: inputs.platform.GetInfraVariableSetConnector[];
|
|
36
|
-
/**
|
|
37
|
-
* Environment variables configured on the Variable Set
|
|
38
|
-
*/
|
|
39
|
-
environmentVariables?: inputs.platform.GetInfraVariableSetEnvironmentVariable[];
|
|
40
|
-
/**
|
|
41
|
-
* Unique identifier of the resource.
|
|
74
|
+
* Identifier of the Variable Set. Do not include a scope prefix here; use org*id and project*id to select the scope.
|
|
42
75
|
*/
|
|
43
76
|
identifier: string;
|
|
44
77
|
/**
|
|
45
|
-
* Name of the
|
|
78
|
+
* Name of the Variable Set. This is an output; a value set here is ignored by the lookup.
|
|
46
79
|
*/
|
|
47
80
|
name?: string;
|
|
48
81
|
/**
|
|
49
|
-
*
|
|
82
|
+
* Organization identifier of the organization the Variable Set resides in. Leave empty to look up an account level Variable Set.
|
|
50
83
|
*/
|
|
51
84
|
orgId?: string;
|
|
52
85
|
/**
|
|
53
|
-
*
|
|
86
|
+
* Project identifier of the project the Variable Set resides in. Leave empty to look up an account or org level Variable Set.
|
|
54
87
|
*/
|
|
55
88
|
projectId?: string;
|
|
56
|
-
/**
|
|
57
|
-
* Terraform variables files configured on the Variable Set (see below for nested schema)
|
|
58
|
-
*/
|
|
59
|
-
terraformVariableFiles?: inputs.platform.GetInfraVariableSetTerraformVariableFile[];
|
|
60
|
-
/**
|
|
61
|
-
* Terraform variables configured on the Variable Set. Terraform variable keys must be unique within the Variable Set. (see below for nested schema)
|
|
62
|
-
*/
|
|
63
|
-
terraformVariables?: inputs.platform.GetInfraVariableSetTerraformVariable[];
|
|
64
89
|
}
|
|
65
90
|
/**
|
|
66
91
|
* A collection of values returned by getInfraVariableSet.
|
|
67
92
|
*/
|
|
68
93
|
export interface GetInfraVariableSetResult {
|
|
69
94
|
/**
|
|
70
|
-
* Provider connectors configured on the Variable Set.
|
|
95
|
+
* Provider connectors configured on the Variable Set.
|
|
71
96
|
*/
|
|
72
97
|
readonly connectors: outputs.platform.GetInfraVariableSetConnector[];
|
|
73
98
|
/**
|
|
74
|
-
* Description of the
|
|
99
|
+
* Description of the Variable Set.
|
|
75
100
|
*/
|
|
76
101
|
readonly description: string;
|
|
77
102
|
/**
|
|
@@ -83,23 +108,23 @@ export interface GetInfraVariableSetResult {
|
|
|
83
108
|
*/
|
|
84
109
|
readonly id: string;
|
|
85
110
|
/**
|
|
86
|
-
*
|
|
111
|
+
* Identifier of the Variable Set. Do not include a scope prefix here; use org*id and project*id to select the scope.
|
|
87
112
|
*/
|
|
88
113
|
readonly identifier: string;
|
|
89
114
|
/**
|
|
90
|
-
* Name of the
|
|
115
|
+
* Name of the Variable Set. This is an output; a value set here is ignored by the lookup.
|
|
91
116
|
*/
|
|
92
|
-
readonly name
|
|
117
|
+
readonly name: string;
|
|
93
118
|
/**
|
|
94
|
-
*
|
|
119
|
+
* Organization identifier of the organization the Variable Set resides in. Leave empty to look up an account level Variable Set.
|
|
95
120
|
*/
|
|
96
121
|
readonly orgId?: string;
|
|
97
122
|
/**
|
|
98
|
-
*
|
|
123
|
+
* Project identifier of the project the Variable Set resides in. Leave empty to look up an account or org level Variable Set.
|
|
99
124
|
*/
|
|
100
125
|
readonly projectId?: string;
|
|
101
126
|
/**
|
|
102
|
-
* Tags
|
|
127
|
+
* Tags are not supported on Variable Sets. This attribute is always empty.
|
|
103
128
|
*/
|
|
104
129
|
readonly tags: string[];
|
|
105
130
|
/**
|
|
@@ -107,30 +132,72 @@ export interface GetInfraVariableSetResult {
|
|
|
107
132
|
*/
|
|
108
133
|
readonly terraformVariableFiles: outputs.platform.GetInfraVariableSetTerraformVariableFile[];
|
|
109
134
|
/**
|
|
110
|
-
* Terraform variables configured on the Variable Set.
|
|
135
|
+
* Terraform variables configured on the Variable Set. (see below for nested schema)
|
|
111
136
|
*/
|
|
112
137
|
readonly terraformVariables: outputs.platform.GetInfraVariableSetTerraformVariable[];
|
|
113
138
|
}
|
|
114
139
|
/**
|
|
115
140
|
* Data source for retrieving Variable Sets.
|
|
116
141
|
*
|
|
142
|
+
* The Variable Set is looked up with `identifier` at the scope implied by `orgId` and `projectId`:
|
|
143
|
+
* omit both for an account level Variable Set, set `orgId` for an org level Variable Set, and set both for a
|
|
144
|
+
* project level Variable Set.
|
|
145
|
+
*
|
|
146
|
+
* The exported `id` is the bare identifier, without a scope prefix. When referencing a Variable Set from a
|
|
147
|
+
* resource in a lower scope, such as `harness.platform.Workspace`, prefix the reference with `account.` for an
|
|
148
|
+
* account level Variable Set or `org.` for an org level Variable Set. An unprefixed reference is resolved against
|
|
149
|
+
* the consuming resource's own project.
|
|
150
|
+
*
|
|
117
151
|
* ## Example Usage
|
|
118
152
|
*
|
|
119
153
|
* ```typescript
|
|
120
154
|
* import * as pulumi from "@pulumi/pulumi";
|
|
121
155
|
* import * as harness from "@pulumi/harness";
|
|
122
156
|
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
157
|
+
* // Look up an account level Variable Set. Omit both org_id and project_id.
|
|
158
|
+
* const accountLevel = harness.platform.getInfraVariableSet({
|
|
159
|
+
* identifier: "account_variable_set",
|
|
125
160
|
* });
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
161
|
+
* // Look up an org level Variable Set. Set org_id only.
|
|
162
|
+
* const orgLevel = harness.platform.getInfraVariableSet({
|
|
163
|
+
* identifier: "org_variable_set",
|
|
164
|
+
* orgId: exampleHarnessPlatformOrganization.id,
|
|
129
165
|
* });
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
166
|
+
* // Look up a project level Variable Set. Set both org_id and project_id.
|
|
167
|
+
* const projectLevel = harness.platform.getInfraVariableSet({
|
|
168
|
+
* identifier: "project_variable_set",
|
|
169
|
+
* orgId: exampleHarnessPlatformOrganization.id,
|
|
170
|
+
* projectId: exampleHarnessPlatformProject.id,
|
|
171
|
+
* });
|
|
172
|
+
* // Consuming a Variable Set from a Workspace.
|
|
173
|
+
* //
|
|
174
|
+
* // The exported `id` is the bare identifier, with no scope prefix. Harness resolves an
|
|
175
|
+
* // unprefixed reference against the Workspace's own org and project, so a Variable Set
|
|
176
|
+
* // that lives above the Workspace must be referenced with a scope prefix:
|
|
177
|
+
* //
|
|
178
|
+
* // account level -> "account.${...id}"
|
|
179
|
+
* // org level -> "org.${...id}"
|
|
180
|
+
* // project level -> "${...id}" (no prefix, must be the same project as the Workspace)
|
|
181
|
+
* //
|
|
182
|
+
* // Referencing an account or org level Variable Set without the prefix fails with
|
|
183
|
+
* // "404 Not Found ... variable set not found", because the lookup is scoped to the project.
|
|
184
|
+
* const example = new harness.platform.Workspace("example", {
|
|
185
|
+
* identifier: "example",
|
|
186
|
+
* name: "example",
|
|
187
|
+
* orgId: exampleHarnessPlatformOrganization.id,
|
|
188
|
+
* projectId: exampleHarnessPlatformProject.id,
|
|
189
|
+
* provisionerType: "terraform",
|
|
190
|
+
* provisionerVersion: "1.5.7",
|
|
191
|
+
* repository: "https://github.com/org/repo",
|
|
192
|
+
* repositoryBranch: "main",
|
|
193
|
+
* repositoryPath: "tf/aws/basic",
|
|
194
|
+
* repositoryConnector: exampleHarnessPlatformConnectorGithub.id,
|
|
195
|
+
* providerConnector: exampleHarnessPlatformConnectorAws.id,
|
|
196
|
+
* variableSets: [
|
|
197
|
+
* accountLevel.then(accountLevel => `account.${accountLevel.id}`),
|
|
198
|
+
* orgLevel.then(orgLevel => `org.${orgLevel.id}`),
|
|
199
|
+
* projectLevel.then(projectLevel => projectLevel.id),
|
|
200
|
+
* ],
|
|
134
201
|
* });
|
|
135
202
|
* ```
|
|
136
203
|
*/
|
|
@@ -140,36 +207,20 @@ export declare function getInfraVariableSetOutput(args: GetInfraVariableSetOutpu
|
|
|
140
207
|
*/
|
|
141
208
|
export interface GetInfraVariableSetOutputArgs {
|
|
142
209
|
/**
|
|
143
|
-
*
|
|
144
|
-
*/
|
|
145
|
-
connectors?: pulumi.Input<pulumi.Input<inputs.platform.GetInfraVariableSetConnectorArgs>[] | undefined>;
|
|
146
|
-
/**
|
|
147
|
-
* Environment variables configured on the Variable Set
|
|
148
|
-
*/
|
|
149
|
-
environmentVariables?: pulumi.Input<pulumi.Input<inputs.platform.GetInfraVariableSetEnvironmentVariableArgs>[] | undefined>;
|
|
150
|
-
/**
|
|
151
|
-
* Unique identifier of the resource.
|
|
210
|
+
* Identifier of the Variable Set. Do not include a scope prefix here; use org*id and project*id to select the scope.
|
|
152
211
|
*/
|
|
153
212
|
identifier: pulumi.Input<string>;
|
|
154
213
|
/**
|
|
155
|
-
* Name of the
|
|
214
|
+
* Name of the Variable Set. This is an output; a value set here is ignored by the lookup.
|
|
156
215
|
*/
|
|
157
216
|
name?: pulumi.Input<string | undefined>;
|
|
158
217
|
/**
|
|
159
|
-
*
|
|
218
|
+
* Organization identifier of the organization the Variable Set resides in. Leave empty to look up an account level Variable Set.
|
|
160
219
|
*/
|
|
161
220
|
orgId?: pulumi.Input<string | undefined>;
|
|
162
221
|
/**
|
|
163
|
-
*
|
|
222
|
+
* Project identifier of the project the Variable Set resides in. Leave empty to look up an account or org level Variable Set.
|
|
164
223
|
*/
|
|
165
224
|
projectId?: pulumi.Input<string | undefined>;
|
|
166
|
-
/**
|
|
167
|
-
* Terraform variables files configured on the Variable Set (see below for nested schema)
|
|
168
|
-
*/
|
|
169
|
-
terraformVariableFiles?: pulumi.Input<pulumi.Input<inputs.platform.GetInfraVariableSetTerraformVariableFileArgs>[] | undefined>;
|
|
170
|
-
/**
|
|
171
|
-
* Terraform variables configured on the Variable Set. Terraform variable keys must be unique within the Variable Set. (see below for nested schema)
|
|
172
|
-
*/
|
|
173
|
-
terraformVariables?: pulumi.Input<pulumi.Input<inputs.platform.GetInfraVariableSetTerraformVariableArgs>[] | undefined>;
|
|
174
225
|
}
|
|
175
226
|
//# sourceMappingURL=getInfraVariableSet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInfraVariableSet.d.ts","sourceRoot":"","sources":["../../platform/getInfraVariableSet.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"getInfraVariableSet.d.ts","sourceRoot":"","sources":["../../platform/getInfraVariableSet.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAEzC,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAG3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,uBAAuB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,aAAa,GAAG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,EAAE,MAAM,CAAC,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAQ1J;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC1C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAChD"}
|
|
@@ -31,74 +31,150 @@ const utilities = __importStar(require("../utilities"));
|
|
|
31
31
|
/**
|
|
32
32
|
* Data source for retrieving Variable Sets.
|
|
33
33
|
*
|
|
34
|
+
* The Variable Set is looked up with `identifier` at the scope implied by `orgId` and `projectId`:
|
|
35
|
+
* omit both for an account level Variable Set, set `orgId` for an org level Variable Set, and set both for a
|
|
36
|
+
* project level Variable Set.
|
|
37
|
+
*
|
|
38
|
+
* The exported `id` is the bare identifier, without a scope prefix. When referencing a Variable Set from a
|
|
39
|
+
* resource in a lower scope, such as `harness.platform.Workspace`, prefix the reference with `account.` for an
|
|
40
|
+
* account level Variable Set or `org.` for an org level Variable Set. An unprefixed reference is resolved against
|
|
41
|
+
* the consuming resource's own project.
|
|
42
|
+
*
|
|
34
43
|
* ## Example Usage
|
|
35
44
|
*
|
|
36
45
|
* ```typescript
|
|
37
46
|
* import * as pulumi from "@pulumi/pulumi";
|
|
38
47
|
* import * as harness from "@pulumi/harness";
|
|
39
48
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
49
|
+
* // Look up an account level Variable Set. Omit both org_id and project_id.
|
|
50
|
+
* const accountLevel = harness.platform.getInfraVariableSet({
|
|
51
|
+
* identifier: "account_variable_set",
|
|
52
|
+
* });
|
|
53
|
+
* // Look up an org level Variable Set. Set org_id only.
|
|
54
|
+
* const orgLevel = harness.platform.getInfraVariableSet({
|
|
55
|
+
* identifier: "org_variable_set",
|
|
56
|
+
* orgId: exampleHarnessPlatformOrganization.id,
|
|
42
57
|
* });
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
58
|
+
* // Look up a project level Variable Set. Set both org_id and project_id.
|
|
59
|
+
* const projectLevel = harness.platform.getInfraVariableSet({
|
|
60
|
+
* identifier: "project_variable_set",
|
|
61
|
+
* orgId: exampleHarnessPlatformOrganization.id,
|
|
62
|
+
* projectId: exampleHarnessPlatformProject.id,
|
|
46
63
|
* });
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
64
|
+
* // Consuming a Variable Set from a Workspace.
|
|
65
|
+
* //
|
|
66
|
+
* // The exported `id` is the bare identifier, with no scope prefix. Harness resolves an
|
|
67
|
+
* // unprefixed reference against the Workspace's own org and project, so a Variable Set
|
|
68
|
+
* // that lives above the Workspace must be referenced with a scope prefix:
|
|
69
|
+
* //
|
|
70
|
+
* // account level -> "account.${...id}"
|
|
71
|
+
* // org level -> "org.${...id}"
|
|
72
|
+
* // project level -> "${...id}" (no prefix, must be the same project as the Workspace)
|
|
73
|
+
* //
|
|
74
|
+
* // Referencing an account or org level Variable Set without the prefix fails with
|
|
75
|
+
* // "404 Not Found ... variable set not found", because the lookup is scoped to the project.
|
|
76
|
+
* const example = new harness.platform.Workspace("example", {
|
|
77
|
+
* identifier: "example",
|
|
78
|
+
* name: "example",
|
|
79
|
+
* orgId: exampleHarnessPlatformOrganization.id,
|
|
80
|
+
* projectId: exampleHarnessPlatformProject.id,
|
|
81
|
+
* provisionerType: "terraform",
|
|
82
|
+
* provisionerVersion: "1.5.7",
|
|
83
|
+
* repository: "https://github.com/org/repo",
|
|
84
|
+
* repositoryBranch: "main",
|
|
85
|
+
* repositoryPath: "tf/aws/basic",
|
|
86
|
+
* repositoryConnector: exampleHarnessPlatformConnectorGithub.id,
|
|
87
|
+
* providerConnector: exampleHarnessPlatformConnectorAws.id,
|
|
88
|
+
* variableSets: [
|
|
89
|
+
* accountLevel.then(accountLevel => `account.${accountLevel.id}`),
|
|
90
|
+
* orgLevel.then(orgLevel => `org.${orgLevel.id}`),
|
|
91
|
+
* projectLevel.then(projectLevel => projectLevel.id),
|
|
92
|
+
* ],
|
|
51
93
|
* });
|
|
52
94
|
* ```
|
|
53
95
|
*/
|
|
54
96
|
function getInfraVariableSet(args, opts) {
|
|
55
97
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
56
98
|
return pulumi.runtime.invoke("harness:platform/getInfraVariableSet:getInfraVariableSet", {
|
|
57
|
-
"connectors": args.connectors,
|
|
58
|
-
"environmentVariables": args.environmentVariables,
|
|
59
99
|
"identifier": args.identifier,
|
|
60
100
|
"name": args.name,
|
|
61
101
|
"orgId": args.orgId,
|
|
62
102
|
"projectId": args.projectId,
|
|
63
|
-
"terraformVariableFiles": args.terraformVariableFiles,
|
|
64
|
-
"terraformVariables": args.terraformVariables,
|
|
65
103
|
}, opts);
|
|
66
104
|
}
|
|
67
105
|
exports.getInfraVariableSet = getInfraVariableSet;
|
|
68
106
|
/**
|
|
69
107
|
* Data source for retrieving Variable Sets.
|
|
70
108
|
*
|
|
109
|
+
* The Variable Set is looked up with `identifier` at the scope implied by `orgId` and `projectId`:
|
|
110
|
+
* omit both for an account level Variable Set, set `orgId` for an org level Variable Set, and set both for a
|
|
111
|
+
* project level Variable Set.
|
|
112
|
+
*
|
|
113
|
+
* The exported `id` is the bare identifier, without a scope prefix. When referencing a Variable Set from a
|
|
114
|
+
* resource in a lower scope, such as `harness.platform.Workspace`, prefix the reference with `account.` for an
|
|
115
|
+
* account level Variable Set or `org.` for an org level Variable Set. An unprefixed reference is resolved against
|
|
116
|
+
* the consuming resource's own project.
|
|
117
|
+
*
|
|
71
118
|
* ## Example Usage
|
|
72
119
|
*
|
|
73
120
|
* ```typescript
|
|
74
121
|
* import * as pulumi from "@pulumi/pulumi";
|
|
75
122
|
* import * as harness from "@pulumi/harness";
|
|
76
123
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
124
|
+
* // Look up an account level Variable Set. Omit both org_id and project_id.
|
|
125
|
+
* const accountLevel = harness.platform.getInfraVariableSet({
|
|
126
|
+
* identifier: "account_variable_set",
|
|
127
|
+
* });
|
|
128
|
+
* // Look up an org level Variable Set. Set org_id only.
|
|
129
|
+
* const orgLevel = harness.platform.getInfraVariableSet({
|
|
130
|
+
* identifier: "org_variable_set",
|
|
131
|
+
* orgId: exampleHarnessPlatformOrganization.id,
|
|
79
132
|
* });
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
133
|
+
* // Look up a project level Variable Set. Set both org_id and project_id.
|
|
134
|
+
* const projectLevel = harness.platform.getInfraVariableSet({
|
|
135
|
+
* identifier: "project_variable_set",
|
|
136
|
+
* orgId: exampleHarnessPlatformOrganization.id,
|
|
137
|
+
* projectId: exampleHarnessPlatformProject.id,
|
|
83
138
|
* });
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
139
|
+
* // Consuming a Variable Set from a Workspace.
|
|
140
|
+
* //
|
|
141
|
+
* // The exported `id` is the bare identifier, with no scope prefix. Harness resolves an
|
|
142
|
+
* // unprefixed reference against the Workspace's own org and project, so a Variable Set
|
|
143
|
+
* // that lives above the Workspace must be referenced with a scope prefix:
|
|
144
|
+
* //
|
|
145
|
+
* // account level -> "account.${...id}"
|
|
146
|
+
* // org level -> "org.${...id}"
|
|
147
|
+
* // project level -> "${...id}" (no prefix, must be the same project as the Workspace)
|
|
148
|
+
* //
|
|
149
|
+
* // Referencing an account or org level Variable Set without the prefix fails with
|
|
150
|
+
* // "404 Not Found ... variable set not found", because the lookup is scoped to the project.
|
|
151
|
+
* const example = new harness.platform.Workspace("example", {
|
|
152
|
+
* identifier: "example",
|
|
153
|
+
* name: "example",
|
|
154
|
+
* orgId: exampleHarnessPlatformOrganization.id,
|
|
155
|
+
* projectId: exampleHarnessPlatformProject.id,
|
|
156
|
+
* provisionerType: "terraform",
|
|
157
|
+
* provisionerVersion: "1.5.7",
|
|
158
|
+
* repository: "https://github.com/org/repo",
|
|
159
|
+
* repositoryBranch: "main",
|
|
160
|
+
* repositoryPath: "tf/aws/basic",
|
|
161
|
+
* repositoryConnector: exampleHarnessPlatformConnectorGithub.id,
|
|
162
|
+
* providerConnector: exampleHarnessPlatformConnectorAws.id,
|
|
163
|
+
* variableSets: [
|
|
164
|
+
* accountLevel.then(accountLevel => `account.${accountLevel.id}`),
|
|
165
|
+
* orgLevel.then(orgLevel => `org.${orgLevel.id}`),
|
|
166
|
+
* projectLevel.then(projectLevel => projectLevel.id),
|
|
167
|
+
* ],
|
|
88
168
|
* });
|
|
89
169
|
* ```
|
|
90
170
|
*/
|
|
91
171
|
function getInfraVariableSetOutput(args, opts) {
|
|
92
172
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
93
173
|
return pulumi.runtime.invokeOutput("harness:platform/getInfraVariableSet:getInfraVariableSet", {
|
|
94
|
-
"connectors": args.connectors,
|
|
95
|
-
"environmentVariables": args.environmentVariables,
|
|
96
174
|
"identifier": args.identifier,
|
|
97
175
|
"name": args.name,
|
|
98
176
|
"orgId": args.orgId,
|
|
99
177
|
"projectId": args.projectId,
|
|
100
|
-
"terraformVariableFiles": args.terraformVariableFiles,
|
|
101
|
-
"terraformVariables": args.terraformVariables,
|
|
102
178
|
}, opts);
|
|
103
179
|
}
|
|
104
180
|
exports.getInfraVariableSetOutput = getInfraVariableSetOutput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInfraVariableSet.js","sourceRoot":"","sources":["../../platform/getInfraVariableSet.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEj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types/input.d.ts
CHANGED
|
@@ -8534,134 +8534,6 @@ export declare namespace platform {
|
|
|
8534
8534
|
*/
|
|
8535
8535
|
releasePipeline?: pulumi.Input<string | undefined>;
|
|
8536
8536
|
}
|
|
8537
|
-
interface GetInfraVariableSetConnector {
|
|
8538
|
-
/**
|
|
8539
|
-
* Connector Ref is the reference to the connector
|
|
8540
|
-
*/
|
|
8541
|
-
connectorRef: string;
|
|
8542
|
-
/**
|
|
8543
|
-
* Type is the connector type of the connector. Supported types: aws, azure, gcp
|
|
8544
|
-
*/
|
|
8545
|
-
type: string;
|
|
8546
|
-
}
|
|
8547
|
-
interface GetInfraVariableSetConnectorArgs {
|
|
8548
|
-
/**
|
|
8549
|
-
* Connector Ref is the reference to the connector
|
|
8550
|
-
*/
|
|
8551
|
-
connectorRef: pulumi.Input<string>;
|
|
8552
|
-
/**
|
|
8553
|
-
* Type is the connector type of the connector. Supported types: aws, azure, gcp
|
|
8554
|
-
*/
|
|
8555
|
-
type: pulumi.Input<string>;
|
|
8556
|
-
}
|
|
8557
|
-
interface GetInfraVariableSetEnvironmentVariable {
|
|
8558
|
-
/**
|
|
8559
|
-
* Key is the identifier for the variable. Must be unique within the Variable Set.
|
|
8560
|
-
*/
|
|
8561
|
-
key: string;
|
|
8562
|
-
/**
|
|
8563
|
-
* Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
|
|
8564
|
-
*/
|
|
8565
|
-
value: string;
|
|
8566
|
-
/**
|
|
8567
|
-
* Value type indicates the value type of the variable. Currently we support string and secret.
|
|
8568
|
-
*/
|
|
8569
|
-
valueType: string;
|
|
8570
|
-
}
|
|
8571
|
-
interface GetInfraVariableSetEnvironmentVariableArgs {
|
|
8572
|
-
/**
|
|
8573
|
-
* Key is the identifier for the variable. Must be unique within the Variable Set.
|
|
8574
|
-
*/
|
|
8575
|
-
key: pulumi.Input<string>;
|
|
8576
|
-
/**
|
|
8577
|
-
* Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
|
|
8578
|
-
*/
|
|
8579
|
-
value: pulumi.Input<string>;
|
|
8580
|
-
/**
|
|
8581
|
-
* Value type indicates the value type of the variable. Currently we support string and secret.
|
|
8582
|
-
*/
|
|
8583
|
-
valueType: pulumi.Input<string>;
|
|
8584
|
-
}
|
|
8585
|
-
interface GetInfraVariableSetTerraformVariable {
|
|
8586
|
-
/**
|
|
8587
|
-
* Key is the identifier for the variable. Must be unique within the Variable Set.
|
|
8588
|
-
*/
|
|
8589
|
-
key: string;
|
|
8590
|
-
/**
|
|
8591
|
-
* Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
|
|
8592
|
-
*/
|
|
8593
|
-
value: string;
|
|
8594
|
-
/**
|
|
8595
|
-
* Value type indicates the value type of the variable. Currently we support string and secret.
|
|
8596
|
-
*/
|
|
8597
|
-
valueType: string;
|
|
8598
|
-
}
|
|
8599
|
-
interface GetInfraVariableSetTerraformVariableArgs {
|
|
8600
|
-
/**
|
|
8601
|
-
* Key is the identifier for the variable. Must be unique within the Variable Set.
|
|
8602
|
-
*/
|
|
8603
|
-
key: pulumi.Input<string>;
|
|
8604
|
-
/**
|
|
8605
|
-
* Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
|
|
8606
|
-
*/
|
|
8607
|
-
value: pulumi.Input<string>;
|
|
8608
|
-
/**
|
|
8609
|
-
* Value type indicates the value type of the variable. Currently we support string and secret.
|
|
8610
|
-
*/
|
|
8611
|
-
valueType: pulumi.Input<string>;
|
|
8612
|
-
}
|
|
8613
|
-
interface GetInfraVariableSetTerraformVariableFile {
|
|
8614
|
-
/**
|
|
8615
|
-
* Repository is the name of the repository to fetch the code from.
|
|
8616
|
-
*/
|
|
8617
|
-
repository: string;
|
|
8618
|
-
/**
|
|
8619
|
-
* Repository branch is the name of the branch to fetch the variables from. This cannot be set if repository commit or sha is set
|
|
8620
|
-
*/
|
|
8621
|
-
repositoryBranch?: string;
|
|
8622
|
-
/**
|
|
8623
|
-
* Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
|
|
8624
|
-
*/
|
|
8625
|
-
repositoryCommit?: string;
|
|
8626
|
-
/**
|
|
8627
|
-
* Repository connector is the reference to the connector used to fetch the variables.
|
|
8628
|
-
*/
|
|
8629
|
-
repositoryConnector: string;
|
|
8630
|
-
/**
|
|
8631
|
-
* Repository path is the path in which the variables reside.
|
|
8632
|
-
*/
|
|
8633
|
-
repositoryPath?: string;
|
|
8634
|
-
/**
|
|
8635
|
-
* Repository commit is SHA to fetch the variables from. This cannot be set if repository branch or commit is set.
|
|
8636
|
-
*/
|
|
8637
|
-
repositorySha?: string;
|
|
8638
|
-
}
|
|
8639
|
-
interface GetInfraVariableSetTerraformVariableFileArgs {
|
|
8640
|
-
/**
|
|
8641
|
-
* Repository is the name of the repository to fetch the code from.
|
|
8642
|
-
*/
|
|
8643
|
-
repository: pulumi.Input<string>;
|
|
8644
|
-
/**
|
|
8645
|
-
* Repository branch is the name of the branch to fetch the variables from. This cannot be set if repository commit or sha is set
|
|
8646
|
-
*/
|
|
8647
|
-
repositoryBranch?: pulumi.Input<string | undefined>;
|
|
8648
|
-
/**
|
|
8649
|
-
* Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
|
|
8650
|
-
*/
|
|
8651
|
-
repositoryCommit?: pulumi.Input<string | undefined>;
|
|
8652
|
-
/**
|
|
8653
|
-
* Repository connector is the reference to the connector used to fetch the variables.
|
|
8654
|
-
*/
|
|
8655
|
-
repositoryConnector: pulumi.Input<string>;
|
|
8656
|
-
/**
|
|
8657
|
-
* Repository path is the path in which the variables reside.
|
|
8658
|
-
*/
|
|
8659
|
-
repositoryPath?: pulumi.Input<string | undefined>;
|
|
8660
|
-
/**
|
|
8661
|
-
* Repository commit is SHA to fetch the variables from. This cannot be set if repository branch or commit is set.
|
|
8662
|
-
*/
|
|
8663
|
-
repositorySha?: pulumi.Input<string | undefined>;
|
|
8664
|
-
}
|
|
8665
8537
|
interface GetInfrastructureGitDetails {
|
|
8666
8538
|
/**
|
|
8667
8539
|
* Name of the branch.
|