Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

DNSNAME instead of CanonicalHostedZoneName: #86

Merged
merged 2 commits into from Apr 27, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bootstrap_cfn/config.py
Expand Up @@ -220,7 +220,7 @@ def elb(self):
'CanonicalHostedZoneNameID']
target_dns = [
'ELB%s' % safe_name,
'CanonicalHostedZoneName']
'DNSName']
template['DNSRecord']['Properties']['RecordSets'][0][
'AliasTarget']['HostedZoneId']['Fn::GetAtt'] = target_zone
template['DNSRecord']['Properties']['RecordSets'][0][
Expand Down
2 changes: 1 addition & 1 deletion tests/sample-project.yaml
Expand Up @@ -45,7 +45,7 @@ dev:
Protocol: TCP
- name: test-dev-internal
hosted_zone: kyrtest.pf.dsd.io.
scheme: internet-facing
scheme: internal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to get this to work before (internal), but for some reason it wouldn't - does it now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just read the commit notes: Awesome!

listeners:
- LoadBalancerPort: 80
InstancePort: 80
Expand Down
10 changes: 5 additions & 5 deletions tests/tests.py
Expand Up @@ -205,7 +205,7 @@ def test_elb(self):
u'HostedZoneName': 'kyrtest.pf.dsd.io.',
u'RecordSets': [
{u'AliasTarget': {
u'DNSName': {u'Fn::GetAtt': ['ELBtestdevexternal', 'CanonicalHostedZoneName']},
u'DNSName': {u'Fn::GetAtt': ['ELBtestdevexternal', 'DNSName']},
u'HostedZoneId': {u'Fn::GetAtt': ['ELBtestdevexternal', 'CanonicalHostedZoneNameID']}},
u'Name': 'test-dev-external.kyrtest.pf.dsd.io.',
u'Type': u'A'}
Expand All @@ -221,7 +221,7 @@ def test_elb(self):
],
u'LoadBalancerName': 'ELB-test-dev-internal',
u'SecurityGroups': [{u'Ref': u'DefaultSGtestdevinternal'}],
u'Scheme': 'internet-facing',
u'Scheme': 'internal',
u'Subnets': [
{u'Ref': u'SubnetA'},
{u'Ref': u'SubnetB'},
Expand All @@ -235,7 +235,7 @@ def test_elb(self):
u'HostedZoneName': 'kyrtest.pf.dsd.io.',
u'RecordSets': [
{u'AliasTarget': {
u'DNSName': {u'Fn::GetAtt': ['ELBtestdevinternal', 'CanonicalHostedZoneName']},
u'DNSName': {u'Fn::GetAtt': ['ELBtestdevinternal', 'DNSName']},
u'HostedZoneId': {u'Fn::GetAtt': ['ELBtestdevinternal', 'CanonicalHostedZoneNameID']}},
u'Name': 'test-dev-internal.kyrtest.pf.dsd.io.',
u'Type': u'A'}
Expand Down Expand Up @@ -449,7 +449,7 @@ def test_elb_with_ssl(self):
{'DNSdev_dockerregistryservice': {'Properties': {'Comment': 'Zone apex alias targeted to ElasticLoadBalancer.',
'HostedZoneName': 'kyrtest.foo.bar.',
'RecordSets': [{'AliasTarget': {'DNSName': {'Fn::GetAtt': ['ELBdev_dockerregistryservice',
'CanonicalHostedZoneName']},
'DNSName']},
'HostedZoneId': {'Fn::GetAtt': ['ELBdev_dockerregistryservice',
'CanonicalHostedZoneNameID']}},
'Name': 'dev_docker-registry.service.kyrtest.foo.bar.',
Expand Down Expand Up @@ -499,7 +499,7 @@ def test_elb_with_reserved_chars(self):
{'DNSdev_dockerregistryservice': {'Properties': {'Comment': 'Zone apex alias targeted to ElasticLoadBalancer.',
'HostedZoneName': 'kyrtest.foo.bar.',
'RecordSets': [{'AliasTarget': {'DNSName': {'Fn::GetAtt': ['ELBdev_dockerregistryservice',
'CanonicalHostedZoneName']},
'DNSName']},
'HostedZoneId': {'Fn::GetAtt': ['ELBdev_dockerregistryservice',
'CanonicalHostedZoneNameID']}},
'Name': 'dev_docker-registry.service.kyrtest.foo.bar.',
Expand Down