Skip to content

Commit

Permalink
Removing DNS stuff as part of cleanup
Browse files Browse the repository at this point in the history
Honestly not a lot of use for this. Need a better DNS story.
  • Loading branch information
phobologic committed Mar 20, 2015
1 parent 47a6bd1 commit dc1c2fc
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions stacker/stacks/vpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from troposphere import Ref, Output, Join, FindInMap
from troposphere import ec2
from troposphere.route53 import RecordSetType
import netaddr

from ..stack import StackTemplateBase
Expand Down Expand Up @@ -181,27 +180,13 @@ def create_nat_instance(self, zone, subnet):
Tags=[ec2.Tag('Name', 'nat-gw%s' % suffix.lower())],
DependsOn=self.gw_attach.title))

eip = t.add_resource(ec2.EIP(
t.add_resource(ec2.EIP(
'NATExternalIp%s' % suffix,
Domain='vpc',
InstanceId=Ref(nat_instance),
DependsOn=self.gw_attach.title))
self.create_nat_dns(zone, eip)
return nat_instance

def create_nat_dns(self, zone, ip):
t = self.template
suffix = zone[-1].upper()
name = "gw%s" % suffix
return t.add_resource(RecordSetType(
"NatEIPDNS%s" % suffix,
HostedZoneName=Join("", [Ref("BaseDomain"), "."]),
Comment='NAT gateway A record.',
Name=Join(".", [name, 'int', Ref("BaseDomain")]),
Type='A',
TTL='120',
ResourceRecords=[Ref(ip)]))

def create_template(self):
self.cidr_block = netaddr.IPNetwork(
self.config.parameters['CidrBlock'])
Expand Down

0 comments on commit dc1c2fc

Please sign in to comment.