aws-cloudformation-user-guide
aws-cloudformation-user-guide copied to clipboard
Note/maintenance window targets
Issue #, if available:
Description of changes:
- [OUTDATED THIS DOES NOT HAVE THE INTENDED EFFECT REFER TO LATEST COMMENT in PR FOR WORKING EXAMPLE] Add note on how to target all
Values
for a particularKey
. This is achieved by specifyingValues
with a*
. In the console,Values
isOptional
but in CloudFormation,Values
is aRequired
attribute and we cannot pass in an empty string. To replicate the console behaviour, we must specify a*
. Mentioning this in the documentation could be useful for those who would like to target allValues
for a particularKey
- Style fixes by removing trailing whitespaces
Console reference:
- The input box shows
Tag value (optional)
- Upon clicking
Add
, we seeName: (All values)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
I realised that adding the *
does not have the intended effect of targeting all Values. Will need to take a second look at it
Made some changes based on the example at AWS docs: Register targets using a group of tag keys (without tag values) and the solution works now. Example snippet:
MaintenanceWindowTargetEC2:
Type: AWS::SSM::MaintenanceWindowTarget
Properties:
Description: target ec2 instances
Name: target-all-values
ResourceType: INSTANCE
Targets:
- Key: tag-key
Values:
- Name
WindowId: !Ref MaintenanceWindow
Closing this issue or pull request in advance of archiving this repo. For more information about the decision to archive this repo (and others in the "awsdocs" org), see the announcement on the AWS News Blog.