@cdktn/provider-generator 0.23.0 → 0.24.0-pre.3
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/build/get/__tests__/constructs-maker.test.js +2 -2
- package/build/get/__tests__/generator/complex-computed-types.test.js +4 -3
- package/build/get/__tests__/generator/deep-nested-attributes.test.js +5 -4
- package/build/get/__tests__/generator/description-escaping.test.js +6 -5
- package/build/get/__tests__/generator/empty-provider-resources.test.js +4 -3
- package/build/get/__tests__/generator/export-sharding.test.js +5 -4
- package/build/get/__tests__/generator/module-generator.test.js +7 -6
- package/build/get/__tests__/generator/nested-types.test.js +5 -4
- package/build/get/__tests__/generator/provider.test.js +5 -4
- package/build/get/__tests__/generator/resource-types.test.js +8 -7
- package/build/get/__tests__/generator/skipped-attributes.test.js +5 -4
- package/build/get/__tests__/generator/types.test.js +51 -28
- package/build/get/__tests__/generator/versions-file.test.js +4 -3
- package/build/get/__tests__/util.d.ts +9 -0
- package/build/get/__tests__/util.js +24 -2
- package/build/get/generator/resource-parser.d.ts +1 -0
- package/build/get/generator/resource-parser.js +29 -3
- package/package.json +3 -3
- package/src/get/__tests__/generator/__snapshots__/types.test.ts.snap +608 -0
- package/src/get/__tests__/generator/fixtures/case-insensitive-base-name-collision.test.fixture.json +82 -0
|
@@ -295,6 +295,614 @@ export class BooleanMap extends cdktn.TerraformResource {
|
|
|
295
295
|
"
|
|
296
296
|
`;
|
|
297
297
|
|
|
298
|
+
exports[`case-insensitive base name collision: data-oci-devops-repository-mirror-record 1`] = `
|
|
299
|
+
"// https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/devops_repository_mirror_record
|
|
300
|
+
// generated from terraform resource schema
|
|
301
|
+
|
|
302
|
+
import { Construct } from 'constructs';
|
|
303
|
+
import * as cdktn from 'cdktn';
|
|
304
|
+
|
|
305
|
+
// Configuration
|
|
306
|
+
|
|
307
|
+
export interface DataOciDevopsRepositoryMirrorRecordConfig extends cdktn.TerraformMetaArguments {
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Represents a {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/devops_repository_mirror_record oci_devops_repository_mirror_record}
|
|
312
|
+
*/
|
|
313
|
+
export class DataOciDevopsRepositoryMirrorRecord extends cdktn.TerraformDataSource {
|
|
314
|
+
|
|
315
|
+
// =================
|
|
316
|
+
// STATIC PROPERTIES
|
|
317
|
+
// =================
|
|
318
|
+
public static readonly tfResourceType = "oci_devops_repository_mirror_record";
|
|
319
|
+
|
|
320
|
+
// ==============
|
|
321
|
+
// STATIC Methods
|
|
322
|
+
// ==============
|
|
323
|
+
/**
|
|
324
|
+
* Generates CDKTN code for importing a DataOciDevopsRepositoryMirrorRecord resource upon running "cdktn plan <stack-name>"
|
|
325
|
+
* @param scope The scope in which to define this construct
|
|
326
|
+
* @param importToId The construct id used in the generated config for the DataOciDevopsRepositoryMirrorRecord to import
|
|
327
|
+
* @param importFromId The id of the existing DataOciDevopsRepositoryMirrorRecord that should be imported. Refer to the {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/devops_repository_mirror_record#import import section} in the documentation of this resource for the id to use
|
|
328
|
+
* @param provider? Optional instance of the provider where the DataOciDevopsRepositoryMirrorRecord to import is found
|
|
329
|
+
*/
|
|
330
|
+
public static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktn.TerraformProvider) {
|
|
331
|
+
return new cdktn.ImportableResource(scope, importToId, { terraformResourceType: "oci_devops_repository_mirror_record", importId: importFromId, provider });
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// ===========
|
|
335
|
+
// INITIALIZER
|
|
336
|
+
// ===========
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Create a new {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/devops_repository_mirror_record oci_devops_repository_mirror_record} Data Source
|
|
340
|
+
*
|
|
341
|
+
* @param scope The scope in which to define this construct
|
|
342
|
+
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
|
|
343
|
+
* @param options DataOciDevopsRepositoryMirrorRecordConfig = {}
|
|
344
|
+
*/
|
|
345
|
+
public constructor(scope: Construct, id: string, config: DataOciDevopsRepositoryMirrorRecordConfig = {}) {
|
|
346
|
+
super(scope, id, {
|
|
347
|
+
terraformResourceType: 'oci_devops_repository_mirror_record',
|
|
348
|
+
terraformGeneratorMetadata: {
|
|
349
|
+
providerName: 'oci'
|
|
350
|
+
},
|
|
351
|
+
provider: config.provider,
|
|
352
|
+
dependsOn: config.dependsOn,
|
|
353
|
+
count: config.count,
|
|
354
|
+
lifecycle: config.lifecycle,
|
|
355
|
+
provisioners: config.provisioners,
|
|
356
|
+
connection: config.connection,
|
|
357
|
+
forEach: config.forEach
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// ==========
|
|
362
|
+
// ATTRIBUTES
|
|
363
|
+
// ==========
|
|
364
|
+
|
|
365
|
+
// id - computed: true, optional: false, required: false
|
|
366
|
+
public get id() {
|
|
367
|
+
return this.getStringAttribute('id');
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// =========
|
|
371
|
+
// SYNTHESIS
|
|
372
|
+
// =========
|
|
373
|
+
|
|
374
|
+
protected synthesizeAttributes(): { [name: string]: any } {
|
|
375
|
+
return {
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
protected synthesizeHclAttributes(): { [name: string]: any } {
|
|
380
|
+
const attrs = {
|
|
381
|
+
};
|
|
382
|
+
return attrs;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
"
|
|
386
|
+
`;
|
|
387
|
+
|
|
388
|
+
exports[`case-insensitive base name collision: data-oci-devops-repository-mirrorrecord-history 1`] = `
|
|
389
|
+
"// https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/devops_repository_mirrorrecord_history
|
|
390
|
+
// generated from terraform resource schema
|
|
391
|
+
|
|
392
|
+
import { Construct } from 'constructs';
|
|
393
|
+
import * as cdktn from 'cdktn';
|
|
394
|
+
|
|
395
|
+
// Configuration
|
|
396
|
+
|
|
397
|
+
export interface DataOciDevopsRepositoryMirrorrecordHistoryConfig extends cdktn.TerraformMetaArguments {
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Represents a {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/devops_repository_mirrorrecord_history oci_devops_repository_mirrorrecord_history}
|
|
402
|
+
*/
|
|
403
|
+
export class DataOciDevopsRepositoryMirrorrecordHistory extends cdktn.TerraformDataSource {
|
|
404
|
+
|
|
405
|
+
// =================
|
|
406
|
+
// STATIC PROPERTIES
|
|
407
|
+
// =================
|
|
408
|
+
public static readonly tfResourceType = "oci_devops_repository_mirrorrecord_history";
|
|
409
|
+
|
|
410
|
+
// ==============
|
|
411
|
+
// STATIC Methods
|
|
412
|
+
// ==============
|
|
413
|
+
/**
|
|
414
|
+
* Generates CDKTN code for importing a DataOciDevopsRepositoryMirrorrecordHistory resource upon running "cdktn plan <stack-name>"
|
|
415
|
+
* @param scope The scope in which to define this construct
|
|
416
|
+
* @param importToId The construct id used in the generated config for the DataOciDevopsRepositoryMirrorrecordHistory to import
|
|
417
|
+
* @param importFromId The id of the existing DataOciDevopsRepositoryMirrorrecordHistory that should be imported. Refer to the {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/devops_repository_mirrorrecord_history#import import section} in the documentation of this resource for the id to use
|
|
418
|
+
* @param provider? Optional instance of the provider where the DataOciDevopsRepositoryMirrorrecordHistory to import is found
|
|
419
|
+
*/
|
|
420
|
+
public static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktn.TerraformProvider) {
|
|
421
|
+
return new cdktn.ImportableResource(scope, importToId, { terraformResourceType: "oci_devops_repository_mirrorrecord_history", importId: importFromId, provider });
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// ===========
|
|
425
|
+
// INITIALIZER
|
|
426
|
+
// ===========
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Create a new {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/devops_repository_mirrorrecord_history oci_devops_repository_mirrorrecord_history} Data Source
|
|
430
|
+
*
|
|
431
|
+
* @param scope The scope in which to define this construct
|
|
432
|
+
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
|
|
433
|
+
* @param options DataOciDevopsRepositoryMirrorrecordHistoryConfig = {}
|
|
434
|
+
*/
|
|
435
|
+
public constructor(scope: Construct, id: string, config: DataOciDevopsRepositoryMirrorrecordHistoryConfig = {}) {
|
|
436
|
+
super(scope, id, {
|
|
437
|
+
terraformResourceType: 'oci_devops_repository_mirrorrecord_history',
|
|
438
|
+
terraformGeneratorMetadata: {
|
|
439
|
+
providerName: 'oci'
|
|
440
|
+
},
|
|
441
|
+
provider: config.provider,
|
|
442
|
+
dependsOn: config.dependsOn,
|
|
443
|
+
count: config.count,
|
|
444
|
+
lifecycle: config.lifecycle,
|
|
445
|
+
provisioners: config.provisioners,
|
|
446
|
+
connection: config.connection,
|
|
447
|
+
forEach: config.forEach
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// ==========
|
|
452
|
+
// ATTRIBUTES
|
|
453
|
+
// ==========
|
|
454
|
+
|
|
455
|
+
// id - computed: true, optional: false, required: false
|
|
456
|
+
public get id() {
|
|
457
|
+
return this.getStringAttribute('id');
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// =========
|
|
461
|
+
// SYNTHESIS
|
|
462
|
+
// =========
|
|
463
|
+
|
|
464
|
+
protected synthesizeAttributes(): { [name: string]: any } {
|
|
465
|
+
return {
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
protected synthesizeHclAttributes(): { [name: string]: any } {
|
|
470
|
+
const attrs = {
|
|
471
|
+
};
|
|
472
|
+
return attrs;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
"
|
|
476
|
+
`;
|
|
477
|
+
|
|
478
|
+
exports[`case-insensitive base name collision: data-oci-load-balancer-backend-sets 1`] = `
|
|
479
|
+
"// https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/load_balancer_backend_sets
|
|
480
|
+
// generated from terraform resource schema
|
|
481
|
+
|
|
482
|
+
import { Construct } from 'constructs';
|
|
483
|
+
import * as cdktn from 'cdktn';
|
|
484
|
+
|
|
485
|
+
// Configuration
|
|
486
|
+
|
|
487
|
+
export interface DataOciLoadBalancerBackendSetsConfig extends cdktn.TerraformMetaArguments {
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Represents a {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/load_balancer_backend_sets oci_load_balancer_backend_sets}
|
|
492
|
+
*/
|
|
493
|
+
export class DataOciLoadBalancerBackendSets extends cdktn.TerraformDataSource {
|
|
494
|
+
|
|
495
|
+
// =================
|
|
496
|
+
// STATIC PROPERTIES
|
|
497
|
+
// =================
|
|
498
|
+
public static readonly tfResourceType = "oci_load_balancer_backend_sets";
|
|
499
|
+
|
|
500
|
+
// ==============
|
|
501
|
+
// STATIC Methods
|
|
502
|
+
// ==============
|
|
503
|
+
/**
|
|
504
|
+
* Generates CDKTN code for importing a DataOciLoadBalancerBackendSets resource upon running "cdktn plan <stack-name>"
|
|
505
|
+
* @param scope The scope in which to define this construct
|
|
506
|
+
* @param importToId The construct id used in the generated config for the DataOciLoadBalancerBackendSets to import
|
|
507
|
+
* @param importFromId The id of the existing DataOciLoadBalancerBackendSets that should be imported. Refer to the {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/load_balancer_backend_sets#import import section} in the documentation of this resource for the id to use
|
|
508
|
+
* @param provider? Optional instance of the provider where the DataOciLoadBalancerBackendSets to import is found
|
|
509
|
+
*/
|
|
510
|
+
public static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktn.TerraformProvider) {
|
|
511
|
+
return new cdktn.ImportableResource(scope, importToId, { terraformResourceType: "oci_load_balancer_backend_sets", importId: importFromId, provider });
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// ===========
|
|
515
|
+
// INITIALIZER
|
|
516
|
+
// ===========
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Create a new {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/load_balancer_backend_sets oci_load_balancer_backend_sets} Data Source
|
|
520
|
+
*
|
|
521
|
+
* @param scope The scope in which to define this construct
|
|
522
|
+
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
|
|
523
|
+
* @param options DataOciLoadBalancerBackendSetsConfig = {}
|
|
524
|
+
*/
|
|
525
|
+
public constructor(scope: Construct, id: string, config: DataOciLoadBalancerBackendSetsConfig = {}) {
|
|
526
|
+
super(scope, id, {
|
|
527
|
+
terraformResourceType: 'oci_load_balancer_backend_sets',
|
|
528
|
+
terraformGeneratorMetadata: {
|
|
529
|
+
providerName: 'oci'
|
|
530
|
+
},
|
|
531
|
+
provider: config.provider,
|
|
532
|
+
dependsOn: config.dependsOn,
|
|
533
|
+
count: config.count,
|
|
534
|
+
lifecycle: config.lifecycle,
|
|
535
|
+
provisioners: config.provisioners,
|
|
536
|
+
connection: config.connection,
|
|
537
|
+
forEach: config.forEach
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
// ==========
|
|
542
|
+
// ATTRIBUTES
|
|
543
|
+
// ==========
|
|
544
|
+
|
|
545
|
+
// id - computed: true, optional: false, required: false
|
|
546
|
+
public get id() {
|
|
547
|
+
return this.getStringAttribute('id');
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// =========
|
|
551
|
+
// SYNTHESIS
|
|
552
|
+
// =========
|
|
553
|
+
|
|
554
|
+
protected synthesizeAttributes(): { [name: string]: any } {
|
|
555
|
+
return {
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
protected synthesizeHclAttributes(): { [name: string]: any } {
|
|
560
|
+
const attrs = {
|
|
561
|
+
};
|
|
562
|
+
return attrs;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
"
|
|
566
|
+
`;
|
|
567
|
+
|
|
568
|
+
exports[`case-insensitive base name collision: data-oci-load-balancer-backendsets-a 1`] = `
|
|
569
|
+
"// https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/load_balancer_backendsets
|
|
570
|
+
// generated from terraform resource schema
|
|
571
|
+
|
|
572
|
+
import { Construct } from 'constructs';
|
|
573
|
+
import * as cdktn from 'cdktn';
|
|
574
|
+
|
|
575
|
+
// Configuration
|
|
576
|
+
|
|
577
|
+
export interface DataOciLoadBalancerBackendsetsAConfig extends cdktn.TerraformMetaArguments {
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Represents a {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/load_balancer_backendsets oci_load_balancer_backendsets}
|
|
582
|
+
*/
|
|
583
|
+
export class DataOciLoadBalancerBackendsetsA extends cdktn.TerraformDataSource {
|
|
584
|
+
|
|
585
|
+
// =================
|
|
586
|
+
// STATIC PROPERTIES
|
|
587
|
+
// =================
|
|
588
|
+
public static readonly tfResourceType = "oci_load_balancer_backendsets";
|
|
589
|
+
|
|
590
|
+
// ==============
|
|
591
|
+
// STATIC Methods
|
|
592
|
+
// ==============
|
|
593
|
+
/**
|
|
594
|
+
* Generates CDKTN code for importing a DataOciLoadBalancerBackendsetsA resource upon running "cdktn plan <stack-name>"
|
|
595
|
+
* @param scope The scope in which to define this construct
|
|
596
|
+
* @param importToId The construct id used in the generated config for the DataOciLoadBalancerBackendsetsA to import
|
|
597
|
+
* @param importFromId The id of the existing DataOciLoadBalancerBackendsetsA that should be imported. Refer to the {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/load_balancer_backendsets#import import section} in the documentation of this resource for the id to use
|
|
598
|
+
* @param provider? Optional instance of the provider where the DataOciLoadBalancerBackendsetsA to import is found
|
|
599
|
+
*/
|
|
600
|
+
public static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktn.TerraformProvider) {
|
|
601
|
+
return new cdktn.ImportableResource(scope, importToId, { terraformResourceType: "oci_load_balancer_backendsets", importId: importFromId, provider });
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
// ===========
|
|
605
|
+
// INITIALIZER
|
|
606
|
+
// ===========
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Create a new {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/load_balancer_backendsets oci_load_balancer_backendsets} Data Source
|
|
610
|
+
*
|
|
611
|
+
* @param scope The scope in which to define this construct
|
|
612
|
+
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
|
|
613
|
+
* @param options DataOciLoadBalancerBackendsetsAConfig = {}
|
|
614
|
+
*/
|
|
615
|
+
public constructor(scope: Construct, id: string, config: DataOciLoadBalancerBackendsetsAConfig = {}) {
|
|
616
|
+
super(scope, id, {
|
|
617
|
+
terraformResourceType: 'oci_load_balancer_backendsets',
|
|
618
|
+
terraformGeneratorMetadata: {
|
|
619
|
+
providerName: 'oci'
|
|
620
|
+
},
|
|
621
|
+
provider: config.provider,
|
|
622
|
+
dependsOn: config.dependsOn,
|
|
623
|
+
count: config.count,
|
|
624
|
+
lifecycle: config.lifecycle,
|
|
625
|
+
provisioners: config.provisioners,
|
|
626
|
+
connection: config.connection,
|
|
627
|
+
forEach: config.forEach
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
// ==========
|
|
632
|
+
// ATTRIBUTES
|
|
633
|
+
// ==========
|
|
634
|
+
|
|
635
|
+
// id - computed: true, optional: false, required: false
|
|
636
|
+
public get id() {
|
|
637
|
+
return this.getStringAttribute('id');
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
// =========
|
|
641
|
+
// SYNTHESIS
|
|
642
|
+
// =========
|
|
643
|
+
|
|
644
|
+
protected synthesizeAttributes(): { [name: string]: any } {
|
|
645
|
+
return {
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
protected synthesizeHclAttributes(): { [name: string]: any } {
|
|
650
|
+
const attrs = {
|
|
651
|
+
};
|
|
652
|
+
return attrs;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
"
|
|
656
|
+
`;
|
|
657
|
+
|
|
658
|
+
exports[`case-insensitive base name collision: index.ts 1`] = `
|
|
659
|
+
"// generated by cdktn get
|
|
660
|
+
export * as loadBalancerBackendSet from './load-balancer-backend-set';
|
|
661
|
+
export * as loadBalancerBackendsetA from './load-balancer-backendset-a';
|
|
662
|
+
export * as dataOciDevopsRepositoryMirrorRecord from './data-oci-devops-repository-mirror-record';
|
|
663
|
+
export * as dataOciDevopsRepositoryMirrorrecordHistory from './data-oci-devops-repository-mirrorrecord-history';
|
|
664
|
+
export * as dataOciLoadBalancerBackendSets from './data-oci-load-balancer-backend-sets';
|
|
665
|
+
export * as dataOciLoadBalancerBackendsetsA from './data-oci-load-balancer-backendsets-a';
|
|
666
|
+
|
|
667
|
+
"
|
|
668
|
+
`;
|
|
669
|
+
|
|
670
|
+
exports[`case-insensitive base name collision: lazy-index.ts 1`] = `
|
|
671
|
+
"// generated by cdktn get
|
|
672
|
+
Object.defineProperty(exports, 'loadBalancerBackendSet', { get: function () { return require('./load-balancer-backend-set'); } });
|
|
673
|
+
Object.defineProperty(exports, 'loadBalancerBackendsetA', { get: function () { return require('./load-balancer-backendset-a'); } });
|
|
674
|
+
Object.defineProperty(exports, 'dataOciDevopsRepositoryMirrorRecord', { get: function () { return require('./data-oci-devops-repository-mirror-record'); } });
|
|
675
|
+
Object.defineProperty(exports, 'dataOciDevopsRepositoryMirrorrecordHistory', { get: function () { return require('./data-oci-devops-repository-mirrorrecord-history'); } });
|
|
676
|
+
Object.defineProperty(exports, 'dataOciLoadBalancerBackendSets', { get: function () { return require('./data-oci-load-balancer-backend-sets'); } });
|
|
677
|
+
Object.defineProperty(exports, 'dataOciLoadBalancerBackendsetsA', { get: function () { return require('./data-oci-load-balancer-backendsets-a'); } });
|
|
678
|
+
|
|
679
|
+
"
|
|
680
|
+
`;
|
|
681
|
+
|
|
682
|
+
exports[`case-insensitive base name collision: load-balancer-backend-set 1`] = `
|
|
683
|
+
"// https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/load_balancer_backend_set
|
|
684
|
+
// generated from terraform resource schema
|
|
685
|
+
|
|
686
|
+
import { Construct } from 'constructs';
|
|
687
|
+
import * as cdktn from 'cdktn';
|
|
688
|
+
|
|
689
|
+
// Configuration
|
|
690
|
+
|
|
691
|
+
export interface LoadBalancerBackendSetConfig extends cdktn.TerraformMetaArguments {
|
|
692
|
+
/**
|
|
693
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/load_balancer_backend_set#name LoadBalancerBackendSet#name}
|
|
694
|
+
*/
|
|
695
|
+
readonly name: string;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Represents a {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/load_balancer_backend_set oci_load_balancer_backend_set}
|
|
700
|
+
*/
|
|
701
|
+
export class LoadBalancerBackendSet extends cdktn.TerraformResource {
|
|
702
|
+
|
|
703
|
+
// =================
|
|
704
|
+
// STATIC PROPERTIES
|
|
705
|
+
// =================
|
|
706
|
+
public static readonly tfResourceType = "oci_load_balancer_backend_set";
|
|
707
|
+
|
|
708
|
+
// ==============
|
|
709
|
+
// STATIC Methods
|
|
710
|
+
// ==============
|
|
711
|
+
/**
|
|
712
|
+
* Generates CDKTN code for importing a LoadBalancerBackendSet resource upon running "cdktn plan <stack-name>"
|
|
713
|
+
* @param scope The scope in which to define this construct
|
|
714
|
+
* @param importToId The construct id used in the generated config for the LoadBalancerBackendSet to import
|
|
715
|
+
* @param importFromId The id of the existing LoadBalancerBackendSet that should be imported. Refer to the {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/load_balancer_backend_set#import import section} in the documentation of this resource for the id to use
|
|
716
|
+
* @param provider? Optional instance of the provider where the LoadBalancerBackendSet to import is found
|
|
717
|
+
*/
|
|
718
|
+
public static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktn.TerraformProvider) {
|
|
719
|
+
return new cdktn.ImportableResource(scope, importToId, { terraformResourceType: "oci_load_balancer_backend_set", importId: importFromId, provider });
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
// ===========
|
|
723
|
+
// INITIALIZER
|
|
724
|
+
// ===========
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Create a new {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/load_balancer_backend_set oci_load_balancer_backend_set} Resource
|
|
728
|
+
*
|
|
729
|
+
* @param scope The scope in which to define this construct
|
|
730
|
+
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
|
|
731
|
+
* @param options LoadBalancerBackendSetConfig
|
|
732
|
+
*/
|
|
733
|
+
public constructor(scope: Construct, id: string, config: LoadBalancerBackendSetConfig) {
|
|
734
|
+
super(scope, id, {
|
|
735
|
+
terraformResourceType: 'oci_load_balancer_backend_set',
|
|
736
|
+
terraformGeneratorMetadata: {
|
|
737
|
+
providerName: 'oci'
|
|
738
|
+
},
|
|
739
|
+
provider: config.provider,
|
|
740
|
+
dependsOn: config.dependsOn,
|
|
741
|
+
count: config.count,
|
|
742
|
+
lifecycle: config.lifecycle,
|
|
743
|
+
provisioners: config.provisioners,
|
|
744
|
+
connection: config.connection,
|
|
745
|
+
forEach: config.forEach
|
|
746
|
+
});
|
|
747
|
+
this._name = config.name;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
// ==========
|
|
751
|
+
// ATTRIBUTES
|
|
752
|
+
// ==========
|
|
753
|
+
|
|
754
|
+
// name - computed: false, optional: false, required: true
|
|
755
|
+
private _name?: string;
|
|
756
|
+
public get name() {
|
|
757
|
+
return this.getStringAttribute('name');
|
|
758
|
+
}
|
|
759
|
+
public set name(value: string) {
|
|
760
|
+
this._name = value;
|
|
761
|
+
}
|
|
762
|
+
// Temporarily expose input value. Use with caution.
|
|
763
|
+
public get nameInput() {
|
|
764
|
+
return this._name;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
// =========
|
|
768
|
+
// SYNTHESIS
|
|
769
|
+
// =========
|
|
770
|
+
|
|
771
|
+
protected synthesizeAttributes(): { [name: string]: any } {
|
|
772
|
+
return {
|
|
773
|
+
name: cdktn.stringToTerraform(this._name),
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
protected synthesizeHclAttributes(): { [name: string]: any } {
|
|
778
|
+
const attrs = {
|
|
779
|
+
name: {
|
|
780
|
+
value: cdktn.stringToHclTerraform(this._name),
|
|
781
|
+
isBlock: false,
|
|
782
|
+
type: "simple",
|
|
783
|
+
storageClassType: "string",
|
|
784
|
+
},
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
// remove undefined attributes
|
|
788
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined ))
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
"
|
|
792
|
+
`;
|
|
793
|
+
|
|
794
|
+
exports[`case-insensitive base name collision: load-balancer-backendset-a 1`] = `
|
|
795
|
+
"// https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/load_balancer_backendset
|
|
796
|
+
// generated from terraform resource schema
|
|
797
|
+
|
|
798
|
+
import { Construct } from 'constructs';
|
|
799
|
+
import * as cdktn from 'cdktn';
|
|
800
|
+
|
|
801
|
+
// Configuration
|
|
802
|
+
|
|
803
|
+
export interface LoadBalancerBackendsetAConfig extends cdktn.TerraformMetaArguments {
|
|
804
|
+
/**
|
|
805
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/load_balancer_backendset#name LoadBalancerBackendsetA#name}
|
|
806
|
+
*/
|
|
807
|
+
readonly name: string;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Represents a {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/load_balancer_backendset oci_load_balancer_backendset}
|
|
812
|
+
*/
|
|
813
|
+
export class LoadBalancerBackendsetA extends cdktn.TerraformResource {
|
|
814
|
+
|
|
815
|
+
// =================
|
|
816
|
+
// STATIC PROPERTIES
|
|
817
|
+
// =================
|
|
818
|
+
public static readonly tfResourceType = "oci_load_balancer_backendset";
|
|
819
|
+
|
|
820
|
+
// ==============
|
|
821
|
+
// STATIC Methods
|
|
822
|
+
// ==============
|
|
823
|
+
/**
|
|
824
|
+
* Generates CDKTN code for importing a LoadBalancerBackendsetA resource upon running "cdktn plan <stack-name>"
|
|
825
|
+
* @param scope The scope in which to define this construct
|
|
826
|
+
* @param importToId The construct id used in the generated config for the LoadBalancerBackendsetA to import
|
|
827
|
+
* @param importFromId The id of the existing LoadBalancerBackendsetA that should be imported. Refer to the {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/load_balancer_backendset#import import section} in the documentation of this resource for the id to use
|
|
828
|
+
* @param provider? Optional instance of the provider where the LoadBalancerBackendsetA to import is found
|
|
829
|
+
*/
|
|
830
|
+
public static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktn.TerraformProvider) {
|
|
831
|
+
return new cdktn.ImportableResource(scope, importToId, { terraformResourceType: "oci_load_balancer_backendset", importId: importFromId, provider });
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
// ===========
|
|
835
|
+
// INITIALIZER
|
|
836
|
+
// ===========
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* Create a new {@link https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/load_balancer_backendset oci_load_balancer_backendset} Resource
|
|
840
|
+
*
|
|
841
|
+
* @param scope The scope in which to define this construct
|
|
842
|
+
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
|
|
843
|
+
* @param options LoadBalancerBackendsetAConfig
|
|
844
|
+
*/
|
|
845
|
+
public constructor(scope: Construct, id: string, config: LoadBalancerBackendsetAConfig) {
|
|
846
|
+
super(scope, id, {
|
|
847
|
+
terraformResourceType: 'oci_load_balancer_backendset',
|
|
848
|
+
terraformGeneratorMetadata: {
|
|
849
|
+
providerName: 'oci'
|
|
850
|
+
},
|
|
851
|
+
provider: config.provider,
|
|
852
|
+
dependsOn: config.dependsOn,
|
|
853
|
+
count: config.count,
|
|
854
|
+
lifecycle: config.lifecycle,
|
|
855
|
+
provisioners: config.provisioners,
|
|
856
|
+
connection: config.connection,
|
|
857
|
+
forEach: config.forEach
|
|
858
|
+
});
|
|
859
|
+
this._name = config.name;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
// ==========
|
|
863
|
+
// ATTRIBUTES
|
|
864
|
+
// ==========
|
|
865
|
+
|
|
866
|
+
// name - computed: false, optional: false, required: true
|
|
867
|
+
private _name?: string;
|
|
868
|
+
public get name() {
|
|
869
|
+
return this.getStringAttribute('name');
|
|
870
|
+
}
|
|
871
|
+
public set name(value: string) {
|
|
872
|
+
this._name = value;
|
|
873
|
+
}
|
|
874
|
+
// Temporarily expose input value. Use with caution.
|
|
875
|
+
public get nameInput() {
|
|
876
|
+
return this._name;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
// =========
|
|
880
|
+
// SYNTHESIS
|
|
881
|
+
// =========
|
|
882
|
+
|
|
883
|
+
protected synthesizeAttributes(): { [name: string]: any } {
|
|
884
|
+
return {
|
|
885
|
+
name: cdktn.stringToTerraform(this._name),
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
protected synthesizeHclAttributes(): { [name: string]: any } {
|
|
890
|
+
const attrs = {
|
|
891
|
+
name: {
|
|
892
|
+
value: cdktn.stringToHclTerraform(this._name),
|
|
893
|
+
isBlock: false,
|
|
894
|
+
type: "simple",
|
|
895
|
+
storageClassType: "string",
|
|
896
|
+
},
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
// remove undefined attributes
|
|
900
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined ))
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
"
|
|
904
|
+
`;
|
|
905
|
+
|
|
298
906
|
exports[`computed complex attribute 1`] = `
|
|
299
907
|
"// https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/computed_complex
|
|
300
908
|
// generated from terraform resource schema
|
package/src/get/__tests__/generator/fixtures/case-insensitive-base-name-collision.test.fixture.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider_schemas": {
|
|
3
|
+
"registry.terraform.io/oracle/oci": {
|
|
4
|
+
"resource_schemas": {
|
|
5
|
+
"oci_load_balancer_backend_set": {
|
|
6
|
+
"version": 1,
|
|
7
|
+
"block": {
|
|
8
|
+
"attributes": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"required": true
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"block_types": {}
|
|
16
|
+
},
|
|
17
|
+
"oci_load_balancer_backendset": {
|
|
18
|
+
"version": 1,
|
|
19
|
+
"block": {
|
|
20
|
+
"attributes": {
|
|
21
|
+
"name": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"required": true
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"block_types": {}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"data_source_schemas": {
|
|
31
|
+
"oci_devops_repository_mirror_record": {
|
|
32
|
+
"version": 1,
|
|
33
|
+
"block": {
|
|
34
|
+
"attributes": {
|
|
35
|
+
"id": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"computed": true
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"block_types": {}
|
|
42
|
+
},
|
|
43
|
+
"oci_devops_repository_mirrorrecord_history": {
|
|
44
|
+
"version": 1,
|
|
45
|
+
"block": {
|
|
46
|
+
"attributes": {
|
|
47
|
+
"id": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"computed": true
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"block_types": {}
|
|
54
|
+
},
|
|
55
|
+
"oci_load_balancer_backend_sets": {
|
|
56
|
+
"version": 1,
|
|
57
|
+
"block": {
|
|
58
|
+
"attributes": {
|
|
59
|
+
"id": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"computed": true
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"block_types": {}
|
|
66
|
+
},
|
|
67
|
+
"oci_load_balancer_backendsets": {
|
|
68
|
+
"version": 1,
|
|
69
|
+
"block": {
|
|
70
|
+
"attributes": {
|
|
71
|
+
"id": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"computed": true
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"block_types": {}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|