awslabs / landing-zone-accelerator-on-aws

Deploy a multi-account cloud foundation to support highly-regulated workloads and complex compliance requirements.
https://aws.amazon.com/solutions/implementations/landing-zone-accelerator-on-aws/
Apache License 2.0
559 stars 447 forks source link

network-config, customisaton-config and replacements-config interfaces are not exported #514

Open srobroek opened 3 months ago

srobroek commented 3 months ago

Describe the bug The interfaces in config/lib/models/network-config.ts, customization-config.ts and replacements-config are not exported. This is not consistent with the standard exports defined in config/index.ts, where the classes are exported.

To Reproduce import {INetworkConfig} from '@aws-accelerator/config/'does not work.

import {INetworkConfig} from '@aws-accelerator/config/lib/models/network-config.ts' does work. Expected behavior

The Interfaces related to the above classes should be exported through the index and be importable through the package.

Please complete the following information about the solution:

Additional context Add any other context about the problem here.

srobroek commented 3 months ago

A workaround i've implemented for this for now is by creating a separate ts file which exports the Types directly, which is working.

export * as net from '@aws-accelerator/config/lib/models/network-config.js'
export * as customisation from '@aws-accelerator/config/lib/models/customizations-config.js'
export * as replacements from '@aws-accelerator/config/lib/models/replacements-config.js'

and in the actual source:

import * as lzaCustom from '../schemas/customLzaConfig.js'

        const test: lzaCustom.net.IDefaultVpcsConfig = {
            delete: true,
            excludeAccounts: ['bob']

        }