aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

Describe exisiting resources

Open ywauto83 opened this issue 6 years ago • 1 comments

When creating an s3 bucket or a IAM role viA CDK, I'd like to check if the resource with the same exists. It seems CDK doesn't provide this yet, which is quite common in AWS DSK.

Use Case

When creating a new resource, CDK should have a way to "describe the resource" to check if a resource (e.g, s3, iam role, ddb) is present. Then it's possible to implement a if/then/else logic to create a new resource or use the existing resource.

Proposed Solution

Similar to AWS SDK, implementing "describe resource" construct

Other

  • [ ] :wave: I may be able to implement this feature request
  • [ ] :warning: This feature might incur a breaking change

This is a :rocket: Feature Request

ywauto83 avatar Mar 21 '20 23:03 ywauto83

We are able to provide support for specific resources (like VPC for example) but not a general purpose facility.

eladb avatar Mar 31 '20 08:03 eladb