Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Add an Amazon EC2 Instance task and select the Stop Instance(s) action.
  2. Select the desired AWS region and AWS security credentials as usual.
  3. Click on the Examples button and select the Tag (key only) example filter declaration.

  4. Replace the "Environment" sample filter value for the filter "tag-key" with "Name" so that the resulting filter declaration looks as follows:

    Code Block
    languagejs
    [
      {
        "Name": "tag-key",
        "Values": ["Name"]
      }
    ]
    1. (info) Alternatively, you can select the Tag (key and value) example filter declaration with a filter "tag:Name" and a wildcard value "*" as follows:

      Code Block
      languagejs
      [
        {
          "Name": "tag:Name",
          "Values": ["*"]
        }
      ]


  5. Save the task.

  6. Due to "Name" being a default tag available for every resource, when you run the task, it will target all EC2 instances in this region, no matter what their actual name is.

 


Tip
titlePrevent failing builds in regions without resources

You can also check Don't fail for empty filter result to prevent the task failing if no matching resources are found.

...

Page Properties
hiddentrue


Related issues
Jira Legacy
serverJIRA (utoolity.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdfac61c2e-db0a-39da-bb3c-e0dc0ef556f0
keyUAA-93

...



[  {    "Name": "tag:Name",    "Values": ["*"]  }]