Class: Terracop::Cop::Aws::EnsurePropagatedTags
- Defined in:
- lib/terracop/cop/aws/ensure_propagated_tags.rb
Overview
This cop makes sure that EC2 instances launched by Autoscaling Groups also have tags. It is configured like the Aws/EnsureTags cop.
Instance Attribute Summary
Attributes inherited from Base
#attributes, #index, #name, #offenses, #type
Instance Method Summary collapse
Methods inherited from Base
config, cop_name, #human_name, #initialize, #offense, run
Constructor Details
This class inherits a constructor from Terracop::Cop::Base
Instance Method Details
#check ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/terracop/cop/aws/ensure_propagated_tags.rb', line 33 def check if self.class.config['Required'] check_required(, self.class.config['Required']) elsif .empty? offense 'The EC2 instances launched by this Autoscaling group ' \ 'will not have any tags.' end end |