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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/terraforming/resource/ec2.rb +5 -0
- data/lib/terraforming/template/tf/ec2.erb +1 -0
- data/lib/terraforming/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 058ce2be43c99a68496fa2e880cccf5b6a9f9650
|
4
|
+
data.tar.gz: 734b8f399d137643cb4fa79268df850b3c48b629
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e76464ee58bb640e0c31ef3c37fcf7b657ca9b0c099b8b940d48193853f422cb25f6fa23d479ef862c03c44ce5e87d81be5c5ed8864f605b89aee35669cadd79
|
7
|
+
data.tar.gz: b4c0bd0d61925fe852ba575ef698b33252817b0a4e8cc40b3280a390a6b81d3d909cea41f3a4a27ac5b73e9a3ee11171f61b4b84a918fa5392989967133cefde
|
data/CHANGELOG.md
CHANGED
@@ -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 %>"
|
data/lib/terraforming/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2015-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|