| | |
| | | - "Fn::GetAtt": |
| | | - Bastion |
| | | - PublicIp |
| | | |
| | | {% for instance in instances %} |
| | | {% if instance['loadbalancer'] is defined %} |
| | | {{instance['name']}}DNSLoadBalancer: |
| | | Type: "AWS::Route53::RecordSetGroup" |
| | | DependsOn: {{instance['name']}}{{instance['count']}}EIP |
| | | Properties: |
| | | HostedZoneId: {{HostedZoneId}} |
| | | RecordSets: |
| | | - Name: "{{instance['name']}}.{{subdomain_base}}." |
| | | Type: A |
| | | TTL: 900 |
| | | ResourceRecords: |
| | | {% for c in range(1,(instance['count'] |int)+1) %} |
| | | {% set instancecount = loop %} |
| | | - "Fn::GetAtt": |
| | | - {{instance['name']}}{{loop.index}} |
| | | - PublicIp |
| | | {% endfor %} |
| | | |
| | | {% endif %} |
| | | {% endfor %} |
| | | |
| | | |
| | | |
| | | Bastion: |
| | | Type: "AWS::EC2::Instance" |
| | | Properties: |
| | |
| | | - PrivateIp |
| | | |
| | | |
| | | {% for instance in instances %} |
| | | {% if instance['loadbalancer'] is defined %} |
| | | {{instance['name']}}DNSLoadBalancer: |
| | | Type: "AWS::Route53::RecordSetGroup" |
| | | DependsOn: {{instance['name']}}{{instance['count']}}EIP |
| | | Properties: |
| | | HostedZoneId: {{HostedZoneId}} |
| | | RecordSets: |
| | | - Name: "{{instance['name']}}.{{subdomain_base}}." |
| | | Type: A |
| | | TTL: 900 |
| | | ResourceRecords: |
| | | {% for c in range(1,(instance['count'] |int)+1) %} |
| | | {% set instancecount = loop %} |
| | | - "Fn::GetAtt": |
| | | - {{instance['name']}}{{loop.index}} |
| | | - PublicIp |
| | | {% endfor %} |
| | | |
| | | {% endif %} |
| | | {% endfor %} |
| | | |
| | | |
| | | |
| | | {% for instance in instances %} |
| | | {% for c in range(1,(instance['count'] |int)+1) %} |