Skip to content

Commit

Permalink
[FEATURE] Make ec2 module working in all the regions (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
dipiazzg authored Nov 16, 2022
1 parent b848701 commit 01d85f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions EXAMPLE/cluster_defs/aws/cluster_vars__cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ cluster_vars:
# ports: ["{{ prometheus_node_exporter_port | default(9100) }}"]
# group_name: ["{{buildenv}}-private-sg"]
# rule_desc: "Prometheus instances attached to {{buildenv}}-private-sg can access the exporter port(s)."


# Some of the regions are not available for aws module boto.ec2. If the region definitely exists, you may need to upgrade boto or extend with endpoints_path
# Adding the below to ec2 invocation fixes the issue
aws_endpoint_url: https://ec2.{{region}}.amazonaws.com
1 change: 1 addition & 0 deletions create/tasks/create_aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
volumes: "{{ item.auto_volumes | selectattr('src', 'undefined') | list | default([]) }}"
count_tag: { Name: "{{item.hostname}}" }
exact_count: 1
ec2_url: "{{ cluster_vars.aws_endpoint_url | default(omit) }}"
vars:
_instance_tags:
Name: "{{item.hostname}}"
Expand Down

0 comments on commit 01d85f8

Please sign in to comment.