-
Notifications
You must be signed in to change notification settings - Fork 31
[AWS::SSM::Document] Support named document version updates without changing default version #205
Description
When setting UpdateMethod to NewVersion while updating an existing named SSM document, the current behaviour is to also automatically set the $DEFAULT version to the new latest version [1]. This extra effect is not always desirable. For example, you may own a document that has shared the $DEFAULT version with others (either publicly or with other specific AWS accounts), and by updating in this way the new document version will immediately be shared without giving you (the publisher) the chance to test it first.
It would be good to have an option to opt-out of this automatic version update, perhaps as a new UpdateMethod flag (NewVersionNoUpdateDefaultVersion or something...). This would enable the following workflow:
- Create new document using CloudFormation (implicitly setting
$DEFAULTand$LATESTversions). - Share
$DEFAULTversion of document to end users. - Update document with new version using CloudFormation (updating
$LATESTversion only) - Test changes to
$LATESTversion. - Update
$DEFAULTversion to match$LATEST
NB: Currently steps (2) and (5) require custom resources and eventually it would be good to have a new CloudFormation resource that can handle document sharing, however this feature would still help with step (1).
[1] From the CloudFormation docs:
If the document resource you specify in your template already exists, this parameter determines whether a new version of the existing document is created, or the existing document is replaced. Replace is the default method. If you specify NewVersion for the UpdateMethod parameter, and the Name of the document does not match an existing resource, a new document is created. When you specify NewVersion, the default version of the document is changed to the newly created version.