Class: Terracop::Cop::Aws::EnsureTags
- Defined in:
- lib/terracop/cop/aws/ensure_tags.rb
Overview
This cop makes sure that AWS resources that can be tagged, are indeed tagged. By default it just checks that resources have at least one tag, any tag. It is configurable to enforce the existance of some specific tags.
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
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/terracop/cop/aws/ensure_tags.rb', line 29 def check = (attributes) return unless if self.class.config['Required'] check_required(, self.class.config['Required']) elsif .empty? offense 'Tag resources properly.' end end |