Class: Convection::Model::Template::Resource::EC2SecurityGroup::Rule
- Inherits:
-
Convection::Model::Template::Resource
- Object
- Convection::Model::Template::Resource
- Convection::Model::Template::Resource::EC2SecurityGroup::Rule
- Defined in:
- lib/convection/model/template/resource/aws_ec2_security_group.rb
Overview
Instance Attribute Summary
Attributes inherited from Convection::Model::Template::Resource
#exist, #name, #parent, #properties, #resource_attributes, #template
Instance Method Summary collapse
Methods inherited from Convection::Model::Template::Resource
#as_attribute, attach_method, #deletion_policy, #depends_on, #initialize, properties, #property, property, #reference, type, #type, #with_output
Methods included from Mixin::Conditional
Methods included from DSL::Template::Resource
Methods included from DSL::Helpers
#camel_case, included, method_name, #screaming_snake_case, #snake_case
Methods included from DSL::IntrinsicFunctions
#base64, #find_in_map, #fn_and, #fn_equals, #fn_if, #fn_not, #fn_or, #fn_ref, #get_att, #get_azs, #join, #select
Constructor Details
This class inherits a constructor from Convection::Model::Template::Resource
Instance Method Details
#render ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/convection/model/template/resource/aws_ec2_security_group.rb', line 86 def render { 'IpProtocol' => Mixin::Protocol.lookup(protocol) }.tap do |rule| rule['FromPort'] = from unless from.nil? rule['ToPort'] = to unless to.nil? rule['CidrIp'] = source unless source.nil? rule['CidrIp'] = destination unless destination.nil? rule['DestinationSecurityGroupId'] = destination_group unless destination_group.nil? rule['SourceSecurityGroupId'] = source_group unless source_group.nil? rule['SourceSecurityGroupOwnerId'] = source_group_owner unless source_group_owner.nil? end end |