-
Notifications
You must be signed in to change notification settings - Fork 5
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
Enable autoTrim
behavior by default
#227
Conversation
This PR enables the aws-native `AutoNaming.autoTrim` feature by default. It does this by creating an aws-native provider by default if the user does not provide one. I've updated tests to remove the workarounds. **Alternatives** 1. We could require that the user configure this themselves. 2. Is there a way to set config values programatically? closes #62, closes #70
e208e8e
to
42113c6
Compare
src/stack.ts
Outdated
const region = native.config.region ?? process.env.AWS_REGION ?? process.env.AWS_DEFAULT_REGION!; | ||
// If the user has not provided any providers, we will create an aws-native one by default in order | ||
// to enable the autoNaming feature. | ||
const providers = props?.providers ?? [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a bit more precise maybe? If props resets the classic provider, it might still be able to merge in the config for the native provider? Probably a rare use case though, feel free to disregard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's a good call. I've updated it to handle that case.
This PR has been shipped in release v1.0.0. |
This PR enables the aws-native
AutoNaming.autoTrim
feature by default.It does this by creating an aws-native provider by default if the user
does not provide one.
I've updated tests to remove the workarounds.
Alternatives
closes #62, closes #70