terraforming 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/CHANGELOG.md +8 -0
- data/lib/terraforming/resource/eip.rb +7 -3
- data/lib/terraforming/resource/security_group.rb +5 -0
- data/lib/terraforming/template/tf/route53_record.erb +1 -0
- data/lib/terraforming/template/tf/security_group.erb +6 -0
- data/lib/terraforming/version.rb +1 -1
- data/terraforming.gemspec +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce28792dd6bf8346c71c97b88490a492f26f5b1c
|
4
|
+
data.tar.gz: 5fbb2eb91615d03bc50566b28877334a8b64d36f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f22672a8e344a840ca1a89d34757328fae4eec18b18050dd277625aa3659ac05001dacaffa406ab63d145a7be854ee82819836f1088baccc05574334ae367610
|
7
|
+
data.tar.gz: bd9b3a407399e1d3e9d4a52611c042f445973b7feb304ccbea032d9871fc618a4f039424d976a9949f45bbf087777fa6986260af3c4b13ff9085b7a989aba66a
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# [v0.13.2](https://github.com/dtan4/terraforming/releases/tag/v0.13.2) (2017-04-20)
|
2
|
+
|
3
|
+
## Fixed / Updated
|
4
|
+
|
5
|
+
- Add prefix lists to security groups configuration [#326](https://github.com/dtan4/terraforming/pull/326) (thanks @julia-stripe)
|
6
|
+
- Support Ruby 2.4 without warnings [#323](https://github.com/dtan4/terraforming/pull/323)
|
7
|
+
- Fix support for EIP in EC2-Classic [#316](https://github.com/dtan4/terraforming/pull/316) (thanks @yn)
|
8
|
+
|
1
9
|
# [v0.13.1](https://github.com/dtan4/terraforming/releases/tag/v0.13.1) (2017-01-23)
|
2
10
|
|
3
11
|
## Fixed / Updated
|
@@ -24,7 +24,7 @@ module Terraforming
|
|
24
24
|
attributes = {
|
25
25
|
"association_id" => addr.association_id,
|
26
26
|
"domain" => addr.domain,
|
27
|
-
"id" => addr.allocation_id,
|
27
|
+
"id" => vpc?(addr) ? addr.allocation_id : addr.public_ip,
|
28
28
|
"instance" => addr.instance_id,
|
29
29
|
"network_interface" => addr.network_interface_id,
|
30
30
|
"private_ip" => addr.private_ip_address,
|
@@ -35,7 +35,7 @@ module Terraforming
|
|
35
35
|
resources["aws_eip.#{module_name_of(addr)}"] = {
|
36
36
|
"type" => "aws_eip",
|
37
37
|
"primary" => {
|
38
|
-
"id" => addr.allocation_id,
|
38
|
+
"id" => vpc?(addr) ? addr.allocation_id : addr.public_ip,
|
39
39
|
"attributes" => attributes
|
40
40
|
}
|
41
41
|
}
|
@@ -55,7 +55,11 @@ module Terraforming
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def module_name_of(addr)
|
58
|
-
|
58
|
+
if vpc?(addr)
|
59
|
+
normalize_module_name(addr.allocation_id)
|
60
|
+
else
|
61
|
+
normalize_module_name(addr.public_ip)
|
62
|
+
end
|
59
63
|
end
|
60
64
|
end
|
61
65
|
end
|
@@ -92,6 +92,7 @@ module Terraforming
|
|
92
92
|
"#{type}.#{hashcode}.to_port" => (permission.to_port || 0).to_s,
|
93
93
|
"#{type}.#{hashcode}.protocol" => permission.ip_protocol,
|
94
94
|
"#{type}.#{hashcode}.cidr_blocks.#" => permission.ip_ranges.length.to_s,
|
95
|
+
"#{type}.#{hashcode}.prefix_list_ids.#" => permission.prefix_list_ids.length.to_s,
|
95
96
|
"#{type}.#{hashcode}.security_groups.#" => security_groups.length.to_s,
|
96
97
|
"#{type}.#{hashcode}.self" => self_referenced_permission?(security_group, permission).to_s,
|
97
98
|
}
|
@@ -100,6 +101,10 @@ module Terraforming
|
|
100
101
|
attributes["#{type}.#{hashcode}.cidr_blocks.#{index}"] = range.cidr_ip
|
101
102
|
end
|
102
103
|
|
104
|
+
permission.prefix_list_ids.each_with_index do |prefix_list, index|
|
105
|
+
attributes["#{type}.#{hashcode}.prefix_list_ids.#{index}"] = prefix_list.prefix_list_id
|
106
|
+
end
|
107
|
+
|
103
108
|
security_groups.each do |group|
|
104
109
|
attributes["#{type}.#{hashcode}.security_groups.#{group_hashcode_of(group)}"] = group
|
105
110
|
end
|
@@ -22,6 +22,7 @@ resource "aws_route53_record" "<%= module_name_of(record, counter) %>" {
|
|
22
22
|
}
|
23
23
|
<%- end -%>
|
24
24
|
<%- if record.geo_location -%>
|
25
|
+
|
25
26
|
geolocation_routing_policy {
|
26
27
|
<%- if record.geo_location.continent_code -%>
|
27
28
|
continent = "<%= record.geo_location.continent_code %>"
|
@@ -10,6 +10,9 @@ resource "aws_security_group" "<%= module_name_of(security_group) %>" {
|
|
10
10
|
from_port = <%= permission.from_port || 0 %>
|
11
11
|
to_port = <%= permission.to_port || 0 %>
|
12
12
|
protocol = "<%= permission.ip_protocol %>"
|
13
|
+
<%- if permission.prefix_list_ids.length > 0 -%>
|
14
|
+
prefix_list_ids = <%= permission.prefix_list_ids.map { |range| range.prefix_list_id }.inspect %>
|
15
|
+
<%- end -%>
|
13
16
|
<%- if permission.ip_ranges.length > 0 -%>
|
14
17
|
cidr_blocks = <%= permission.ip_ranges.map { |range| range.cidr_ip }.inspect %>
|
15
18
|
<%- end -%>
|
@@ -27,6 +30,9 @@ resource "aws_security_group" "<%= module_name_of(security_group) %>" {
|
|
27
30
|
from_port = <%= permission.from_port || 0 %>
|
28
31
|
to_port = <%= permission.to_port || 0 %>
|
29
32
|
protocol = "<%= permission.ip_protocol %>"
|
33
|
+
<%- if permission.prefix_list_ids.length > 0 -%>
|
34
|
+
prefix_list_ids = <%= permission.prefix_list_ids.map { |range| range.prefix_list_id }.inspect %>
|
35
|
+
<%- end -%>
|
30
36
|
<%- if permission.ip_ranges.length > 0 -%>
|
31
37
|
cidr_blocks = <%= permission.ip_ranges.map { |range| range.cidr_ip }.inspect %>
|
32
38
|
<%- end -%>
|
data/lib/terraforming/version.rb
CHANGED
data/terraforming.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_dependency "aws-sdk", "~> 2.
|
22
|
+
spec.add_dependency "aws-sdk", "~> 2.9.6"
|
23
23
|
spec.add_dependency "multi_json", "~> 1.12.1"
|
24
24
|
spec.add_dependency "thor"
|
25
25
|
|
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_development_dependency "coveralls", "~> 0.8.13"
|
28
28
|
spec.add_development_dependency "rake"
|
29
29
|
spec.add_development_dependency "rspec", "~> 3.2"
|
30
|
-
spec.add_development_dependency "simplecov", "~> 0.
|
30
|
+
spec.add_development_dependency "simplecov", "~> 0.14.1"
|
31
31
|
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.13.
|
4
|
+
version: 0.13.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daisuke Fujita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.9.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.9.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: multi_json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.14.1
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.14.1
|
125
125
|
description: Export existing AWS resources to Terraform style (tf, tfstate)
|
126
126
|
email:
|
127
127
|
- dtanshi45@gmail.com
|
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
257
257
|
version: '0'
|
258
258
|
requirements: []
|
259
259
|
rubyforge_project:
|
260
|
-
rubygems_version: 2.6.
|
260
|
+
rubygems_version: 2.6.11
|
261
261
|
signing_key:
|
262
262
|
specification_version: 4
|
263
263
|
summary: Export existing AWS resources to Terraform style (tf, tfstate)
|