Specify allowed values for fields in AWS CDK
Example create database user:
- Allowed values for databaseName are admin or $external in Admin API documentation (https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Database-Users/operation/createDatabaseUser)
- Corresponding CDK construct property (https://constructs.dev/packages/@mongodbatlas-awscdk/database-user/v/1.1.0/api/CfnDatabaseUserProps?lang=typescript#property.databaseName) only specifies string without further information
It would be nice to get IntelliSense in IDEs for fields which are enums behind the scenes.
Alternatively, allowed values should be included in error messages. That would make debugging at runtime easier at least.
1
vote
Sebastian
shared this idea
-
AdminZuhair (Admin, MongoDB) commented
Thanks Sebastian, exposing more details automatically in error message for MongoDB Atlas integrations with CDK is an on-going thread we have with AWS team. Looking forward to improving this workflow over next few quarters.