Sha256: db35bb9560198c84b22e72d7f88f46f2aa118fef283c30c68ba21eb82d52fed2
Contents?: true
Size: 982 Bytes
Versions: 7
Compression:
Stored size: 982 Bytes
Contents
module VPC class VpnConnection attr_reader :vpn_connection_id def initialize(config,gateway,vpn_connection_id=nil) @config = config @gateway = gateway @vpn_connection_id = vpn_connection_id end def creat(customer_gateway_id, vpn_gateway_id, vpn_connection_info) type = vpn_connection_info['TYPE'] static_routes_only = vpn_connection_info['OPTIONS']['STATIC_ROUTES_ONLY'] @vpn_connection = @gateway.create_vpn_connection(type, customer_gateway_id, vpn_gateway_id, static_routes_only) @vpn_connection_id = @vpn_connection[0].vpn_connection_id resources = [@vpn_connection_id] vpn_connection_tags = vpn_connection_info['TAGS'] tag = {key: vpn_connection_tags['NAME']['KEY'], value: vpn_connection_tags['NAME']['VALUE']} tags = [tag, @config.vpc_group_tag] @gateway.create_tags(resources, tags) end def delete @gateway.delete_vpn_connection(@vpn_connection_id) end end end
Version data entries
7 entries across 7 versions & 1 rubygems