Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Make ec2 module working in all the regions #122

Merged
merged 2 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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