Module: AwsExtensions::EC2::RouteTable

Defined in:
lib/aws_extensions/ec2/RouteTable.rb

Instance Method Summary collapse

Instance Method Details

#diffable_routesObject

Public: Selects the routes in the route table that we care about by filtering out the default route with the local gateway and any routes that are for s3 service endpoints (ones that have a destination_prefix_list_id)



20
21
22
# File 'lib/aws_extensions/ec2/RouteTable.rb', line 20

def diffable_routes
  self.routes.select { |route| route.gateway_id != "local" and route.origin != "CreateRouteTable" and !route.destination_prefix_list_id }
end

#nameObject

Public: Returns the value of the “Name” tag for the route table



6
7
8
9
10
# File 'lib/aws_extensions/ec2/RouteTable.rb', line 6

def name
  self.tags.select { |tag| tag.key == "Name" }.first.value
rescue
	nil
end

#subnet_idsObject

Public: Returns an array of subnet ids associated with the route table



13
14
15
# File 'lib/aws_extensions/ec2/RouteTable.rb', line 13

def subnet_ids
  self.associations.map { |assoc| assoc.subnet_id }
end