-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CDK Aspects #282
Comments
Closed
This is really interesting! Will we be able to run test against the code for compliance? For example, if corp policy is that no IGW shall be attached to VPCs, if the code fails, it does not deploy the stack? |
Yap. That’s the idea. Great example! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environments define some abstract "place" where a copy of a piece of software is deployed (for now, let's leave it undefined what the mapping between Environments and accounts/regions is).
We'll probably want to define some cross-cutting concerns that are particular attributes of individual environments. Some potential use cases:
COMPLIANCE (for prod environments)
COST/CONVENIENCE (for dev environments)
environment.cheap == true
, only start 1 instance instead of multiple, smaller instance sizes, lower provisioned throughput, ...We'd want to toggle these things on a per-environment basis. Would be ideal if we could enforce them without Construct support. Would be even better if we could enforce/validate them (maybe using AWS Policy?)
CDK aspects can be attached to constructs and can register to events such as
afterAddChild
,beforeValidation
,beforeSynthesis
,afterSynthesis
. Aspects can inspect the tree or synthesized artifacts and perform validations or apply policy on the tree.Example of aspects:
[Add yours]
The text was updated successfully, but these errors were encountered: