@pulumi/gitlab 10.2.0-alpha.1787648737 → 10.2.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.
Files changed (73) hide show
  1. package/applicationSettings.d.ts +24 -0
  2. package/applicationSettings.d.ts.map +1 -1
  3. package/applicationSettings.js +4 -0
  4. package/applicationSettings.js.map +1 -1
  5. package/complianceRequirement.d.ts +201 -0
  6. package/complianceRequirement.d.ts.map +1 -0
  7. package/complianceRequirement.js +181 -0
  8. package/complianceRequirement.js.map +1 -0
  9. package/getGroup.d.ts +4 -0
  10. package/getGroup.d.ts.map +1 -1
  11. package/getGroup.js.map +1 -1
  12. package/getGroupServiceAccount.d.ts +4 -0
  13. package/getGroupServiceAccount.d.ts.map +1 -1
  14. package/getGroupServiceAccount.js.map +1 -1
  15. package/getProject.d.ts +8 -0
  16. package/getProject.d.ts.map +1 -1
  17. package/getProject.js.map +1 -1
  18. package/getProjectServiceAccount.d.ts +4 -0
  19. package/getProjectServiceAccount.d.ts.map +1 -1
  20. package/getProjectServiceAccount.js.map +1 -1
  21. package/group.d.ts +12 -0
  22. package/group.d.ts.map +1 -1
  23. package/group.js +2 -0
  24. package/group.js.map +1 -1
  25. package/groupDependencyProxyImageTtlPolicy.d.ts +105 -0
  26. package/groupDependencyProxyImageTtlPolicy.d.ts.map +1 -0
  27. package/groupDependencyProxyImageTtlPolicy.js +111 -0
  28. package/groupDependencyProxyImageTtlPolicy.js.map +1 -0
  29. package/groupIntegrationJira.d.ts +297 -0
  30. package/groupIntegrationJira.d.ts.map +1 -0
  31. package/groupIntegrationJira.js +157 -0
  32. package/groupIntegrationJira.js.map +1 -0
  33. package/groupServiceAccount.d.ts +4 -4
  34. package/groupServiceAccount.d.ts.map +1 -1
  35. package/groupServiceAccountAccessToken.d.ts +13 -0
  36. package/groupServiceAccountAccessToken.d.ts.map +1 -1
  37. package/groupServiceAccountAccessToken.js +3 -0
  38. package/groupServiceAccountAccessToken.js.map +1 -1
  39. package/index.d.ts +21 -0
  40. package/index.d.ts.map +1 -1
  41. package/index.js +41 -6
  42. package/index.js.map +1 -1
  43. package/package.json +2 -2
  44. package/project.d.ts +30 -0
  45. package/project.d.ts.map +1 -1
  46. package/project.js +4 -0
  47. package/project.js.map +1 -1
  48. package/projectFeatureFlag.d.ts +175 -0
  49. package/projectFeatureFlag.d.ts.map +1 -0
  50. package/projectFeatureFlag.js +153 -0
  51. package/projectFeatureFlag.js.map +1 -0
  52. package/projectFeatureFlagUserList.d.ts +145 -0
  53. package/projectFeatureFlagUserList.d.ts.map +1 -0
  54. package/projectFeatureFlagUserList.js +127 -0
  55. package/projectFeatureFlagUserList.js.map +1 -0
  56. package/projectSecuritySettings.d.ts +143 -0
  57. package/projectSecuritySettings.d.ts.map +1 -0
  58. package/projectSecuritySettings.js +126 -0
  59. package/projectSecuritySettings.js.map +1 -0
  60. package/projectServiceAccount.d.ts +4 -4
  61. package/projectServiceAccount.d.ts.map +1 -1
  62. package/projectServiceAccountAccessToken.d.ts +230 -0
  63. package/projectServiceAccountAccessToken.d.ts.map +1 -0
  64. package/projectServiceAccountAccessToken.js +178 -0
  65. package/projectServiceAccountAccessToken.js.map +1 -0
  66. package/types/input.d.ts +113 -0
  67. package/types/input.d.ts.map +1 -1
  68. package/types/output.d.ts +126 -0
  69. package/types/output.d.ts.map +1 -1
  70. package/user.d.ts +13 -0
  71. package/user.d.ts.map +1 -1
  72. package/user.js +3 -0
  73. package/user.js.map +1 -1
@@ -0,0 +1,230 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "./types/input";
3
+ import * as outputs from "./types/output";
4
+ /**
5
+ * The `gitlab.ProjectServiceAccountAccessToken` resource manages the lifecycle of a project service account access token.
6
+ *
7
+ * > Use of the `timestamp()` function with expiresAt will cause the resource to be re-created with every apply, it's recommended to use `plantimestamp()` or a static value instead.
8
+ *
9
+ * > Reading the access token status of a service account requires an admin token. As a result, this resource will ignore permission errors when attempting to read the token status, and will rely on the values in state instead. This can lead to apply-time failures if the token configured for the provider doesn't have permissions to rotate tokens for the service account.
10
+ *
11
+ * > Use `rotationConfiguration` to automatically rotate tokens instead of using `timestamp()` as timestamp will cause changes with every plan. `pulumi up` must still be run to rotate the token.
12
+ *
13
+ * **Upstream API**: [GitLab API docs](https://docs.gitlab.com/api/service_accounts/#create-a-personal-access-token-for-a-project-service-account)
14
+ *
15
+ * ## Example Usage
16
+ *
17
+ * ```typescript
18
+ * import * as pulumi from "@pulumi/pulumi";
19
+ * import * as gitlab from "@pulumi/gitlab";
20
+ *
21
+ * const example = new gitlab.Project("example", {
22
+ * name: "example",
23
+ * description: "An example project",
24
+ * });
25
+ * // The service account against the project
26
+ * const exampleSa = new gitlab.ProjectServiceAccount("example_sa", {
27
+ * project: example.id,
28
+ * name: "example-name",
29
+ * username: "example-username",
30
+ * });
31
+ * // To assign the service account to a project as a member
32
+ * const exampleMembership = new gitlab.ProjectMembership("example_membership", {
33
+ * project: example.id,
34
+ * userId: exampleSa.serviceAccountId.apply(x =>Number(x)),
35
+ * accessLevel: "developer",
36
+ * expiresAt: "2020-03-14",
37
+ * });
38
+ * // The service account access token with no expiry
39
+ * const exampleSaTokenNoExpiry = new gitlab.ProjectServiceAccountAccessToken("example_sa_token_no_expiry", {
40
+ * project: example.id,
41
+ * userId: exampleSa.serviceAccountId.apply(x =>Number(x)),
42
+ * name: "Example service account access token",
43
+ * scopes: ["api"],
44
+ * });
45
+ * // The service account access token with expires at
46
+ * const exampleSaTokenExpiresAt = new gitlab.ProjectServiceAccountAccessToken("example_sa_token_expires_at", {
47
+ * project: example.id,
48
+ * userId: exampleSa.serviceAccountId.apply(x =>Number(x)),
49
+ * name: "Example service account access token",
50
+ * expiresAt: "2020-03-14",
51
+ * scopes: ["api"],
52
+ * });
53
+ * // The service account access token with rotation configuration
54
+ * const exampleSaTokenRotationConfiguration = new gitlab.ProjectServiceAccountAccessToken("example_sa_token_rotation_configuration", {
55
+ * project: example.id,
56
+ * userId: exampleSa.serviceAccountId.apply(x =>Number(x)),
57
+ * name: "Example service account access token",
58
+ * rotationConfiguration: {
59
+ * rotateBeforeDays: 2,
60
+ * expirationDays: 7,
61
+ * },
62
+ * scopes: ["api"],
63
+ * });
64
+ * ```
65
+ *
66
+ * ## Import
67
+ *
68
+ * Starting in Terraform v1.5.0, you can use an import block to import `gitlab.ProjectServiceAccountAccessToken`. For example:
69
+ *
70
+ * Importing using the CLI is supported with the following syntax:
71
+ *
72
+ * `id` is in the form of <project_id>:<service_account_id>:<access_token_id>
73
+ * Importing an access token does not import the access token value.
74
+ *
75
+ * ```sh
76
+ * $ pulumi import gitlab:index/projectServiceAccountAccessToken:ProjectServiceAccountAccessToken example 1:2:3
77
+ * ```
78
+ */
79
+ export declare class ProjectServiceAccountAccessToken extends pulumi.CustomResource {
80
+ /**
81
+ * Get an existing ProjectServiceAccountAccessToken resource's state with the given name, ID, and optional extra
82
+ * properties used to qualify the lookup.
83
+ *
84
+ * @param name The _unique_ name of the resulting resource.
85
+ * @param id The _unique_ provider ID of the resource to lookup.
86
+ * @param state Any extra arguments used during the lookup.
87
+ * @param opts Optional settings to control the behavior of the CustomResource.
88
+ */
89
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectServiceAccountAccessTokenState, opts?: pulumi.CustomResourceOptions): ProjectServiceAccountAccessToken;
90
+ /**
91
+ * Returns true if the given object is an instance of ProjectServiceAccountAccessToken. This is designed to work even
92
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
93
+ */
94
+ static isInstance(obj: any): obj is ProjectServiceAccountAccessToken;
95
+ /**
96
+ * True if the token is active.
97
+ */
98
+ readonly active: pulumi.Output<boolean>;
99
+ /**
100
+ * Time the token has been created, RFC3339 format.
101
+ */
102
+ readonly createdAt: pulumi.Output<string>;
103
+ /**
104
+ * The service account access token expiry date. When left blank, the token follows the standard rule of expiry for personal access tokens.
105
+ */
106
+ readonly expiresAt: pulumi.Output<string>;
107
+ /**
108
+ * The name of the personal access token.
109
+ */
110
+ readonly name: pulumi.Output<string>;
111
+ /**
112
+ * The ID or URL-encoded path of the project containing the service account.
113
+ */
114
+ readonly project: pulumi.Output<string>;
115
+ /**
116
+ * True if the token is revoked.
117
+ */
118
+ readonly revoked: pulumi.Output<boolean>;
119
+ /**
120
+ * The configuration for when to rotate a token automatically. Will not rotate a token until `pulumi up` is run.
121
+ */
122
+ readonly rotationConfiguration: pulumi.Output<outputs.ProjectServiceAccountAccessTokenRotationConfiguration | undefined>;
123
+ /**
124
+ * The scopes of the project service account access token. Valid values are: `api`, `readUser`, `readApi`, `readRepository`, `writeRepository`, `readRegistry`, `writeRegistry`, `readVirtualRegistry`, `writeVirtualRegistry`, `sudo`, `adminMode`, `createRunner`, `manageRunner`, `aiFeatures`, `k8sProxy`, `selfRotate`, `readServicePing`. If `selfRotate` is included, you must also provide either `expiresAt` or `rotationConfiguration`.
125
+ */
126
+ readonly scopes: pulumi.Output<string[]>;
127
+ /**
128
+ * The token of the project service account access token. **Note**: the token is not available for imported resources.
129
+ */
130
+ readonly token: pulumi.Output<string>;
131
+ /**
132
+ * The ID of a service account user.
133
+ */
134
+ readonly userId: pulumi.Output<number>;
135
+ /**
136
+ * Whether to validate if the expiration date is in the future.
137
+ */
138
+ readonly validatePastExpirationDate: pulumi.Output<boolean>;
139
+ /**
140
+ * Create a ProjectServiceAccountAccessToken resource with the given unique name, arguments, and options.
141
+ *
142
+ * @param name The _unique_ name of the resource.
143
+ * @param args The arguments to use to populate this resource's properties.
144
+ * @param opts A bag of options that control this resource's behavior.
145
+ */
146
+ constructor(name: string, args: ProjectServiceAccountAccessTokenArgs, opts?: pulumi.CustomResourceOptions);
147
+ }
148
+ /**
149
+ * Input properties used for looking up and filtering ProjectServiceAccountAccessToken resources.
150
+ */
151
+ export interface ProjectServiceAccountAccessTokenState {
152
+ /**
153
+ * True if the token is active.
154
+ */
155
+ active?: pulumi.Input<boolean | undefined>;
156
+ /**
157
+ * Time the token has been created, RFC3339 format.
158
+ */
159
+ createdAt?: pulumi.Input<string | undefined>;
160
+ /**
161
+ * The service account access token expiry date. When left blank, the token follows the standard rule of expiry for personal access tokens.
162
+ */
163
+ expiresAt?: pulumi.Input<string | undefined>;
164
+ /**
165
+ * The name of the personal access token.
166
+ */
167
+ name?: pulumi.Input<string | undefined>;
168
+ /**
169
+ * The ID or URL-encoded path of the project containing the service account.
170
+ */
171
+ project?: pulumi.Input<string | undefined>;
172
+ /**
173
+ * True if the token is revoked.
174
+ */
175
+ revoked?: pulumi.Input<boolean | undefined>;
176
+ /**
177
+ * The configuration for when to rotate a token automatically. Will not rotate a token until `pulumi up` is run.
178
+ */
179
+ rotationConfiguration?: pulumi.Input<inputs.ProjectServiceAccountAccessTokenRotationConfiguration | undefined>;
180
+ /**
181
+ * The scopes of the project service account access token. Valid values are: `api`, `readUser`, `readApi`, `readRepository`, `writeRepository`, `readRegistry`, `writeRegistry`, `readVirtualRegistry`, `writeVirtualRegistry`, `sudo`, `adminMode`, `createRunner`, `manageRunner`, `aiFeatures`, `k8sProxy`, `selfRotate`, `readServicePing`. If `selfRotate` is included, you must also provide either `expiresAt` or `rotationConfiguration`.
182
+ */
183
+ scopes?: pulumi.Input<pulumi.Input<string>[] | undefined>;
184
+ /**
185
+ * The token of the project service account access token. **Note**: the token is not available for imported resources.
186
+ */
187
+ token?: pulumi.Input<string | undefined>;
188
+ /**
189
+ * The ID of a service account user.
190
+ */
191
+ userId?: pulumi.Input<number | undefined>;
192
+ /**
193
+ * Whether to validate if the expiration date is in the future.
194
+ */
195
+ validatePastExpirationDate?: pulumi.Input<boolean | undefined>;
196
+ }
197
+ /**
198
+ * The set of arguments for constructing a ProjectServiceAccountAccessToken resource.
199
+ */
200
+ export interface ProjectServiceAccountAccessTokenArgs {
201
+ /**
202
+ * The service account access token expiry date. When left blank, the token follows the standard rule of expiry for personal access tokens.
203
+ */
204
+ expiresAt?: pulumi.Input<string | undefined>;
205
+ /**
206
+ * The name of the personal access token.
207
+ */
208
+ name?: pulumi.Input<string | undefined>;
209
+ /**
210
+ * The ID or URL-encoded path of the project containing the service account.
211
+ */
212
+ project: pulumi.Input<string>;
213
+ /**
214
+ * The configuration for when to rotate a token automatically. Will not rotate a token until `pulumi up` is run.
215
+ */
216
+ rotationConfiguration?: pulumi.Input<inputs.ProjectServiceAccountAccessTokenRotationConfiguration | undefined>;
217
+ /**
218
+ * The scopes of the project service account access token. Valid values are: `api`, `readUser`, `readApi`, `readRepository`, `writeRepository`, `readRegistry`, `writeRegistry`, `readVirtualRegistry`, `writeVirtualRegistry`, `sudo`, `adminMode`, `createRunner`, `manageRunner`, `aiFeatures`, `k8sProxy`, `selfRotate`, `readServicePing`. If `selfRotate` is included, you must also provide either `expiresAt` or `rotationConfiguration`.
219
+ */
220
+ scopes: pulumi.Input<pulumi.Input<string>[]>;
221
+ /**
222
+ * The ID of a service account user.
223
+ */
224
+ userId: pulumi.Input<number>;
225
+ /**
226
+ * Whether to validate if the expiration date is in the future.
227
+ */
228
+ validatePastExpirationDate?: pulumi.Input<boolean | undefined>;
229
+ }
230
+ //# sourceMappingURL=projectServiceAccountAccessToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projectServiceAccountAccessToken.d.ts","sourceRoot":"","sources":["../projectServiceAccountAccessToken.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH,qBAAa,gCAAiC,SAAQ,MAAM,CAAC,cAAc;IACvE;;;;;;;;OAQG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,qCAAq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,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,qDAAqD,GAAG,SAAS,CAAC,CAAC;IAC/G;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC7C;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B;;OAEG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CAClE"}
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.ProjectServiceAccountAccessToken = void 0;
29
+ const pulumi = __importStar(require("@pulumi/pulumi"));
30
+ const utilities = __importStar(require("./utilities"));
31
+ /**
32
+ * The `gitlab.ProjectServiceAccountAccessToken` resource manages the lifecycle of a project service account access token.
33
+ *
34
+ * > Use of the `timestamp()` function with expiresAt will cause the resource to be re-created with every apply, it's recommended to use `plantimestamp()` or a static value instead.
35
+ *
36
+ * > Reading the access token status of a service account requires an admin token. As a result, this resource will ignore permission errors when attempting to read the token status, and will rely on the values in state instead. This can lead to apply-time failures if the token configured for the provider doesn't have permissions to rotate tokens for the service account.
37
+ *
38
+ * > Use `rotationConfiguration` to automatically rotate tokens instead of using `timestamp()` as timestamp will cause changes with every plan. `pulumi up` must still be run to rotate the token.
39
+ *
40
+ * **Upstream API**: [GitLab API docs](https://docs.gitlab.com/api/service_accounts/#create-a-personal-access-token-for-a-project-service-account)
41
+ *
42
+ * ## Example Usage
43
+ *
44
+ * ```typescript
45
+ * import * as pulumi from "@pulumi/pulumi";
46
+ * import * as gitlab from "@pulumi/gitlab";
47
+ *
48
+ * const example = new gitlab.Project("example", {
49
+ * name: "example",
50
+ * description: "An example project",
51
+ * });
52
+ * // The service account against the project
53
+ * const exampleSa = new gitlab.ProjectServiceAccount("example_sa", {
54
+ * project: example.id,
55
+ * name: "example-name",
56
+ * username: "example-username",
57
+ * });
58
+ * // To assign the service account to a project as a member
59
+ * const exampleMembership = new gitlab.ProjectMembership("example_membership", {
60
+ * project: example.id,
61
+ * userId: exampleSa.serviceAccountId.apply(x =>Number(x)),
62
+ * accessLevel: "developer",
63
+ * expiresAt: "2020-03-14",
64
+ * });
65
+ * // The service account access token with no expiry
66
+ * const exampleSaTokenNoExpiry = new gitlab.ProjectServiceAccountAccessToken("example_sa_token_no_expiry", {
67
+ * project: example.id,
68
+ * userId: exampleSa.serviceAccountId.apply(x =>Number(x)),
69
+ * name: "Example service account access token",
70
+ * scopes: ["api"],
71
+ * });
72
+ * // The service account access token with expires at
73
+ * const exampleSaTokenExpiresAt = new gitlab.ProjectServiceAccountAccessToken("example_sa_token_expires_at", {
74
+ * project: example.id,
75
+ * userId: exampleSa.serviceAccountId.apply(x =>Number(x)),
76
+ * name: "Example service account access token",
77
+ * expiresAt: "2020-03-14",
78
+ * scopes: ["api"],
79
+ * });
80
+ * // The service account access token with rotation configuration
81
+ * const exampleSaTokenRotationConfiguration = new gitlab.ProjectServiceAccountAccessToken("example_sa_token_rotation_configuration", {
82
+ * project: example.id,
83
+ * userId: exampleSa.serviceAccountId.apply(x =>Number(x)),
84
+ * name: "Example service account access token",
85
+ * rotationConfiguration: {
86
+ * rotateBeforeDays: 2,
87
+ * expirationDays: 7,
88
+ * },
89
+ * scopes: ["api"],
90
+ * });
91
+ * ```
92
+ *
93
+ * ## Import
94
+ *
95
+ * Starting in Terraform v1.5.0, you can use an import block to import `gitlab.ProjectServiceAccountAccessToken`. For example:
96
+ *
97
+ * Importing using the CLI is supported with the following syntax:
98
+ *
99
+ * `id` is in the form of <project_id>:<service_account_id>:<access_token_id>
100
+ * Importing an access token does not import the access token value.
101
+ *
102
+ * ```sh
103
+ * $ pulumi import gitlab:index/projectServiceAccountAccessToken:ProjectServiceAccountAccessToken example 1:2:3
104
+ * ```
105
+ */
106
+ class ProjectServiceAccountAccessToken extends pulumi.CustomResource {
107
+ /**
108
+ * Get an existing ProjectServiceAccountAccessToken resource's state with the given name, ID, and optional extra
109
+ * properties used to qualify the lookup.
110
+ *
111
+ * @param name The _unique_ name of the resulting resource.
112
+ * @param id The _unique_ provider ID of the resource to lookup.
113
+ * @param state Any extra arguments used during the lookup.
114
+ * @param opts Optional settings to control the behavior of the CustomResource.
115
+ */
116
+ static get(name, id, state, opts) {
117
+ return new ProjectServiceAccountAccessToken(name, state, { ...opts, id: id });
118
+ }
119
+ /** @internal */
120
+ static __pulumiType = 'gitlab:index/projectServiceAccountAccessToken:ProjectServiceAccountAccessToken';
121
+ /**
122
+ * Returns true if the given object is an instance of ProjectServiceAccountAccessToken. This is designed to work even
123
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
124
+ */
125
+ static isInstance(obj) {
126
+ if (obj === undefined || obj === null) {
127
+ return false;
128
+ }
129
+ return obj['__pulumiType'] === ProjectServiceAccountAccessToken.__pulumiType;
130
+ }
131
+ constructor(name, argsOrState, opts) {
132
+ let resourceInputs = {};
133
+ opts = opts || {};
134
+ if (opts.id) {
135
+ const state = argsOrState;
136
+ resourceInputs["active"] = state?.active;
137
+ resourceInputs["createdAt"] = state?.createdAt;
138
+ resourceInputs["expiresAt"] = state?.expiresAt;
139
+ resourceInputs["name"] = state?.name;
140
+ resourceInputs["project"] = state?.project;
141
+ resourceInputs["revoked"] = state?.revoked;
142
+ resourceInputs["rotationConfiguration"] = state?.rotationConfiguration;
143
+ resourceInputs["scopes"] = state?.scopes;
144
+ resourceInputs["token"] = state?.token;
145
+ resourceInputs["userId"] = state?.userId;
146
+ resourceInputs["validatePastExpirationDate"] = state?.validatePastExpirationDate;
147
+ }
148
+ else {
149
+ const args = argsOrState;
150
+ if (args?.project === undefined && !opts.urn) {
151
+ throw new Error("Missing required property 'project'");
152
+ }
153
+ if (args?.scopes === undefined && !opts.urn) {
154
+ throw new Error("Missing required property 'scopes'");
155
+ }
156
+ if (args?.userId === undefined && !opts.urn) {
157
+ throw new Error("Missing required property 'userId'");
158
+ }
159
+ resourceInputs["expiresAt"] = args?.expiresAt;
160
+ resourceInputs["name"] = args?.name;
161
+ resourceInputs["project"] = args?.project;
162
+ resourceInputs["rotationConfiguration"] = args?.rotationConfiguration;
163
+ resourceInputs["scopes"] = args?.scopes;
164
+ resourceInputs["userId"] = args?.userId;
165
+ resourceInputs["validatePastExpirationDate"] = args?.validatePastExpirationDate;
166
+ resourceInputs["active"] = undefined /*out*/;
167
+ resourceInputs["createdAt"] = undefined /*out*/;
168
+ resourceInputs["revoked"] = undefined /*out*/;
169
+ resourceInputs["token"] = undefined /*out*/;
170
+ }
171
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
172
+ const secretOpts = { additionalSecretOutputs: ["token"] };
173
+ opts = pulumi.mergeOptions(opts, secretOpts);
174
+ super(ProjectServiceAccountAccessToken.__pulumiType, name, resourceInputs, opts);
175
+ }
176
+ }
177
+ exports.ProjectServiceAccountAccessToken = ProjectServiceAccountAccessToken;
178
+ //# sourceMappingURL=projectServiceAccountAccessToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projectServiceAccountAccessToken.js","sourceRoot":"","sources":["../projectServiceAccountAccessToken.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAGzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH,MAAa,gCAAiC,SAAQ,MAAM,CAAC,cAAc;IACvE;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA6C,EAAE,IAAmC;QAC3I,OAAO,IAAI,gCAAgC,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACvF,CAAC;IAED,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,gFAAgF,CAAC;IAEvH;;;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,gCAAgC,CAAC,YAAY,CAAC;IACjF,CAAC;IAuDD,YAAY,IAAY,EAAE,WAA0F,EAAE,IAAmC;QACrJ,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,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D;YACD,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,EAAE,SAAS,CAAC;YAC9C,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC;YAC1C,cAAc,CAAC,uBAAuB,CAAC,GAAG,IAAI,EAAE,qBAAqB,CAAC;YACtE,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC;YACxC,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC;YACxC,cAAc,CAAC,4BAA4B,CAAC,GAAG,IAAI,EAAE,0BAA0B,CAAC;YAChF,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC7C,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAChD,cAAc,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC9C,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAC/C;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,gCAAgC,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACrF,CAAC;;AA5HL,4EA6HC"}
package/types/input.d.ts CHANGED
@@ -126,6 +126,60 @@ export interface BranchProtectionAllowedToUnprotect {
126
126
  */
127
127
  userId?: pulumi.Input<number | undefined>;
128
128
  }
129
+ export interface ComplianceRequirementExternalControl {
130
+ /**
131
+ * Name of the external control.
132
+ */
133
+ externalControlName?: pulumi.Input<string | undefined>;
134
+ /**
135
+ * External URL for external controls.
136
+ */
137
+ externalUrl: pulumi.Input<string>;
138
+ /**
139
+ * Compliance requirements control ID.
140
+ */
141
+ id?: pulumi.Input<string | undefined>;
142
+ /**
143
+ * Name of the control. Set to `externalControl` from the API.
144
+ */
145
+ name?: pulumi.Input<string | undefined>;
146
+ /**
147
+ * Whether ping is enabled for external controls.
148
+ */
149
+ pingEnabled: pulumi.Input<boolean>;
150
+ /**
151
+ * Secret token for external controls. The `secretToken` is not available in imported resources.
152
+ */
153
+ secretToken: pulumi.Input<string>;
154
+ }
155
+ export interface ComplianceRequirementInternalControl {
156
+ /**
157
+ * Expression for internal controls.
158
+ */
159
+ expression: pulumi.Input<inputs.ComplianceRequirementInternalControlExpression>;
160
+ /**
161
+ * Compliance requirements control ID.
162
+ */
163
+ id?: pulumi.Input<string | undefined>;
164
+ /**
165
+ * Name of the control, from the list of Control IDs here: [GitLab Compliance Controls](https://docs.gitlab.com/user/compliance/compliance_frameworks/#gitlab-compliance-controls)
166
+ */
167
+ name: pulumi.Input<string>;
168
+ }
169
+ export interface ComplianceRequirementInternalControlExpression {
170
+ /**
171
+ * The field to evaluate (e.g., `scannerDepScanningRunning`).
172
+ */
173
+ field: pulumi.Input<string>;
174
+ /**
175
+ * The operator for comparison. Valid values are `=`, `!=`, `>`, `<`, `>=`, `<=`.
176
+ */
177
+ operator: pulumi.Input<string>;
178
+ /**
179
+ * The value to compare against. Use `true` or `false` for boolean values.
180
+ */
181
+ value: pulumi.Input<string>;
182
+ }
129
183
  export interface GetGroupProvisionedUsersProvisionedUser {
130
184
  /**
131
185
  * The avatar URL of the provisioned user.
@@ -1072,6 +1126,55 @@ export interface ProjectContainerTagProtectionTimeouts {
1072
1126
  */
1073
1127
  create?: pulumi.Input<string | undefined>;
1074
1128
  }
1129
+ export interface ProjectFeatureFlagStrategy {
1130
+ /**
1131
+ * The name of the strategy. Valid values are: `default`, `gradualRolloutUserId`, `userWithId`, `flexibleRollout`, `gitlabUserList`.
1132
+ */
1133
+ name: pulumi.Input<string>;
1134
+ /**
1135
+ * Parameters for the strategy. Required fields depend on the strategy name:
1136
+ * - gradualRolloutUserId: set percentage (required); groupId defaults to "default" if omitted.
1137
+ * - userWithId: set userIds (required, comma-separated).
1138
+ * - flexibleRollout: set rollout, group_id, and stickiness.
1139
+ */
1140
+ parameters?: pulumi.Input<inputs.ProjectFeatureFlagStrategyParameters | undefined>;
1141
+ /**
1142
+ * Scopes define which environments the strategy applies to.
1143
+ */
1144
+ scopes?: pulumi.Input<pulumi.Input<inputs.ProjectFeatureFlagStrategyScope>[] | undefined>;
1145
+ /**
1146
+ * The ID of the `gitlab.ProjectFeatureFlagUserList` to bind to this strategy (its `listId` attribute, not `iid`). Required when `name` is `gitlabUserList`, and not usable otherwise.
1147
+ */
1148
+ userListId?: pulumi.Input<number | undefined>;
1149
+ }
1150
+ export interface ProjectFeatureFlagStrategyParameters {
1151
+ /**
1152
+ * The Unleash group ID. Used by `gradualRolloutUserId` and `flexibleRollout`. Computed when omitted.
1153
+ */
1154
+ groupId?: pulumi.Input<string | undefined>;
1155
+ /**
1156
+ * Percentage (as a string) of users to activate. Used by `gradualRolloutUserId` and `flexibleRollout`.
1157
+ */
1158
+ percentage?: pulumi.Input<string | undefined>;
1159
+ /**
1160
+ * Rollout percentage for `flexibleRollout`.
1161
+ */
1162
+ rollout?: pulumi.Input<string | undefined>;
1163
+ /**
1164
+ * Stickiness setting for `flexibleRollout`. Computed when omitted.
1165
+ */
1166
+ stickiness?: pulumi.Input<string | undefined>;
1167
+ /**
1168
+ * Comma-separated list of user IDs. Used by `userWithId`.
1169
+ */
1170
+ userIds?: pulumi.Input<string | undefined>;
1171
+ }
1172
+ export interface ProjectFeatureFlagStrategyScope {
1173
+ /**
1174
+ * The environment scope, e.g. `*`, `production`, `staging`.
1175
+ */
1176
+ environmentScope: pulumi.Input<string>;
1177
+ }
1075
1178
  export interface ProjectHookCustomHeader {
1076
1179
  /**
1077
1180
  * Key of the custom header.
@@ -1256,6 +1359,16 @@ export interface ProjectPushRules {
1256
1359
  */
1257
1360
  rejectUnsignedCommits?: pulumi.Input<boolean | undefined>;
1258
1361
  }
1362
+ export interface ProjectServiceAccountAccessTokenRotationConfiguration {
1363
+ /**
1364
+ * The duration (in days) the new token should be valid for.
1365
+ */
1366
+ expirationDays?: pulumi.Input<number | undefined>;
1367
+ /**
1368
+ * The duration (in days) before the expiration when the token should be rotated. As an example, if set to 7 days, the token will rotate 7 days before the expiration date, but only when `pulumi up` is run in that timeframe.
1369
+ */
1370
+ rotateBeforeDays: pulumi.Input<number>;
1371
+ }
1259
1372
  export interface ProjectServiceAccountTimeouts {
1260
1373
  /**
1261
1374
  * How long to wait for the service account to be fully deleted. Defaults to 10 minutes.