-
Notifications
You must be signed in to change notification settings - Fork 3
Description
We are trying to use both versions of CDK: aws-cdk-lib/data-zone and cdklabs/cdk-data-zone. Due to a issue with the official version, we wanted to use cdklabs to only create an environment. However, we noticed that while "datazone.CfnEnvironment" function in aws-cdk-lib uses string as identifier for domains and projects, the cdklabs uses custom types Iproject and Idomain.
aws-cdk-lib: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_datazone.CfnEnvironment.html
cdklabs: https://github.com/cdklabs/cdk-data-zone/blob/main/src/environment.ts
Example:
// Create a Project within the Domain
// This is of type IProject
const project = domain.createProject('test-project', {
name: 'test-project',
glossaries: Glossaries.fromFile('./resources/glossaries.json'),
forms: Forms.fromFile('./resources/form-metadata.json'),
});
// Create an Environment Profile for the Project
// This is of type IEnvironmentProfile
const environmentProfile = new EnvironmentProfile(stack, 'EnvironmentProfile', {
name: 'dev',
blueprint,
project,
});
// Create an Environment using the Environment Profile
// project and environmentProfile need to be passed as type = IProject and IEnvironmentProfile
new Environment(stack, 'environment', {
project,
name: 'DEV',
environmentProfile,
});
However, if I create the project using aws-cdk-lib
import { aws_datazone as datazone } from 'aws-cdk-lib';
const cfnProject = new datazone.CfnProject(this, 'MyCfnProject', {
domainIdentifier: 'domainIdentifier',
name: 'name',
// the properties below are optional
description: 'description',
glossaryTerms: ['glossaryTerms'],
});
I cant pass cfnProject to cdklabs's new Environment function since it expects IProject.
Is this possible to make the 2 libraries being able to inter-operate?