@cdktn/provider-generator 0.23.0 → 0.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/.spec.swcrc +22 -0
  2. package/build/get/__tests__/constructs-maker.test.js +2 -2
  3. package/build/get/__tests__/generator/complex-computed-types.test.js +4 -3
  4. package/build/get/__tests__/generator/deep-nested-attributes.test.js +5 -4
  5. package/build/get/__tests__/generator/description-escaping.test.js +6 -5
  6. package/build/get/__tests__/generator/empty-provider-resources.test.js +4 -3
  7. package/build/get/__tests__/generator/export-sharding.test.js +5 -4
  8. package/build/get/__tests__/generator/import-style.test.d.ts +2 -0
  9. package/build/get/__tests__/generator/import-style.test.js +101 -0
  10. package/build/get/__tests__/generator/module-generator.test.js +18 -17
  11. package/build/get/__tests__/generator/nested-types.test.js +5 -4
  12. package/build/get/__tests__/generator/provider.test.js +5 -4
  13. package/build/get/__tests__/generator/resource-types.test.js +8 -7
  14. package/build/get/__tests__/generator/skipped-attributes.test.js +5 -4
  15. package/build/get/__tests__/generator/types.test.js +51 -28
  16. package/build/get/__tests__/generator/versions-file.test.js +4 -3
  17. package/build/get/__tests__/util.d.ts +9 -0
  18. package/build/get/__tests__/util.js +24 -2
  19. package/build/get/constructs-maker.d.ts +5 -1
  20. package/build/get/constructs-maker.js +5 -2
  21. package/build/get/generator/emitter/struct-emitter.d.ts +2 -1
  22. package/build/get/generator/emitter/struct-emitter.js +12 -9
  23. package/build/get/generator/module-generator.js +3 -3
  24. package/build/get/generator/provider-generator.d.ts +9 -1
  25. package/build/get/generator/provider-generator.js +9 -6
  26. package/build/get/generator/resource-parser.d.ts +1 -0
  27. package/build/get/generator/resource-parser.js +29 -3
  28. package/eslint.config.mjs +13 -0
  29. package/jest.config.js +16 -9
  30. package/package.json +8 -9
  31. package/src/__tests__/__snapshots__/edge-provider-schema.test.ts.snap +8 -8
  32. package/src/__tests__/__snapshots__/provider.test.ts.snap +617 -617
  33. package/src/get/__tests__/generator/__snapshots__/complex-computed-types.test.ts.snap +1 -1
  34. package/src/get/__tests__/generator/__snapshots__/export-sharding.test.ts.snap +268 -268
  35. package/src/get/__tests__/generator/__snapshots__/module-generator.test.ts.snap +355 -355
  36. package/src/get/__tests__/generator/__snapshots__/nested-types.test.ts.snap +2 -2
  37. package/src/get/__tests__/generator/__snapshots__/resource-types.test.ts.snap +20 -20
  38. package/src/get/__tests__/generator/__snapshots__/skipped-attributes.test.ts.snap +3 -3
  39. package/src/get/__tests__/generator/__snapshots__/types.test.ts.snap +633 -25
  40. 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/index';
661
+ export * as loadBalancerBackendsetA from './load-balancer-backendset-a/index';
662
+ export * as dataOciDevopsRepositoryMirrorRecord from './data-oci-devops-repository-mirror-record/index';
663
+ export * as dataOciDevopsRepositoryMirrorrecordHistory from './data-oci-devops-repository-mirrorrecord-history/index';
664
+ export * as dataOciLoadBalancerBackendSets from './data-oci-load-balancer-backend-sets/index';
665
+ export * as dataOciLoadBalancerBackendsetsA from './data-oci-load-balancer-backendsets-a/index';
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
@@ -411,7 +1019,7 @@ export class ComputedComplexEgressList extends cdktn.ComplexList {
411
1019
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
412
1020
  */
413
1021
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
414
- super(terraformResource, terraformAttribute, wrapsSet)
1022
+ super(terraformResource, terraformAttribute, wrapsSet);
415
1023
  }
416
1024
 
417
1025
  /**
@@ -577,7 +1185,7 @@ export class ComputedComplexNestedResourcesAutoscalingGroupsList extends cdktn.C
577
1185
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
578
1186
  */
579
1187
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
580
- super(terraformResource, terraformAttribute, wrapsSet)
1188
+ super(terraformResource, terraformAttribute, wrapsSet);
581
1189
  }
582
1190
 
583
1191
  /**
@@ -658,7 +1266,7 @@ export class ComputedComplexNestedResourcesList extends cdktn.ComplexList {
658
1266
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
659
1267
  */
660
1268
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
661
- super(terraformResource, terraformAttribute, wrapsSet)
1269
+ super(terraformResource, terraformAttribute, wrapsSet);
662
1270
  }
663
1271
 
664
1272
  /**
@@ -830,7 +1438,7 @@ export class BlockTypeNestedComputedListInputsStartingPositionConfigurationList
830
1438
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
831
1439
  */
832
1440
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
833
- super(terraformResource, terraformAttribute, wrapsSet)
1441
+ super(terraformResource, terraformAttribute, wrapsSet);
834
1442
  }
835
1443
 
836
1444
  /**
@@ -959,7 +1567,7 @@ export class BlockTypeNestedComputedListInputsList extends cdktn.ComplexList {
959
1567
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
960
1568
  */
961
1569
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
962
- super(terraformResource, terraformAttribute, wrapsSet)
1570
+ super(terraformResource, terraformAttribute, wrapsSet);
963
1571
  }
964
1572
 
965
1573
  /**
@@ -1454,7 +2062,7 @@ export class ComputedOptionalComplexEgressList extends cdktn.ComplexList {
1454
2062
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
1455
2063
  */
1456
2064
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
1457
- super(terraformResource, terraformAttribute, wrapsSet)
2065
+ super(terraformResource, terraformAttribute, wrapsSet);
1458
2066
  }
1459
2067
 
1460
2068
  /**
@@ -1806,7 +2414,7 @@ export class DeeplyNestedBlockTypesLifecycleRuleList extends cdktn.ComplexList {
1806
2414
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
1807
2415
  */
1808
2416
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
1809
- super(terraformResource, terraformAttribute, wrapsSet)
2417
+ super(terraformResource, terraformAttribute, wrapsSet);
1810
2418
  }
1811
2419
 
1812
2420
  /**
@@ -2371,13 +2979,13 @@ export class FunctionResource extends cdktn.TerraformResource {
2371
2979
 
2372
2980
  exports[`incompatible resource names: index.ts 1`] = `
2373
2981
  "// generated by cdktn get
2374
- export * as stringResource from './string-resource';
2375
- export * as objectResource from './object-resource';
2376
- export * as functionResource from './function-resource';
2377
- export * as staticResource from './static-resource';
2378
- export * as providerResource from './provider-resource';
2379
- export * as licenseResource from './license-resource';
2380
- export * as versionResource from './version-resource';
2982
+ export * as stringResource from './string-resource/index';
2983
+ export * as objectResource from './object-resource/index';
2984
+ export * as functionResource from './function-resource/index';
2985
+ export * as staticResource from './static-resource/index';
2986
+ export * as providerResource from './provider-resource/index';
2987
+ export * as licenseResource from './license-resource/index';
2988
+ export * as versionResource from './version-resource/index';
2381
2989
 
2382
2990
  "
2383
2991
  `;
@@ -3166,7 +3774,7 @@ export class ComplexLlListList extends cdktn.MapList {
3166
3774
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
3167
3775
  */
3168
3776
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
3169
- super(terraformResource, terraformAttribute, wrapsSet)
3777
+ super(terraformResource, terraformAttribute, wrapsSet);
3170
3778
  }
3171
3779
 
3172
3780
  /**
@@ -3185,7 +3793,7 @@ export class ComplexLlList extends cdktn.ComplexList {
3185
3793
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
3186
3794
  */
3187
3795
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
3188
- super(terraformResource, terraformAttribute, wrapsSet)
3796
+ super(terraformResource, terraformAttribute, wrapsSet);
3189
3797
  }
3190
3798
 
3191
3799
  /**
@@ -3265,7 +3873,7 @@ export class ComplexLsListList extends cdktn.MapList {
3265
3873
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
3266
3874
  */
3267
3875
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
3268
- super(terraformResource, terraformAttribute, wrapsSet)
3876
+ super(terraformResource, terraformAttribute, wrapsSet);
3269
3877
  }
3270
3878
 
3271
3879
  /**
@@ -3284,7 +3892,7 @@ export class ComplexLsList extends cdktn.ComplexList {
3284
3892
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
3285
3893
  */
3286
3894
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
3287
- super(terraformResource, terraformAttribute, wrapsSet)
3895
+ super(terraformResource, terraformAttribute, wrapsSet);
3288
3896
  }
3289
3897
 
3290
3898
  /**
@@ -3364,7 +3972,7 @@ export class ComplexSlListList extends cdktn.MapList {
3364
3972
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
3365
3973
  */
3366
3974
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
3367
- super(terraformResource, terraformAttribute, wrapsSet)
3975
+ super(terraformResource, terraformAttribute, wrapsSet);
3368
3976
  }
3369
3977
 
3370
3978
  /**
@@ -3383,7 +3991,7 @@ export class ComplexSlList extends cdktn.ComplexList {
3383
3991
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
3384
3992
  */
3385
3993
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
3386
- super(terraformResource, terraformAttribute, wrapsSet)
3994
+ super(terraformResource, terraformAttribute, wrapsSet);
3387
3995
  }
3388
3996
 
3389
3997
  /**
@@ -3463,7 +4071,7 @@ export class ComplexSsListList extends cdktn.MapList {
3463
4071
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
3464
4072
  */
3465
4073
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
3466
- super(terraformResource, terraformAttribute, wrapsSet)
4074
+ super(terraformResource, terraformAttribute, wrapsSet);
3467
4075
  }
3468
4076
 
3469
4077
  /**
@@ -3482,7 +4090,7 @@ export class ComplexSsList extends cdktn.ComplexList {
3482
4090
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
3483
4091
  */
3484
4092
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
3485
- super(terraformResource, terraformAttribute, wrapsSet)
4093
+ super(terraformResource, terraformAttribute, wrapsSet);
3486
4094
  }
3487
4095
 
3488
4096
  /**
@@ -3728,7 +4336,7 @@ export class DataAirbyteSourceSchemaCatalogSyncCatalogList extends cdktn.Complex
3728
4336
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
3729
4337
  */
3730
4338
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
3731
- super(terraformResource, terraformAttribute, wrapsSet)
4339
+ super(terraformResource, terraformAttribute, wrapsSet);
3732
4340
  }
3733
4341
 
3734
4342
  /**
@@ -5491,7 +6099,7 @@ export class BlockTypeSetListTimeoutsSetList extends cdktn.ComplexList {
5491
6099
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
5492
6100
  */
5493
6101
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
5494
- super(terraformResource, terraformAttribute, wrapsSet)
6102
+ super(terraformResource, terraformAttribute, wrapsSet);
5495
6103
  }
5496
6104
 
5497
6105
  /**
@@ -5607,7 +6215,7 @@ export class BlockTypeSetListTimeoutsListStructList extends cdktn.ComplexList {
5607
6215
  * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
5608
6216
  */
5609
6217
  constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
5610
- super(terraformResource, terraformAttribute, wrapsSet)
6218
+ super(terraformResource, terraformAttribute, wrapsSet);
5611
6219
  }
5612
6220
 
5613
6221
  /**