Sha256: 38a074a63166140dad7ead9b7414de5bc58906355c1f93ef72859fccaf2a96fa

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

require_relative '../resource'

module Convection
  module Model
    class Template
      class Resource
        ##
        # AWS::EC2::Route
        ##
        class EC2Route < Resource
          def initialize(*args)
            super
            type 'AWS::EC2::Route'
          end

          def route_table_id(value)
            property('RouteTableId', value)
          end

          def destination(value)
            property('DestinationCidrBlock', value)
          end

          def gateway(value)
            property('GatewayId', value)
          end

          def instance(value)
            property('InstanceId', value)
          end

          def interface(value)
            property('NetworkInterfaceId', value)
          end

          def peer(value)
            property('VpcPeeringConnectionId', value)
          end
        end
      end
    end
  end

  module DSL
    ## Add DSL method to template namespace
    module Template
      def ec2_route(name, &block)
        r = Model::Template::Resource::EC2Route.new(name, self)

        r.instance_exec(&block) if block
        resources[name] = r
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
convection-0.0.1 lib/convection/model/template/resource/aws_ec2_route.rb