@cdktf-providers/astronomer-astro 1.0.8

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 (69) hide show
  1. package/LICENSE +355 -0
  2. package/README.md +19 -0
  3. package/dist/alert/index.d.ts +566 -0
  4. package/dist/alert/index.js +1489 -0
  5. package/dist/api-token/index.d.ts +199 -0
  6. package/dist/api-token/index.js +503 -0
  7. package/dist/cluster/index.d.ts +305 -0
  8. package/dist/cluster/index.js +755 -0
  9. package/dist/data-astro-alert/index.d.ts +277 -0
  10. package/dist/data-astro-alert/index.js +762 -0
  11. package/dist/data-astro-alerts/index.d.ts +232 -0
  12. package/dist/data-astro-alerts/index.js +600 -0
  13. package/dist/data-astro-api-token/index.d.ts +135 -0
  14. package/dist/data-astro-api-token/index.js +353 -0
  15. package/dist/data-astro-api-tokens/index.d.ts +196 -0
  16. package/dist/data-astro-api-tokens/index.js +502 -0
  17. package/dist/data-astro-cluster/index.d.ts +211 -0
  18. package/dist/data-astro-cluster/index.js +535 -0
  19. package/dist/data-astro-cluster-options/index.d.ts +255 -0
  20. package/dist/data-astro-cluster-options/index.js +640 -0
  21. package/dist/data-astro-clusters/index.d.ts +263 -0
  22. package/dist/data-astro-clusters/index.js +661 -0
  23. package/dist/data-astro-deployment/index.d.ts +355 -0
  24. package/dist/data-astro-deployment/index.js +1009 -0
  25. package/dist/data-astro-deployment-options/index.d.ts +475 -0
  26. package/dist/data-astro-deployment-options/index.js +1274 -0
  27. package/dist/data-astro-deployments/index.d.ts +416 -0
  28. package/dist/data-astro-deployments/index.js +1158 -0
  29. package/dist/data-astro-notification-channel/index.d.ts +122 -0
  30. package/dist/data-astro-notification-channel/index.js +345 -0
  31. package/dist/data-astro-notification-channels/index.d.ts +201 -0
  32. package/dist/data-astro-notification-channels/index.js +540 -0
  33. package/dist/data-astro-organization/index.d.ts +87 -0
  34. package/dist/data-astro-organization/index.js +251 -0
  35. package/dist/data-astro-team/index.d.ts +204 -0
  36. package/dist/data-astro-team/index.js +507 -0
  37. package/dist/data-astro-teams/index.d.ts +247 -0
  38. package/dist/data-astro-teams/index.js +610 -0
  39. package/dist/data-astro-user/index.d.ts +122 -0
  40. package/dist/data-astro-user/index.js +274 -0
  41. package/dist/data-astro-users/index.d.ts +174 -0
  42. package/dist/data-astro-users/index.js +400 -0
  43. package/dist/data-astro-workspace/index.d.ts +94 -0
  44. package/dist/data-astro-workspace/index.js +250 -0
  45. package/dist/data-astro-workspaces/index.d.ts +146 -0
  46. package/dist/data-astro-workspaces/index.js +376 -0
  47. package/dist/deployment/index.d.ts +813 -0
  48. package/dist/deployment/index.js +2083 -0
  49. package/dist/hybrid-cluster-workspace-authorization/index.d.ts +53 -0
  50. package/dist/hybrid-cluster-workspace-authorization/index.js +111 -0
  51. package/dist/index.d.ts +31 -0
  52. package/dist/index.js +32 -0
  53. package/dist/lazy-index.d.ts +0 -0
  54. package/dist/lazy-index.js +32 -0
  55. package/dist/notification-channel/index.d.ts +235 -0
  56. package/dist/notification-channel/index.js +608 -0
  57. package/dist/provider/index.d.ts +75 -0
  58. package/dist/provider/index.js +151 -0
  59. package/dist/team/index.d.ts +251 -0
  60. package/dist/team/index.js +622 -0
  61. package/dist/team-roles/index.d.ts +180 -0
  62. package/dist/team-roles/index.js +414 -0
  63. package/dist/user-invite/index.d.ts +99 -0
  64. package/dist/user-invite/index.js +262 -0
  65. package/dist/user-roles/index.d.ts +180 -0
  66. package/dist/user-roles/index.js +414 -0
  67. package/dist/workspace/index.d.ts +109 -0
  68. package/dist/workspace/index.js +282 -0
  69. package/package.json +51 -0
@@ -0,0 +1,376 @@
1
+ // https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/data-sources/workspaces
2
+ // generated from terraform resource schema
3
+ import * as cdktf from 'cdktf';
4
+ export function dataAstroWorkspacesWorkspacesCreatedByToTerraform(struct) {
5
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
6
+ return struct;
7
+ }
8
+ if (cdktf.isComplexElement(struct)) {
9
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
10
+ }
11
+ return {};
12
+ }
13
+ export function dataAstroWorkspacesWorkspacesCreatedByToHclTerraform(struct) {
14
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
15
+ return struct;
16
+ }
17
+ if (cdktf.isComplexElement(struct)) {
18
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
19
+ }
20
+ const attrs = {};
21
+ return attrs;
22
+ }
23
+ export class DataAstroWorkspacesWorkspacesCreatedByOutputReference extends cdktf.ComplexObject {
24
+ isEmptyObject = false;
25
+ /**
26
+ * @param terraformResource The parent resource
27
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
28
+ */
29
+ constructor(terraformResource, terraformAttribute) {
30
+ super(terraformResource, terraformAttribute, false);
31
+ }
32
+ get internalValue() {
33
+ let hasAnyValues = this.isEmptyObject;
34
+ const internalValueResult = {};
35
+ return hasAnyValues ? internalValueResult : undefined;
36
+ }
37
+ set internalValue(value) {
38
+ if (value === undefined) {
39
+ this.isEmptyObject = false;
40
+ }
41
+ else {
42
+ this.isEmptyObject = Object.keys(value).length === 0;
43
+ }
44
+ }
45
+ // api_token_name - computed: true, optional: false, required: false
46
+ get apiTokenName() {
47
+ return this.getStringAttribute('api_token_name');
48
+ }
49
+ // avatar_url - computed: true, optional: false, required: false
50
+ get avatarUrl() {
51
+ return this.getStringAttribute('avatar_url');
52
+ }
53
+ // full_name - computed: true, optional: false, required: false
54
+ get fullName() {
55
+ return this.getStringAttribute('full_name');
56
+ }
57
+ // id - computed: true, optional: false, required: false
58
+ get id() {
59
+ return this.getStringAttribute('id');
60
+ }
61
+ // subject_type - computed: true, optional: false, required: false
62
+ get subjectType() {
63
+ return this.getStringAttribute('subject_type');
64
+ }
65
+ // username - computed: true, optional: false, required: false
66
+ get username() {
67
+ return this.getStringAttribute('username');
68
+ }
69
+ }
70
+ export function dataAstroWorkspacesWorkspacesUpdatedByToTerraform(struct) {
71
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
72
+ return struct;
73
+ }
74
+ if (cdktf.isComplexElement(struct)) {
75
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
76
+ }
77
+ return {};
78
+ }
79
+ export function dataAstroWorkspacesWorkspacesUpdatedByToHclTerraform(struct) {
80
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
81
+ return struct;
82
+ }
83
+ if (cdktf.isComplexElement(struct)) {
84
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
85
+ }
86
+ const attrs = {};
87
+ return attrs;
88
+ }
89
+ export class DataAstroWorkspacesWorkspacesUpdatedByOutputReference extends cdktf.ComplexObject {
90
+ isEmptyObject = false;
91
+ /**
92
+ * @param terraformResource The parent resource
93
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
94
+ */
95
+ constructor(terraformResource, terraformAttribute) {
96
+ super(terraformResource, terraformAttribute, false);
97
+ }
98
+ get internalValue() {
99
+ let hasAnyValues = this.isEmptyObject;
100
+ const internalValueResult = {};
101
+ return hasAnyValues ? internalValueResult : undefined;
102
+ }
103
+ set internalValue(value) {
104
+ if (value === undefined) {
105
+ this.isEmptyObject = false;
106
+ }
107
+ else {
108
+ this.isEmptyObject = Object.keys(value).length === 0;
109
+ }
110
+ }
111
+ // api_token_name - computed: true, optional: false, required: false
112
+ get apiTokenName() {
113
+ return this.getStringAttribute('api_token_name');
114
+ }
115
+ // avatar_url - computed: true, optional: false, required: false
116
+ get avatarUrl() {
117
+ return this.getStringAttribute('avatar_url');
118
+ }
119
+ // full_name - computed: true, optional: false, required: false
120
+ get fullName() {
121
+ return this.getStringAttribute('full_name');
122
+ }
123
+ // id - computed: true, optional: false, required: false
124
+ get id() {
125
+ return this.getStringAttribute('id');
126
+ }
127
+ // subject_type - computed: true, optional: false, required: false
128
+ get subjectType() {
129
+ return this.getStringAttribute('subject_type');
130
+ }
131
+ // username - computed: true, optional: false, required: false
132
+ get username() {
133
+ return this.getStringAttribute('username');
134
+ }
135
+ }
136
+ export function dataAstroWorkspacesWorkspacesToTerraform(struct) {
137
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
138
+ return struct;
139
+ }
140
+ if (cdktf.isComplexElement(struct)) {
141
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
142
+ }
143
+ return {
144
+ id: cdktf.stringToTerraform(struct.id),
145
+ };
146
+ }
147
+ export function dataAstroWorkspacesWorkspacesToHclTerraform(struct) {
148
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
149
+ return struct;
150
+ }
151
+ if (cdktf.isComplexElement(struct)) {
152
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
153
+ }
154
+ const attrs = {
155
+ id: {
156
+ value: cdktf.stringToHclTerraform(struct.id),
157
+ isBlock: false,
158
+ type: "simple",
159
+ storageClassType: "string",
160
+ },
161
+ };
162
+ // remove undefined attributes
163
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
164
+ }
165
+ export class DataAstroWorkspacesWorkspacesOutputReference extends cdktf.ComplexObject {
166
+ isEmptyObject = false;
167
+ /**
168
+ * @param terraformResource The parent resource
169
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
170
+ * @param complexObjectIndex the index of this item in the list
171
+ * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
172
+ */
173
+ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
174
+ super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
175
+ }
176
+ get internalValue() {
177
+ let hasAnyValues = this.isEmptyObject;
178
+ const internalValueResult = {};
179
+ if (this._id !== undefined) {
180
+ hasAnyValues = true;
181
+ internalValueResult.id = this._id;
182
+ }
183
+ return hasAnyValues ? internalValueResult : undefined;
184
+ }
185
+ set internalValue(value) {
186
+ if (value === undefined) {
187
+ this.isEmptyObject = false;
188
+ this._id = undefined;
189
+ }
190
+ else {
191
+ this.isEmptyObject = Object.keys(value).length === 0;
192
+ this._id = value.id;
193
+ }
194
+ }
195
+ // cicd_enforced_default - computed: true, optional: false, required: false
196
+ get cicdEnforcedDefault() {
197
+ return this.getBooleanAttribute('cicd_enforced_default');
198
+ }
199
+ // created_at - computed: true, optional: false, required: false
200
+ get createdAt() {
201
+ return this.getStringAttribute('created_at');
202
+ }
203
+ // created_by - computed: true, optional: false, required: false
204
+ _createdBy = new DataAstroWorkspacesWorkspacesCreatedByOutputReference(this, "created_by");
205
+ get createdBy() {
206
+ return this._createdBy;
207
+ }
208
+ // description - computed: true, optional: false, required: false
209
+ get description() {
210
+ return this.getStringAttribute('description');
211
+ }
212
+ // id - computed: true, optional: false, required: true
213
+ _id;
214
+ get id() {
215
+ return this.getStringAttribute('id');
216
+ }
217
+ set id(value) {
218
+ this._id = value;
219
+ }
220
+ // Temporarily expose input value. Use with caution.
221
+ get idInput() {
222
+ return this._id;
223
+ }
224
+ // name - computed: true, optional: false, required: false
225
+ get name() {
226
+ return this.getStringAttribute('name');
227
+ }
228
+ // updated_at - computed: true, optional: false, required: false
229
+ get updatedAt() {
230
+ return this.getStringAttribute('updated_at');
231
+ }
232
+ // updated_by - computed: true, optional: false, required: false
233
+ _updatedBy = new DataAstroWorkspacesWorkspacesUpdatedByOutputReference(this, "updated_by");
234
+ get updatedBy() {
235
+ return this._updatedBy;
236
+ }
237
+ }
238
+ export class DataAstroWorkspacesWorkspacesList extends cdktf.ComplexList {
239
+ terraformResource;
240
+ terraformAttribute;
241
+ wrapsSet;
242
+ internalValue;
243
+ /**
244
+ * @param terraformResource The parent resource
245
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
246
+ * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
247
+ */
248
+ constructor(terraformResource, terraformAttribute, wrapsSet) {
249
+ super(terraformResource, terraformAttribute, wrapsSet);
250
+ this.terraformResource = terraformResource;
251
+ this.terraformAttribute = terraformAttribute;
252
+ this.wrapsSet = wrapsSet;
253
+ }
254
+ /**
255
+ * @param index the index of the item to return
256
+ */
257
+ get(index) {
258
+ return new DataAstroWorkspacesWorkspacesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
259
+ }
260
+ }
261
+ /**
262
+ * Represents a {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/data-sources/workspaces astro_workspaces}
263
+ */
264
+ export class DataAstroWorkspaces extends cdktf.TerraformDataSource {
265
+ // =================
266
+ // STATIC PROPERTIES
267
+ // =================
268
+ static tfResourceType = "astro_workspaces";
269
+ // ==============
270
+ // STATIC Methods
271
+ // ==============
272
+ /**
273
+ * Generates CDKTF code for importing a DataAstroWorkspaces resource upon running "cdktf plan <stack-name>"
274
+ * @param scope The scope in which to define this construct
275
+ * @param importToId The construct id used in the generated config for the DataAstroWorkspaces to import
276
+ * @param importFromId The id of the existing DataAstroWorkspaces that should be imported. Refer to the {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/data-sources/workspaces#import import section} in the documentation of this resource for the id to use
277
+ * @param provider? Optional instance of the provider where the DataAstroWorkspaces to import is found
278
+ */
279
+ static generateConfigForImport(scope, importToId, importFromId, provider) {
280
+ return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "astro_workspaces", importId: importFromId, provider });
281
+ }
282
+ // ===========
283
+ // INITIALIZER
284
+ // ===========
285
+ /**
286
+ * Create a new {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/data-sources/workspaces astro_workspaces} Data Source
287
+ *
288
+ * @param scope The scope in which to define this construct
289
+ * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
290
+ * @param options DataAstroWorkspacesConfig = {}
291
+ */
292
+ constructor(scope, id, config = {}) {
293
+ super(scope, id, {
294
+ terraformResourceType: 'astro_workspaces',
295
+ terraformGeneratorMetadata: {
296
+ providerName: 'astro',
297
+ providerVersion: '1.0.8',
298
+ providerVersionConstraint: '1.0.8'
299
+ },
300
+ provider: config.provider,
301
+ dependsOn: config.dependsOn,
302
+ count: config.count,
303
+ lifecycle: config.lifecycle,
304
+ provisioners: config.provisioners,
305
+ connection: config.connection,
306
+ forEach: config.forEach
307
+ });
308
+ this._names = config.names;
309
+ this._workspaceIds = config.workspaceIds;
310
+ }
311
+ // ==========
312
+ // ATTRIBUTES
313
+ // ==========
314
+ // names - computed: false, optional: true, required: false
315
+ _names;
316
+ get names() {
317
+ return cdktf.Fn.tolist(this.getListAttribute('names'));
318
+ }
319
+ set names(value) {
320
+ this._names = value;
321
+ }
322
+ resetNames() {
323
+ this._names = undefined;
324
+ }
325
+ // Temporarily expose input value. Use with caution.
326
+ get namesInput() {
327
+ return this._names;
328
+ }
329
+ // workspace_ids - computed: false, optional: true, required: false
330
+ _workspaceIds;
331
+ get workspaceIds() {
332
+ return cdktf.Fn.tolist(this.getListAttribute('workspace_ids'));
333
+ }
334
+ set workspaceIds(value) {
335
+ this._workspaceIds = value;
336
+ }
337
+ resetWorkspaceIds() {
338
+ this._workspaceIds = undefined;
339
+ }
340
+ // Temporarily expose input value. Use with caution.
341
+ get workspaceIdsInput() {
342
+ return this._workspaceIds;
343
+ }
344
+ // workspaces - computed: true, optional: false, required: false
345
+ _workspaces = new DataAstroWorkspacesWorkspacesList(this, "workspaces", true);
346
+ get workspaces() {
347
+ return this._workspaces;
348
+ }
349
+ // =========
350
+ // SYNTHESIS
351
+ // =========
352
+ synthesizeAttributes() {
353
+ return {
354
+ names: cdktf.listMapper(cdktf.stringToTerraform, false)(this._names),
355
+ workspace_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(this._workspaceIds),
356
+ };
357
+ }
358
+ synthesizeHclAttributes() {
359
+ const attrs = {
360
+ names: {
361
+ value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._names),
362
+ isBlock: false,
363
+ type: "set",
364
+ storageClassType: "stringList",
365
+ },
366
+ workspace_ids: {
367
+ value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._workspaceIds),
368
+ isBlock: false,
369
+ type: "set",
370
+ storageClassType: "stringList",
371
+ },
372
+ };
373
+ // remove undefined attributes
374
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
375
+ }
376
+ }