Skip to content

Commit

Permalink
CFY-5387 added elb region/endpoint to the blueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessiebr committed Jun 14, 2016
1 parent 5870a52 commit 045dff1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aws-ec2-manager-blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ inputs:
type: string
default: 'us-east-1'

elb_region_name:
type: string
default: 'us-east-1'

use_existing_manager_keypair:
type: boolean
default: false
Expand Down Expand Up @@ -526,6 +530,7 @@ dsl_definitions:
aws_access_key_id: { get_input: aws_access_key_id }
aws_secret_access_key: { get_input: aws_secret_access_key }
ec2_region_name: { get_input: ec2_region_name }
elb_region_name: { get_input: elb_region_name }


node_templates:
Expand Down
9 changes: 9 additions & 0 deletions components/manager/scripts/aws-ec2/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ def _upload_credentials(aws_config, manager_config_path):
credentials.set('Boto', 'ec2_region_endpoint',
region.endpoint)

if aws_config.get('elb_region_name'):
region = get_region(aws_config['elb_region_name'])
if not credentials.has_section('Boto'):
credentials.add_section('Boto')
credentials.set('Boto', 'elb_region_name',
aws_config['elb_region_name'])
credentials.set('Boto', 'elb_region_endpoint',
region.endpoint)

with open(temp_config, 'w') as temp_config_file:
credentials.write(temp_config_file)

Expand Down

0 comments on commit 045dff1

Please sign in to comment.