-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SAM allows an easy way to create a usage plan and API key, by defining the `UsagePlan` property in an `Api` resource. Unfortunately you can't use an `!If` function with it do conditionally create it. This removes the use of it and defines the resources requied using plain old CloudFormation. This allows us to only create them when we want. Using the previous method would have caused a usage plan and api key to be created in all envs including prod. This felt like murky ground - the non dev api's would still be private so it wouldn't have been an issue, but feels safer to only create them when actually needed.
- Loading branch information
Showing
2 changed files
with
62 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters