filter to find ec2 instance with an empty tag value.
See original GitHub issueHi All, I am trying to find out the instance which have “Test_Tagcc” tag and having no values. Below is the policy. Can you please help me out what is the issue with it. when i do the dry run it lists all the instances.
policies:
- name: ec2-tag-compliance
mode:
role: arn:aws:iam::{AccountID}:role/CloudCustodian
type: periodic
schedule: 'cron(0/5 * * * ? *)'
resource: ec2
comment: |
Find all (non-ASG) instances that are not conformant
to tagging policies, and stop them.
filters:
- "tag:aws:autoscaling:groupName": absent
- or:
- "tag:Test_Tagcc": empty
actions:
- stop
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
List and filter your resources - Amazon Elastic Compute Cloud
When searching by tag, you can use the following values: (empty) – Find all resources with the specified tag key, but there must...
Read more >python - Trying to Filter on 'Not tagged' AND 'Empty value' EC2 ...
Just use describe_instances() to list all the tags, running state and build control from there.
Read more >How to filter an instance based on empty tag value?? - Google Groups
Hi All, I am trying to find out the instance which have "Test_Tagcc" tag and having no values. Below is the policy. Can...
Read more >How to use the AWS CLI to find untagged instances -
Use the AWS CLI to find instances without a Name tag · The –Query Parameter, JMESPath, and filtering · Why search for untagged...
Read more >How to Use AWS CLI to Find Untagged Instances - Onica
Using Amazon Web Services Command Line Interface (AWS CLI) to Find Instances without a 'Name' Tag · The --Query Parameter, JMESPath and filtering....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
"tag:Test_Tagcc": not-null
empty
for finding null values,not-null
for finding resources with any value (but not empty strings)