Skip to content

Commit

Permalink
Merge pull request #15 from pmenhart/master
Browse files Browse the repository at this point in the history
Exclude EC2 instances that are not running
  • Loading branch information
kyleaa authored Nov 3, 2018
2 parents 573fbef + efe61d4 commit 6307257
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v0.4.1
- Bug fix: skip EC2 instances that are not running

v0.4.0
- Updated to Tesla 1.0 and support for libcluster 3.0)

Expand Down
2 changes: 1 addition & 1 deletion lib/strategy/tags.ex
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ defmodule ClusterEC2.Strategy.Tags do

cond do
tag_name != nil and tag_value != nil and app_prefix != nil and instance_id != "" and region != "" ->
params = [filters: ["tag:#{tag_name}": fetch_tag_value(tag_name, tag_value)]]
params = [filters: ["tag:#{tag_name}": fetch_tag_value(tag_name, tag_value), "instance-state-name": "running"]]
request = ExAws.EC2.describe_instances(params)
require Logger
Logger.debug("#{inspect(request)}")
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule ClusterEC2.Mixfile do
def project do
[
app: :libcluster_ec2,
version: "0.4.0",
version: "0.4.2",
elixir: "~> 1.4",
name: "libcluster_ec2",
source_url: "https://github.com/kyleaa/libcluster_ec2",
Expand Down Expand Up @@ -33,7 +33,7 @@ defmodule ClusterEC2.Mixfile do
{:sweet_xml, "~> 0.6"},
{:hackney, "~> 1.8"},
{:poison, ">= 1.0.0"},
{:tesla, "~> 1.1.0"},
{:tesla, "~> 1.0"},
{:ex_doc, ">= 0.0.0", only: :dev}
]
end
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"poison": {:hex, :poison, "4.0.1", "bcb755a16fac91cad79bfe9fc3585bb07b9331e50cfe3420a24bcc2d735709ae", [:mix], [], "hexpm"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.1", "28a4d65b7f59893bc2c7de786dec1e1555bd742d336043fe644ae956c3497fbe", [:make, :rebar], [], "hexpm"},
"sweet_xml": {:hex, :sweet_xml, "0.6.5", "dd9cde443212b505d1b5f9758feb2000e66a14d3c449f04c572f3048c66e6697", [:mix], [], "hexpm"},
"tesla": {:hex, :tesla, "1.1.0", "666e90b65d5c1edd4cd9ba96a24cf5d552cc29ccf5b22ca0cc86c465f732ba40", [:mix], [{:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "~> 4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}], "hexpm"},
"tesla": {:hex, :tesla, "1.2.0", "9e2469c1bcdb0cc8fe5fd3e9208432f3fee8e439a44f639d8ce72bcccd6f3566", [:mix], [{:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "~> 4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}], "hexpm"},
"unicode_util_compat": {:hex, :unicode_util_compat, "0.3.1", "a1f612a7b512638634a603c8f401892afbf99b8ce93a45041f8aaca99cadb85e", [:rebar3], [], "hexpm"},
}

0 comments on commit 6307257

Please sign in to comment.