-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cli): statically guarantee that assets aren't forgotten around …
…`makeBodyParameter` The protocol of `makeBodyParameter` has 2 requirements: - Stack assets must already be uploaded (because the stack template will be among them). - It may produce a new stack template asset to be uploaded. This protocol was easy to misuse, so change the API to make it more resilient to misuse: - Before calling, `makeBodyParameter` now requires an `AssetsPublishedProof` value. This is a value that can only be produced by calling certain functions that publish assets, and cannot be constructed from any other source location than the module that defines it. This ensures that `makeBodyParameter` cannot be called without the uploading of assets. - The return value of `makeBodyParameter` no longer is just CloudFormation API parameters, with the implicit assumption that any assets added to the `AssetManifestBuilder` would be uploaded as well: instead, the return value is either CloudFormation parameters, or an object with a function that trades adding to an `AssetManifestBuilder` for the CloudFormation parameters.
- Loading branch information
Showing
5 changed files
with
145 additions
and
72 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
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
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