Class: Terracop::Cop::Aws::PreferLaunchTemplates
- Inherits:
-
SecurityGroupRuleCop
- Object
- Base
- SecurityGroupRuleCop
- Terracop::Cop::Aws::PreferLaunchTemplates
- Defined in:
- lib/terracop/cop/aws/prefer_launch_templates.rb
Overview
This cop warns against an ingress rule from 0.0.0.0/0 on port 22 (SSH). That is a Very Bad Idea™.
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
32 33 34 35 36 37 |
# File 'lib/terracop/cop/aws/prefer_launch_templates.rb', line 32 def check if type == 'aws_launch_configuration' || attributes['launch_configuration'] offense('Prefer Launch Templates to Launch Configurations.') end end |