Skip to content
This repository has been archived by the owner on Feb 14, 2018. It is now read-only.

Commit

Permalink
Allow for public Route53 RRs
Browse files Browse the repository at this point in the history
  • Loading branch information
gmr committed Jul 30, 2015
1 parent 2106f60 commit 9aba31d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 28 deletions.
2 changes: 1 addition & 1 deletion formulary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Formulary: Cloud-Formation Stack Management
"""
__version__ = '0.3.5'
__version__ = '0.3.6'

DEBUG_CONFIG = {
'version': 1,
Expand Down
33 changes: 7 additions & 26 deletions formulary/builders/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,28 +244,6 @@ def _maybe_add_elbs(self):
elif isinstance(self._config.settings['elb'], dict):
self._add_elb('elb', self._config.settings['elb'])

"""
def _maybe_add_route53_records(self, config):
if 'route53' not in config:
return
if isinstance(config, dict):
return self._maybe_add_route53_record(config)
elif isinstance(config, list):
for entry in config['route53']:
self._maybe_add_route53_record(entry)
def _maybe_add_route53_record(self, config):
name = '{0}-route53'.format(config['route53']['hostname'])
builder = route53.Route53RecordSet(self._config, name,
config['route53'], self._instances)
template_id, url = builder.upload(self._name)
params = dict()
for instance in self._instances:
params[instance] = {'Ref': instance}
self._add_stack(name, url, params)
"""

def _maybe_add_route53_alias(self, config, ref_name):
if 'route53' not in config:
return
Expand Down Expand Up @@ -297,12 +275,15 @@ def _maybe_add_route53_record_set(self, config):
template_id, url = builder.upload(self._name)
params = dict()
for instance in self._instances:
priv = 'Public' if config.get('pubic') else 'Private'
if 'srv' in config:
params[instance] = {'Fn::GetAtt': [instance,
'Outputs.PrivateDnsName']}
params[instance] = {'Fn::GetAtt':
[instance,
'Outputs.{0}DnsName'.format(priv)]}
else:
params[instance] = {'Fn::GetAtt': [instance,
'Outputs.PrivateIP']}
params[instance] = {'Fn::GetAtt':
[instance,
'Outputs.{0}IP'.format(priv)]}
self._add_stack(name, url, params)

def _maybe_add_security_group_ingress(self):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'Topic :: System :: Systems Administration']

setuptools.setup(name='formulary',
version='0.3.5',
version='0.3.6',
description='Easy management of AWS Cloud Formation stacks',
long_description=open('README.rst').read(),
author='Gavin M. Roy',
Expand Down

0 comments on commit 9aba31d

Please sign in to comment.