(aws-cdk): (To be able to create in the same stack: an EFS, EFS access point, and EFS file system policy to govern that access point) #27123
Labels
@aws-cdk/aws-efs
Related to Amazon Elastic File System
feature-request
A feature should be added or improved.
Describe the feature
I want to create an EFS, EFS access points, and EFS file system policies that govern those access points in the same stack.
Use Case
This causes a circular dependency error (as we refer to the access point ID in the policy).
The current (ridiculous) workaround if you don't want to do things manually is to create the EFS and access points in one stack, then in a new stack, use a lambda to query the now-created EFS by name, then retrieve the access points to pull the ids off of. All up it's ~250 lines of code that shouldn't need to be there.
Proposed Solution
Split efs policy out to a separate resource.
Other Information
I encountered this while using CDK, expecting it to work a certain way. The underlying issue may be a CloudFormation issue more than the CDK, but the proposal in CloudFormation has been dead since 2021: aws-cloudformation/cloudformation-coverage-roadmap#900
Acknowledgements
CDK version used
2.95.1 (build ae455d8)
Environment details (OS name and version, etc.)
macOS Ventura 13.5.1 (22G90)
The text was updated successfully, but these errors were encountered: