terraforming 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a06eef6162629702c7d05c7c0db5925f7935888b
4
- data.tar.gz: 258afec05eb52e63b257660bfc4db4197240c0df
3
+ metadata.gz: 058ce2be43c99a68496fa2e880cccf5b6a9f9650
4
+ data.tar.gz: 734b8f399d137643cb4fa79268df850b3c48b629
5
5
  SHA512:
6
- metadata.gz: 0d5cd22e89677dd168ebeb2883d47f9bdf98b47c76e0a42ea3b0e913c01d65df6bcf2ddf616b3e998312fd7c3b924b28d1281d1284d68f558fa7db50a579d9ff
7
- data.tar.gz: db7af6de24c20eb6a78e2495fae54856955938960015d9f640e6d3c999ff669accbc1c09457e109a68bab8271300d773a02f92ff169f7894b38da2de70637818
6
+ metadata.gz: e76464ee58bb640e0c31ef3c37fcf7b657ca9b0c099b8b940d48193853f422cb25f6fa23d479ef862c03c44ce5e87d81be5c5ed8864f605b89aee35669cadd79
7
+ data.tar.gz: b4c0bd0d61925fe852ba575ef698b33252817b0a4e8cc40b3280a390a6b81d3d909cea41f3a4a27ac5b73e9a3ee11171f61b4b84a918fa5392989967133cefde
@@ -1,3 +1,9 @@
1
+ # [v0.3.1](https://github.com/dtan4/terraforming/releases/tag/v0.3.1) (2015-09-24)
2
+
3
+ ## Fixed
4
+
5
+ - Export EC2 instance monitoring state #130 (thanks @ngs)
6
+
1
7
  # [v0.3.0](https://github.com/dtan4/terraforming/releases/tag/v0.3.0) (2015-08-23)
2
8
 
3
9
  ## Resource
@@ -33,6 +33,7 @@ module Terraforming
33
33
  "ephemeral_block_device.#" => "0", # Terraform 0.6.1 cannot fetch this field from AWS
34
34
  "id"=> instance.instance_id,
35
35
  "instance_type"=> instance.instance_type,
36
+ "monitoring" => monitoring_state(instance).to_s,
36
37
  "private_dns"=> instance.private_dns_name,
37
38
  "private_ip"=> instance.private_ip_address,
38
39
  "public_dns"=> instance.public_dns_name,
@@ -92,6 +93,10 @@ module Terraforming
92
93
  (instance.subnet_id && instance.subnet_id != "" && instance.security_groups.length == 0)
93
94
  end
94
95
 
96
+ def monitoring_state(instance)
97
+ %w(enabled pending).include?(instance.monitoring.state)
98
+ end
99
+
95
100
  def instances
96
101
  @client.describe_instances.reservations.map(&:instances).flatten.reject { |instance| instance.state.name == "terminated" }
97
102
  end
@@ -4,6 +4,7 @@ resource "aws_instance" "<%= module_name_of(instance) %>" {
4
4
  availability_zone = "<%= instance.placement.availability_zone %>"
5
5
  ebs_optimized = <%= instance.ebs_optimized %>
6
6
  instance_type = "<%= instance.instance_type %>"
7
+ monitoring = <%= monitoring_state(instance) %>
7
8
  key_name = "<%= instance.key_name %>"
8
9
  <%- if in_vpc?(instance) -%>
9
10
  subnet_id = "<%= instance.subnet_id %>"
@@ -1,3 +1,3 @@
1
1
  module Terraforming
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terraforming
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daisuke Fujita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-23 00:00:00.000000000 Z
11
+ date: 2015-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk