terraforming 0.9.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +81 -0
- data/CHANGELOG.md +24 -0
- data/Gemfile +2 -0
- data/LICENSE +1 -1
- data/README.md +9 -2
- data/Rakefile +0 -1
- data/lib/terraforming.rb +2 -1
- data/lib/terraforming/cli.rb +15 -3
- data/lib/terraforming/resource/auto_scaling_group.rb +1 -1
- data/lib/terraforming/resource/db_parameter_group.rb +2 -2
- data/lib/terraforming/resource/db_security_group.rb +1 -1
- data/lib/terraforming/resource/db_subnet_group.rb +1 -1
- data/lib/terraforming/resource/ec2.rb +23 -21
- data/lib/terraforming/resource/eip.rb +4 -4
- data/lib/terraforming/resource/elasti_cache_cluster.rb +6 -6
- data/lib/terraforming/resource/elasti_cache_subnet_group.rb +1 -1
- data/lib/terraforming/resource/elb.rb +6 -7
- data/lib/terraforming/resource/iam_group.rb +2 -2
- data/lib/terraforming/resource/iam_group_membership.rb +3 -3
- data/lib/terraforming/resource/iam_group_policy.rb +4 -4
- data/lib/terraforming/resource/iam_instance_profile.rb +1 -1
- data/lib/terraforming/resource/iam_policy.rb +1 -1
- data/lib/terraforming/resource/iam_policy_attachment.rb +15 -2
- data/lib/terraforming/resource/iam_role.rb +1 -1
- data/lib/terraforming/resource/iam_role_policy.rb +4 -4
- data/lib/terraforming/resource/iam_user.rb +2 -2
- data/lib/terraforming/resource/iam_user_policy.rb +4 -4
- data/lib/terraforming/resource/internet_gateway.rb +1 -1
- data/lib/terraforming/resource/launch_configuration.rb +2 -5
- data/lib/terraforming/resource/nat_gateway.rb +57 -0
- data/lib/terraforming/resource/network_acl.rb +1 -1
- data/lib/terraforming/resource/network_interface.rb +2 -3
- data/lib/terraforming/resource/rds.rb +1 -1
- data/lib/terraforming/resource/redshift.rb +1 -1
- data/lib/terraforming/resource/route53_record.rb +4 -4
- data/lib/terraforming/resource/route53_zone.rb +5 -5
- data/lib/terraforming/resource/route_table.rb +3 -3
- data/lib/terraforming/resource/route_table_association.rb +1 -1
- data/lib/terraforming/resource/s3.rb +1 -1
- data/lib/terraforming/resource/security_group.rb +8 -7
- data/lib/terraforming/resource/sqs.rb +1 -1
- data/lib/terraforming/resource/subnet.rb +1 -1
- data/lib/terraforming/resource/vpc.rb +1 -1
- data/lib/terraforming/resource/vpn_gateway.rb +1 -1
- data/lib/terraforming/template/tf/eip.erb +3 -3
- data/lib/terraforming/template/tf/launch_configuration.erb +2 -0
- data/lib/terraforming/template/tf/nat_gateway.erb +9 -0
- data/lib/terraforming/version.rb +1 -1
- data/terraforming.gemspec +2 -2
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ab51ccecba0ce3d3701be95d8718f6d5fe6a796
|
4
|
+
data.tar.gz: 0032ebcb37559bd617d042347b12c8764c2a82f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de61ed94cc3077c1866602f6cf41f4298b02c0ce91105b8cae4d8c8054b45182feeb2318f531d574006d6fcb19c8302c26e7d2bb27c6257136ce90b3f038ff7a
|
7
|
+
data.tar.gz: a1a27835df34c2e8c2830cab7c578381c75fec982a55f4859f427d6af2ffb7e3a921120333897621b3e604622f5bf6154f4496d44e7950481a0e0b4a963d5f70
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
Metrics/AbcSize:
|
2
|
+
Enabled: false
|
3
|
+
|
4
|
+
Metrics/ClassLength:
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
Metrics/CyclomaticComplexity:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Metrics/LineLength:
|
11
|
+
Max: 140
|
12
|
+
Exclude:
|
13
|
+
- "spec/**/*"
|
14
|
+
|
15
|
+
# Offense count: 42
|
16
|
+
# Configuration parameters: CountComments.
|
17
|
+
Metrics/MethodLength:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Metrics/ModuleLength:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
Style/BracesAroundHashParameters:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Style/Documentation:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
Style/EachWithObject:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Style/HashSyntax:
|
33
|
+
Exclude:
|
34
|
+
- 'Rakefile'
|
35
|
+
|
36
|
+
# TODO: check again
|
37
|
+
Style/IndentArray:
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
# TODO: check again
|
41
|
+
Style/IndentHash:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Style/LineEndConcatenation:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
Style/MutableConstant:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
Style/NumericLiterals:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
Style/ParallelAssignment:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
Style/RedundantSelf:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
# TODO: check again (force to %r literal)
|
60
|
+
Style/RegexpLiteral:
|
61
|
+
Enabled: true
|
62
|
+
|
63
|
+
Style/StringLiterals:
|
64
|
+
Enabled: false
|
65
|
+
|
66
|
+
Style/SymbolProc:
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
Style/TrailingCommaInLiteral:
|
70
|
+
Enabled: false
|
71
|
+
|
72
|
+
Style/UnneededPercentQ:
|
73
|
+
Enabled: false
|
74
|
+
|
75
|
+
Style/CollectionMethods:
|
76
|
+
PreferredMethods:
|
77
|
+
collect: "map"
|
78
|
+
collect!: "map!"
|
79
|
+
inject: "inject"
|
80
|
+
detect: "find"
|
81
|
+
find_all: "select"
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1
|
+
# [v0.10.0](https://github.com/dtan4/terraforming/releases/tag/v0.10.0) (2016-08-24)
|
2
|
+
|
3
|
+
## Resource
|
4
|
+
|
5
|
+
- AWS NAT Gateway [#240](https://github.com/dtan4/terraforming/pull/240) (thanks @brianknight10)
|
6
|
+
|
7
|
+
## Fixed / Updated
|
8
|
+
|
9
|
+
- Use the latest Oj (2.17.x) [#257](https://github.com/dtan4/terraforming/pull/257)
|
10
|
+
- Use the latest aws-sdk (2.5.x) [#256](https://github.com/dtan4/terraforming/pull/256)
|
11
|
+
- Attach AWS-scoped IAM policy attachments [#251](https://github.com/dtan4/terraforming/pull/251) (thanks @raylu)
|
12
|
+
- Fix LaunchConfiguration tf result when associate_public_ip_address [#250](https://github.com/dtan4/terraforming/pull/250) (thanks @gotyoooo)
|
13
|
+
- Paginate IAM Group Membership [#248](https://github.com/dtan4/terraforming/pull/248) (thanks @raylu)
|
14
|
+
- Add option to use AWS bundled CA certificate [#246](https://github.com/dtan4/terraforming/pull/246) (thanks @mattgartman)
|
15
|
+
- Fix network_interface naming in EIP [#243](https://github.com/dtan4/terraforming/pull/243)
|
16
|
+
- Fix name of "iampa" subcommand in CLI help output [#237](https://github.com/dtan4/terraforming/pull/237) (thanks @jimmycuadra)
|
17
|
+
- Paginate all resources [#236](https://github.com/dtan4/terraforming/pull/236) (thanks @philsnow)
|
18
|
+
|
19
|
+
__NOTE:__ OpsWorks support was omitted at v0.10.0 due to lack of tests. See [#264](https://github.com/dtan4/terraforming/pull/264) in detail.
|
20
|
+
|
21
|
+
## Others
|
22
|
+
|
23
|
+
- Introduce [RuboCop](https://github.com/bbatsov/rubocop) and [SideCI](https://sideci.com/) to check coding style automatically [#242](https://github.com/dtan4/terraforming/pull/242)
|
24
|
+
|
1
25
|
# [v0.9.1](https://github.com/dtan4/terraforming/releases/tag/v0.9.1) (2016-06-17)
|
2
26
|
|
3
27
|
## Fixed / Updated
|
data/Gemfile
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -65,6 +65,12 @@ aws_secret_access_key = FugaFuga
|
|
65
65
|
$ terraforming s3 --profile hoge
|
66
66
|
```
|
67
67
|
|
68
|
+
You can force the AWS SDK to utilize the CA certificate that is bundled with the SDK for systems where the default OpenSSL certificate is not installed (e.g. Windows) by utilizing the `--use-bundled-cert` option.
|
69
|
+
|
70
|
+
```bash
|
71
|
+
PS C:\> terraforming ec2 --use-bundled-cert
|
72
|
+
```
|
73
|
+
|
68
74
|
## Usage
|
69
75
|
|
70
76
|
```bash
|
@@ -79,13 +85,13 @@ Commands:
|
|
79
85
|
terraforming ecsn # ElastiCache Subnet Group
|
80
86
|
terraforming eip # EIP
|
81
87
|
terraforming elb # ELB
|
82
|
-
terraforming help [COMMAND] # Describe available commands or one
|
88
|
+
terraforming help [COMMAND] # Describe available commands or one specific command
|
83
89
|
terraforming iamg # IAM Group
|
84
90
|
terraforming iamgm # IAM Group Membership
|
85
91
|
terraforming iamgp # IAM Group Policy
|
86
92
|
terraforming iamip # IAM Instance Profile
|
87
93
|
terraforming iamp # IAM Policy
|
88
|
-
terraforming
|
94
|
+
terraforming iampa # IAM Policy Attachment
|
89
95
|
terraforming iamr # IAM Role
|
90
96
|
terraforming iamrp # IAM Role Policy
|
91
97
|
terraforming iamu # IAM User
|
@@ -93,6 +99,7 @@ Commands:
|
|
93
99
|
terraforming igw # Internet Gateway
|
94
100
|
terraforming lc # Launch Configuration
|
95
101
|
terraforming nacl # Network ACL
|
102
|
+
terraforming nat # NAT Gateway
|
96
103
|
terraforming nif # Network Interface
|
97
104
|
terraforming r53r # Route53 Record
|
98
105
|
terraforming r53z # Route53 Hosted Zone
|
data/Rakefile
CHANGED
data/lib/terraforming.rb
CHANGED
@@ -3,7 +3,7 @@ require "oj"
|
|
3
3
|
begin
|
4
4
|
require "ox"
|
5
5
|
rescue NameError => e
|
6
|
-
spec = Gem::Specification.stubs.find {|s| s.name == 'ox' }
|
6
|
+
spec = Gem::Specification.stubs.find { |s| s.name == 'ox' }
|
7
7
|
raise e unless spec
|
8
8
|
require File.join(spec.gem_dir, "lib/ox")
|
9
9
|
end
|
@@ -39,6 +39,7 @@ require "terraforming/resource/iam_user"
|
|
39
39
|
require "terraforming/resource/iam_user_policy"
|
40
40
|
require "terraforming/resource/launch_configuration"
|
41
41
|
require "terraforming/resource/internet_gateway"
|
42
|
+
require "terraforming/resource/nat_gateway"
|
42
43
|
require "terraforming/resource/network_acl"
|
43
44
|
require "terraforming/resource/network_interface"
|
44
45
|
require "terraforming/resource/rds"
|
data/lib/terraforming/cli.rb
CHANGED
@@ -5,6 +5,9 @@ module Terraforming
|
|
5
5
|
class_option :tfstate, type: :boolean, desc: "Generate tfstate"
|
6
6
|
class_option :profile, type: :string, desc: "AWS credentials profile"
|
7
7
|
class_option :region, type: :string, desc: "AWS region"
|
8
|
+
class_option :use_bundled_cert,
|
9
|
+
type: :boolean,
|
10
|
+
desc: "Use the bundled CA certificate from AWS SDK"
|
8
11
|
|
9
12
|
desc "asg", "AutoScaling Group"
|
10
13
|
def asg
|
@@ -76,7 +79,7 @@ module Terraforming
|
|
76
79
|
execute(Terraforming::Resource::IAMPolicy, options)
|
77
80
|
end
|
78
81
|
|
79
|
-
desc "
|
82
|
+
desc "iampa", "IAM Policy Attachment"
|
80
83
|
def iampa
|
81
84
|
execute(Terraforming::Resource::IAMPolicyAttachment, options)
|
82
85
|
end
|
@@ -116,6 +119,11 @@ module Terraforming
|
|
116
119
|
execute(Terraforming::Resource::NetworkACL, options)
|
117
120
|
end
|
118
121
|
|
122
|
+
desc "nat", "NAT Gateway"
|
123
|
+
def nat
|
124
|
+
execute(Terraforming::Resource::NATGateway, options)
|
125
|
+
end
|
126
|
+
|
119
127
|
desc "nif", "Network Interface"
|
120
128
|
def nif
|
121
129
|
execute(Terraforming::Resource::NetworkInterface, options)
|
@@ -181,12 +189,16 @@ module Terraforming
|
|
181
189
|
execute(Terraforming::Resource::VPNGateway, options)
|
182
190
|
end
|
183
191
|
|
184
|
-
|
185
192
|
private
|
186
193
|
|
187
|
-
def
|
194
|
+
def configure_aws(options)
|
188
195
|
Aws.config[:credentials] = Aws::SharedCredentials.new(profile_name: options[:profile]) if options[:profile]
|
189
196
|
Aws.config[:region] = options[:region] if options[:region]
|
197
|
+
Aws.use_bundled_cert! if options[:use_bundled_cert]
|
198
|
+
end
|
199
|
+
|
200
|
+
def execute(klass, options)
|
201
|
+
configure_aws(options)
|
190
202
|
result = options[:tfstate] ? tfstate(klass, options[:merge]) : tf(klass)
|
191
203
|
|
192
204
|
if options[:tfstate] && options[:merge] && options[:overwrite]
|
@@ -43,11 +43,11 @@ module Terraforming
|
|
43
43
|
private
|
44
44
|
|
45
45
|
def db_parameter_groups
|
46
|
-
@client.describe_db_parameter_groups.db_parameter_groups
|
46
|
+
@client.describe_db_parameter_groups.map(&:db_parameter_groups).flatten
|
47
47
|
end
|
48
48
|
|
49
49
|
def db_parameters_in(parameter_group)
|
50
|
-
@client.describe_db_parameters(db_parameter_group_name: parameter_group.db_parameter_group_name).parameters
|
50
|
+
@client.describe_db_parameters(db_parameter_group_name: parameter_group.db_parameter_group_name).map(&:parameters).flatten
|
51
51
|
end
|
52
52
|
|
53
53
|
def module_name_of(parameter_group)
|
@@ -46,7 +46,7 @@ module Terraforming
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def db_security_groups
|
49
|
-
@client.describe_db_security_groups.db_security_groups.select { |sg| ingresses_of(sg).
|
49
|
+
@client.describe_db_security_groups.map(&:db_security_groups).flatten.select { |sg| !ingresses_of(sg).empty? }
|
50
50
|
end
|
51
51
|
|
52
52
|
def module_name_of(security_group)
|
@@ -25,24 +25,24 @@ module Terraforming
|
|
25
25
|
block_devices = block_devices_of(instance)
|
26
26
|
|
27
27
|
attributes = {
|
28
|
-
"ami"=> instance.image_id,
|
29
|
-
"associate_public_ip_address"=> "true",
|
30
|
-
"availability_zone"=> instance.placement.availability_zone,
|
31
|
-
"ebs_block_device.#"=> ebs_block_devices_in(block_devices, instance).length.to_s,
|
32
|
-
"ebs_optimized"=> instance.ebs_optimized.to_s,
|
28
|
+
"ami" => instance.image_id,
|
29
|
+
"associate_public_ip_address" => "true",
|
30
|
+
"availability_zone" => instance.placement.availability_zone,
|
31
|
+
"ebs_block_device.#" => ebs_block_devices_in(block_devices, instance).length.to_s,
|
32
|
+
"ebs_optimized" => instance.ebs_optimized.to_s,
|
33
33
|
"ephemeral_block_device.#" => "0", # Terraform 0.6.1 cannot fetch this field from AWS
|
34
|
-
"id"=> instance.instance_id,
|
35
|
-
"instance_type"=> instance.instance_type,
|
34
|
+
"id" => instance.instance_id,
|
35
|
+
"instance_type" => instance.instance_type,
|
36
36
|
"monitoring" => monitoring_state(instance).to_s,
|
37
|
-
"private_dns"=> instance.private_dns_name,
|
38
|
-
"private_ip"=> instance.private_ip_address,
|
39
|
-
"public_dns"=> instance.public_dns_name,
|
40
|
-
"public_ip"=> instance.public_ip_address,
|
41
|
-
"root_block_device.#"=> root_block_devices_in(block_devices, instance).length.to_s,
|
42
|
-
"security_groups.#"=> in_vpc ? "0" : instance.security_groups.length.to_s,
|
43
|
-
"source_dest_check"=> instance.source_dest_check.to_s,
|
44
|
-
"tenancy"=> instance.placement.tenancy,
|
45
|
-
"vpc_security_group_ids.#"=> in_vpc ? instance.security_groups.length.to_s : "0",
|
37
|
+
"private_dns" => instance.private_dns_name,
|
38
|
+
"private_ip" => instance.private_ip_address,
|
39
|
+
"public_dns" => instance.public_dns_name,
|
40
|
+
"public_ip" => instance.public_ip_address,
|
41
|
+
"root_block_device.#" => root_block_devices_in(block_devices, instance).length.to_s,
|
42
|
+
"security_groups.#" => in_vpc ? "0" : instance.security_groups.length.to_s,
|
43
|
+
"source_dest_check" => instance.source_dest_check.to_s,
|
44
|
+
"tenancy" => instance.placement.tenancy,
|
45
|
+
"vpc_security_group_ids.#" => in_vpc ? instance.security_groups.length.to_s : "0",
|
46
46
|
}
|
47
47
|
|
48
48
|
placement_group = instance.placement.group_name
|
@@ -72,8 +72,8 @@ module Terraforming
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def block_devices_of(instance)
|
75
|
-
return []
|
76
|
-
@client.describe_volumes(volume_ids: block_device_ids_of(instance)).volumes
|
75
|
+
return [] if instance.block_device_mappings.empty?
|
76
|
+
@client.describe_volumes(volume_ids: block_device_ids_of(instance)).map(&:volumes).flatten
|
77
77
|
end
|
78
78
|
|
79
79
|
def block_device_mapping_of(instance, volume_id)
|
@@ -92,8 +92,8 @@ module Terraforming
|
|
92
92
|
# https://github.com/hashicorp/terraform/blob/281e4d3e67f66daab9cdb1f7c8b6f602d949e5ee/builtin/providers/aws/resource_aws_instance.go#L481-L501
|
93
93
|
#
|
94
94
|
def in_vpc?(instance)
|
95
|
-
vpc_security_groups_of(instance).
|
96
|
-
(instance.subnet_id && instance.subnet_id != "" && instance.security_groups.
|
95
|
+
!vpc_security_groups_of(instance).empty? ||
|
96
|
+
(instance.subnet_id && instance.subnet_id != "" && instance.security_groups.empty?)
|
97
97
|
end
|
98
98
|
|
99
99
|
def monitoring_state(instance)
|
@@ -101,7 +101,9 @@ module Terraforming
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def instances
|
104
|
-
@client.describe_instances.reservations.map(&:instances).flatten.reject
|
104
|
+
@client.describe_instances.map(&:reservations).flatten.map(&:instances).flatten.reject do |instance|
|
105
|
+
instance.state.name == "terminated"
|
106
|
+
end
|
105
107
|
end
|
106
108
|
|
107
109
|
def module_name_of(instance)
|
@@ -29,9 +29,9 @@ module Terraforming
|
|
29
29
|
"network_interface" => addr.network_interface_id,
|
30
30
|
"private_ip" => addr.private_ip_address,
|
31
31
|
"public_ip" => addr.public_ip,
|
32
|
-
"vpc" =>
|
32
|
+
"vpc" => vpc?(addr).to_s,
|
33
33
|
}
|
34
|
-
attributes.delete_if{|
|
34
|
+
attributes.delete_if { |_k, v| v.nil? }
|
35
35
|
resources["aws_eip.#{addr.allocation_id}"] = {
|
36
36
|
"type" => "aws_eip",
|
37
37
|
"primary" => {
|
@@ -47,10 +47,10 @@ module Terraforming
|
|
47
47
|
private
|
48
48
|
|
49
49
|
def eips
|
50
|
-
@client.describe_addresses.addresses
|
50
|
+
@client.describe_addresses.map(&:addresses).flatten
|
51
51
|
end
|
52
52
|
|
53
|
-
def
|
53
|
+
def vpc?(addr)
|
54
54
|
addr.domain.eql?("vpc")
|
55
55
|
end
|
56
56
|
end
|
@@ -37,10 +37,10 @@ module Terraforming
|
|
37
37
|
}
|
38
38
|
|
39
39
|
attributes["port"] = if cache_cluster.configuration_endpoint
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
cache_cluster.configuration_endpoint.port.to_s
|
41
|
+
else
|
42
|
+
cache_cluster.cache_nodes[0].endpoint.port.to_s
|
43
|
+
end
|
44
44
|
|
45
45
|
resources["aws_elasticache_cluster.#{cache_cluster.cache_cluster_id}"] = {
|
46
46
|
"type" => "aws_elasticache_cluster",
|
@@ -57,11 +57,11 @@ module Terraforming
|
|
57
57
|
private
|
58
58
|
|
59
59
|
def cache_clusters
|
60
|
-
@client.describe_cache_clusters(show_cache_node_info: true).cache_clusters
|
60
|
+
@client.describe_cache_clusters(show_cache_node_info: true).map(&:cache_clusters).flatten
|
61
61
|
end
|
62
62
|
|
63
63
|
def cluster_in_vpc?(cache_cluster)
|
64
|
-
cache_cluster.cache_security_groups.
|
64
|
+
cache_cluster.cache_security_groups.empty?
|
65
65
|
end
|
66
66
|
|
67
67
|
def security_group_ids_of(cache_cluster)
|
@@ -48,7 +48,6 @@ module Terraforming
|
|
48
48
|
attributes.merge!(instances_attributes_of(load_balancer))
|
49
49
|
attributes.merge!(tags_attributes_of(load_balancer))
|
50
50
|
|
51
|
-
|
52
51
|
resources["aws_elb.#{module_name_of(load_balancer)}"] = {
|
53
52
|
"type" => "aws_elb",
|
54
53
|
"primary" => {
|
@@ -106,7 +105,7 @@ module Terraforming
|
|
106
105
|
|
107
106
|
def tags_attributes_of(elb)
|
108
107
|
tags = @client.describe_tags(load_balancer_names: [elb.load_balancer_name]).tag_descriptions.first.tags
|
109
|
-
attributes = {"tags.#" => tags.length.to_s}
|
108
|
+
attributes = { "tags.#" => tags.length.to_s }
|
110
109
|
|
111
110
|
tags.each do |tag|
|
112
111
|
attributes["tags.#{tag.key}"] = tag.value
|
@@ -116,7 +115,7 @@ module Terraforming
|
|
116
115
|
end
|
117
116
|
|
118
117
|
def instances_attributes_of(elb)
|
119
|
-
attributes = {"instances.#" => elb.instances.length.to_s}
|
118
|
+
attributes = { "instances.#" => elb.instances.length.to_s }
|
120
119
|
|
121
120
|
elb.instances.each do |instance|
|
122
121
|
attributes["instances.#{Zlib.crc32(instance.instance_id)}"] = instance.instance_id
|
@@ -126,7 +125,7 @@ module Terraforming
|
|
126
125
|
end
|
127
126
|
|
128
127
|
def subnets_attributes_of(elb)
|
129
|
-
attributes = {"subnets.#" => elb.subnets.length.to_s}
|
128
|
+
attributes = { "subnets.#" => elb.subnets.length.to_s }
|
130
129
|
|
131
130
|
elb.subnets.each do |subnet_id|
|
132
131
|
attributes["subnets.#{Zlib.crc32(subnet_id)}"] = subnet_id
|
@@ -136,7 +135,7 @@ module Terraforming
|
|
136
135
|
end
|
137
136
|
|
138
137
|
def sg_attributes_of(elb)
|
139
|
-
attributes = {"security_groups.#" => elb.security_groups.length.to_s}
|
138
|
+
attributes = { "security_groups.#" => elb.security_groups.length.to_s }
|
140
139
|
|
141
140
|
elb.security_groups.each do |sg_id|
|
142
141
|
attributes["security_groups.#{Zlib.crc32(sg_id)}"] = sg_id
|
@@ -146,7 +145,7 @@ module Terraforming
|
|
146
145
|
end
|
147
146
|
|
148
147
|
def listeners_attributes_of(elb)
|
149
|
-
attributes = {"listener.#" => elb.listener_descriptions.length.to_s}
|
148
|
+
attributes = { "listener.#" => elb.listener_descriptions.length.to_s }
|
150
149
|
|
151
150
|
elb.listener_descriptions.each do |listener_description|
|
152
151
|
attributes.merge!(listener_attributes_of(listener_description.listener))
|
@@ -181,7 +180,7 @@ module Terraforming
|
|
181
180
|
end
|
182
181
|
|
183
182
|
def load_balancers
|
184
|
-
@client.describe_load_balancers.load_balancer_descriptions
|
183
|
+
@client.describe_load_balancers.map(&:load_balancer_descriptions).flatten
|
185
184
|
end
|
186
185
|
|
187
186
|
def load_balancer_attributes_of(load_balancer)
|
@@ -22,7 +22,7 @@ module Terraforming
|
|
22
22
|
def tfstate
|
23
23
|
iam_groups.inject({}) do |resources, group|
|
24
24
|
attributes = {
|
25
|
-
"arn"=> group.arn,
|
25
|
+
"arn" => group.arn,
|
26
26
|
"id" => group.group_name,
|
27
27
|
"name" => group.group_name,
|
28
28
|
"path" => group.path,
|
@@ -43,7 +43,7 @@ module Terraforming
|
|
43
43
|
private
|
44
44
|
|
45
45
|
def iam_groups
|
46
|
-
@client.list_groups.
|
46
|
+
@client.list_groups.map(&:groups).flatten
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
@@ -24,7 +24,7 @@ module Terraforming
|
|
24
24
|
membership_name = membership_name_of(group)
|
25
25
|
|
26
26
|
attributes = {
|
27
|
-
"group"=> group.group_name,
|
27
|
+
"group" => group.group_name,
|
28
28
|
"id" => membership_name,
|
29
29
|
"name" => membership_name,
|
30
30
|
"users.#" => group_members_of(group).length.to_s,
|
@@ -44,11 +44,11 @@ module Terraforming
|
|
44
44
|
private
|
45
45
|
|
46
46
|
def group_members_of(group)
|
47
|
-
@client.get_group(group_name: group.group_name).users.map
|
47
|
+
@client.get_group(group_name: group.group_name).map(&:users).flatten.map(&:user_name)
|
48
48
|
end
|
49
49
|
|
50
50
|
def iam_groups
|
51
|
-
@client.list_groups.groups
|
51
|
+
@client.list_groups.map(&:groups).flatten
|
52
52
|
end
|
53
53
|
|
54
54
|
def membership_name_of(group)
|
@@ -45,14 +45,14 @@ module Terraforming
|
|
45
45
|
"#{policy.group_name}_#{policy.policy_name}"
|
46
46
|
end
|
47
47
|
|
48
|
-
def iam_groups
|
49
|
-
@client.list_groups.groups
|
50
|
-
end
|
51
|
-
|
52
48
|
def iam_group_policy_id_of(policy)
|
53
49
|
"#{policy.group_name}:#{policy.policy_name}"
|
54
50
|
end
|
55
51
|
|
52
|
+
def iam_groups
|
53
|
+
@client.list_groups.map(&:groups).flatten
|
54
|
+
end
|
55
|
+
|
56
56
|
def iam_group_policy_names_in(group)
|
57
57
|
@client.list_group_policies(group_name: group.group_name).policy_names
|
58
58
|
end
|
@@ -48,11 +48,24 @@ module Terraforming
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def entities_for_policy(policy)
|
51
|
-
|
51
|
+
# list_entities_for_policy is a weird one: the response class
|
52
|
+
# has three different member variables that we need to
|
53
|
+
# paginate through altogether.
|
54
|
+
result = Aws::IAM::Types::ListEntitiesForPolicyResponse.new
|
55
|
+
result.policy_groups = []
|
56
|
+
result.policy_users = []
|
57
|
+
result.policy_roles = []
|
58
|
+
@client.list_entities_for_policy(policy_arn: policy.arn).each do |resp|
|
59
|
+
result.policy_groups += resp.policy_groups
|
60
|
+
result.policy_users += resp.policy_users
|
61
|
+
result.policy_roles += resp.policy_roles
|
62
|
+
end
|
63
|
+
|
64
|
+
result
|
52
65
|
end
|
53
66
|
|
54
67
|
def iam_policies
|
55
|
-
@client.list_policies(scope: "
|
68
|
+
@client.list_policies(scope: "All", only_attached: true).map(&:policies).flatten
|
56
69
|
end
|
57
70
|
|
58
71
|
def iam_policy_attachments
|
@@ -45,14 +45,14 @@ module Terraforming
|
|
45
45
|
"#{policy.role_name}_#{policy.policy_name}"
|
46
46
|
end
|
47
47
|
|
48
|
-
def iam_roles
|
49
|
-
@client.list_roles.roles
|
50
|
-
end
|
51
|
-
|
52
48
|
def iam_role_policy_id_of(policy)
|
53
49
|
"#{policy.role_name}:#{policy.policy_name}"
|
54
50
|
end
|
55
51
|
|
52
|
+
def iam_roles
|
53
|
+
@client.list_roles.map(&:roles).flatten
|
54
|
+
end
|
55
|
+
|
56
56
|
def iam_role_policy_names_in(role)
|
57
57
|
@client.list_role_policies(role_name: role.role_name).policy_names
|
58
58
|
end
|
@@ -22,7 +22,7 @@ module Terraforming
|
|
22
22
|
def tfstate
|
23
23
|
iam_users.inject({}) do |resources, user|
|
24
24
|
attributes = {
|
25
|
-
"arn"=> user.arn,
|
25
|
+
"arn" => user.arn,
|
26
26
|
"id" => user.user_name,
|
27
27
|
"name" => user.user_name,
|
28
28
|
"path" => user.path,
|
@@ -43,7 +43,7 @@ module Terraforming
|
|
43
43
|
private
|
44
44
|
|
45
45
|
def iam_users
|
46
|
-
@client.list_users.
|
46
|
+
@client.list_users.map(&:users).flatten
|
47
47
|
end
|
48
48
|
|
49
49
|
def module_name_of(user)
|
@@ -45,14 +45,14 @@ module Terraforming
|
|
45
45
|
"#{policy.user_name}_#{policy.policy_name}"
|
46
46
|
end
|
47
47
|
|
48
|
-
def iam_users
|
49
|
-
@client.list_users.users
|
50
|
-
end
|
51
|
-
|
52
48
|
def iam_user_policy_id_of(policy)
|
53
49
|
"#{policy.user_name}:#{policy.policy_name}"
|
54
50
|
end
|
55
51
|
|
52
|
+
def iam_users
|
53
|
+
@client.list_users.map(&:users).flatten
|
54
|
+
end
|
55
|
+
|
56
56
|
def iam_user_policy_names_in(user)
|
57
57
|
@client.list_user_policies(user_name: user.user_name).policy_names
|
58
58
|
end
|
@@ -21,7 +21,6 @@ module Terraforming
|
|
21
21
|
|
22
22
|
def tfstate
|
23
23
|
launch_configurations.inject({}) do |resources, lc|
|
24
|
-
|
25
24
|
attributes = {
|
26
25
|
"name" => lc.launch_configuration_name,
|
27
26
|
"image_id" => lc.image_id,
|
@@ -72,7 +71,7 @@ module Terraforming
|
|
72
71
|
end
|
73
72
|
|
74
73
|
def ebs_block_device?(block_device)
|
75
|
-
block_device.virtual_name
|
74
|
+
block_device.virtual_name.nil? && block_device.ebs
|
76
75
|
end
|
77
76
|
|
78
77
|
def ebs_block_device_count(launch_configuration)
|
@@ -96,9 +95,7 @@ module Terraforming
|
|
96
95
|
end
|
97
96
|
|
98
97
|
def launch_configurations
|
99
|
-
@client.describe_launch_configurations.
|
100
|
-
r.launch_configurations
|
101
|
-
end.flatten
|
98
|
+
@client.describe_launch_configurations.map(&:launch_configurations).flatten
|
102
99
|
end
|
103
100
|
|
104
101
|
def module_name_of(launch_configuration)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module Terraforming
|
2
|
+
module Resource
|
3
|
+
class NATGateway
|
4
|
+
include Terraforming::Util
|
5
|
+
|
6
|
+
def self.tf(client: Aws::EC2::Client.new)
|
7
|
+
self.new(client).tf
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.tfstate(client: Aws::EC2::Client.new)
|
11
|
+
self.new(client).tfstate
|
12
|
+
end
|
13
|
+
|
14
|
+
def initialize(client)
|
15
|
+
@client = client
|
16
|
+
end
|
17
|
+
|
18
|
+
def tf
|
19
|
+
apply_template(@client, "tf/nat_gateway")
|
20
|
+
end
|
21
|
+
|
22
|
+
def tfstate
|
23
|
+
nat_gateways.inject({}) do |resources, nat_gateway|
|
24
|
+
next resources if nat_gateway.nat_gateway_addresses.empty?
|
25
|
+
|
26
|
+
attributes = {
|
27
|
+
"id" => nat_gateway.nat_gateway_id,
|
28
|
+
"allocation_id" => nat_gateway.nat_gateway_addresses[0].allocation_id,
|
29
|
+
"subnet_id" => nat_gateway.subnet_id,
|
30
|
+
"network_inferface_id" => nat_gateway.nat_gateway_addresses[0].network_interface_id,
|
31
|
+
"private_ip" => nat_gateway.nat_gateway_addresses[0].private_ip,
|
32
|
+
"public_ip" => nat_gateway.nat_gateway_addresses[0].public_ip,
|
33
|
+
}
|
34
|
+
resources["aws_nat_gateway.#{module_name_of(nat_gateway)}"] = {
|
35
|
+
"type" => "aws_nat_gateway",
|
36
|
+
"primary" => {
|
37
|
+
"id" => nat_gateway.nat_gateway_id,
|
38
|
+
"attributes" => attributes
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
resources
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def nat_gateways
|
49
|
+
@client.describe_nat_gateways.nat_gateways
|
50
|
+
end
|
51
|
+
|
52
|
+
def module_name_of(nat_gateway)
|
53
|
+
normalize_module_name(nat_gateway.nat_gateway_id)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -49,7 +49,7 @@ module Terraforming
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def private_ips_of(network_interface)
|
52
|
-
network_interface.private_ip_addresses.map{|addr| addr.private_ip_address }
|
52
|
+
network_interface.private_ip_addresses.map { |addr| addr.private_ip_address }
|
53
53
|
end
|
54
54
|
|
55
55
|
def security_groups_of(network_interface)
|
@@ -61,9 +61,8 @@ module Terraforming
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def network_interfaces
|
64
|
-
@client.describe_network_interfaces.network_interfaces
|
64
|
+
@client.describe_network_interfaces.map(&:network_interfaces).flatten
|
65
65
|
end
|
66
|
-
|
67
66
|
end
|
68
67
|
end
|
69
68
|
end
|
@@ -25,8 +25,8 @@ module Terraforming
|
|
25
25
|
record_id = record_id_of(record, zone_id)
|
26
26
|
|
27
27
|
attributes = {
|
28
|
-
"id"=> record_id,
|
29
|
-
"name"=> name_of(record.name.gsub(/\\052/, '*')),
|
28
|
+
"id" => record_id,
|
29
|
+
"name" => name_of(record.name.gsub(/\\052/, '*')),
|
30
30
|
"type" => record.type,
|
31
31
|
"zone_id" => zone_id,
|
32
32
|
}
|
@@ -52,7 +52,7 @@ module Terraforming
|
|
52
52
|
private
|
53
53
|
|
54
54
|
def hosted_zones
|
55
|
-
@client.list_hosted_zones.hosted_zones
|
55
|
+
@client.list_hosted_zones.map(&:hosted_zones).flatten
|
56
56
|
end
|
57
57
|
|
58
58
|
def record_id_of(record, zone_id)
|
@@ -81,7 +81,7 @@ module Terraforming
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def zone_id_of(hosted_zone)
|
84
|
-
hosted_zone.id.gsub(
|
84
|
+
hosted_zone.id.gsub(%r{\A/hostedzone/}, "")
|
85
85
|
end
|
86
86
|
end
|
87
87
|
end
|
@@ -25,9 +25,9 @@ module Terraforming
|
|
25
25
|
vpc = vpc_of(hosted_zone)
|
26
26
|
|
27
27
|
attributes = {
|
28
|
-
"comment"=> comment_of(hosted_zone),
|
29
|
-
"id"=> zone_id,
|
30
|
-
"name"=> name_of(hosted_zone),
|
28
|
+
"comment" => comment_of(hosted_zone),
|
29
|
+
"id" => zone_id,
|
30
|
+
"name" => name_of(hosted_zone),
|
31
31
|
"name_servers.#" => name_servers_of(hosted_zone).length.to_s,
|
32
32
|
"tags.#" => tags_of(hosted_zone).length.to_s,
|
33
33
|
"vpc_id" => vpc ? vpc.vpc_id : "",
|
@@ -49,7 +49,7 @@ module Terraforming
|
|
49
49
|
private
|
50
50
|
|
51
51
|
def hosted_zones
|
52
|
-
@client.list_hosted_zones.hosted_zones.map { |hosted_zone| @client.get_hosted_zone(id: hosted_zone.id) }
|
52
|
+
@client.list_hosted_zones.map(&:hosted_zones).flatten.map { |hosted_zone| @client.get_hosted_zone(id: hosted_zone.id) }
|
53
53
|
end
|
54
54
|
|
55
55
|
def tags_of(hosted_zone)
|
@@ -82,7 +82,7 @@ module Terraforming
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def zone_id_of(hosted_zone)
|
85
|
-
hosted_zone.hosted_zone.id.gsub(
|
85
|
+
hosted_zone.hosted_zone.id.gsub(%r{\A/hostedzone/}, "")
|
86
86
|
end
|
87
87
|
end
|
88
88
|
end
|
@@ -47,8 +47,8 @@ module Terraforming
|
|
47
47
|
def routes_of(route_table)
|
48
48
|
route_table.routes.reject do |route|
|
49
49
|
route.gateway_id.to_s == 'local' ||
|
50
|
-
|
51
|
-
|
50
|
+
route.origin.to_s == 'EnableVgwRoutePropagation' ||
|
51
|
+
route.destination_prefix_list_id
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -57,7 +57,7 @@ module Terraforming
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def route_tables
|
60
|
-
@client.describe_route_tables.route_tables
|
60
|
+
@client.describe_route_tables.map(&:route_tables).flatten
|
61
61
|
end
|
62
62
|
|
63
63
|
def routes_attributes_of(route_table)
|
@@ -75,7 +75,7 @@ module Terraforming
|
|
75
75
|
|
76
76
|
def module_name_of(security_group)
|
77
77
|
if security_group.vpc_id.nil?
|
78
|
-
normalize_module_name(
|
78
|
+
normalize_module_name(security_group.group_name.to_s)
|
79
79
|
else
|
80
80
|
normalize_module_name("#{security_group.vpc_id}-#{security_group.group_name}")
|
81
81
|
end
|
@@ -83,8 +83,9 @@ module Terraforming
|
|
83
83
|
|
84
84
|
def permission_attributes_of(security_group, permission, type)
|
85
85
|
hashcode = permission_hashcode_of(security_group, permission)
|
86
|
-
security_groups = security_groups_in(permission, security_group).reject
|
87
|
-
|
86
|
+
security_groups = security_groups_in(permission, security_group).reject do |identifier|
|
87
|
+
[security_group.group_name, security_group.group_id].include?(identifier)
|
88
|
+
end
|
88
89
|
|
89
90
|
attributes = {
|
90
91
|
"#{type}.#{hashcode}.from_port" => (permission.from_port || 0).to_s,
|
@@ -140,7 +141,7 @@ module Terraforming
|
|
140
141
|
"#{permission.from_port || 0}-" <<
|
141
142
|
"#{permission.to_port || 0}-" <<
|
142
143
|
"#{permission.ip_protocol}-" <<
|
143
|
-
"#{self_referenced_permission?(security_group, permission)
|
144
|
+
"#{self_referenced_permission?(security_group, permission)}-"
|
144
145
|
|
145
146
|
permission.ip_ranges.each { |range| string << "#{range.cidr_ip}-" }
|
146
147
|
security_groups_in(permission, security_group).each { |group| string << "#{group}-" }
|
@@ -153,11 +154,11 @@ module Terraforming
|
|
153
154
|
end
|
154
155
|
|
155
156
|
def security_groups
|
156
|
-
@client.describe_security_groups.security_groups
|
157
|
+
@client.describe_security_groups.map(&:security_groups).flatten
|
157
158
|
end
|
158
159
|
|
159
160
|
def security_groups_in(permission, security_group)
|
160
|
-
permission.user_id_group_pairs.map
|
161
|
+
permission.user_id_group_pairs.map do |range|
|
161
162
|
# EC2-Classic, same account
|
162
163
|
if security_group.owner_id == range.user_id && !range.group_name.nil?
|
163
164
|
range.group_name
|
@@ -168,7 +169,7 @@ module Terraforming
|
|
168
169
|
else
|
169
170
|
"#{range.user_id}/#{range.group_name}"
|
170
171
|
end
|
171
|
-
|
172
|
+
end
|
172
173
|
end
|
173
174
|
|
174
175
|
def tags_attributes_of(security_group)
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<% eips.each do |addr| -%>
|
2
2
|
resource "aws_eip" "<%= addr.allocation_id %>" {
|
3
3
|
<% if addr.instance_id -%>
|
4
|
-
instance
|
4
|
+
instance = "<%= addr.instance_id %>"
|
5
5
|
<% elsif addr.network_interface_id -%>
|
6
|
-
|
6
|
+
network_interface = "<%= addr.network_interface_id %>"
|
7
7
|
<% end -%>
|
8
|
-
vpc
|
8
|
+
vpc = <%= vpc?(addr) %>
|
9
9
|
}
|
10
10
|
|
11
11
|
<% end -%>
|
@@ -10,7 +10,9 @@ resource "aws_launch_configuration" "<%= module_name_of(launch_configuration) %>
|
|
10
10
|
key_name = "<%= launch_configuration.key_name %>"
|
11
11
|
<%- end -%>
|
12
12
|
security_groups = <%= launch_configuration.security_groups.map { |sg| sg }.inspect %>
|
13
|
+
<%- unless launch_configuration.associate_public_ip_address.nil? -%>
|
13
14
|
associate_public_ip_address = <%= launch_configuration.associate_public_ip_address %>
|
15
|
+
<%- end -%>
|
14
16
|
<%- unless launch_configuration.user_data.empty? -%>
|
15
17
|
user_data = "<%= launch_configuration.user_data %>"
|
16
18
|
<%- end -%>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<% nat_gateways.each do |nat_gateway| -%>
|
2
|
+
<% unless nat_gateway.nat_gateway_addresses.empty? -%>
|
3
|
+
resource "aws_nat_gateway" "<%= module_name_of(nat_gateway) %>" {
|
4
|
+
allocation_id = "<%= nat_gateway.nat_gateway_addresses[0].allocation_id %>"
|
5
|
+
subnet_id = "<%= nat_gateway.subnet_id %>"
|
6
|
+
}
|
7
|
+
|
8
|
+
<% end -%>
|
9
|
+
<% end -%>
|
data/lib/terraforming/version.rb
CHANGED
data/terraforming.gemspec
CHANGED
@@ -19,8 +19,8 @@ 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.
|
23
|
-
spec.add_dependency "oj", "~> 2.
|
22
|
+
spec.add_dependency "aws-sdk", "~> 2.5.1"
|
23
|
+
spec.add_dependency "oj", "~> 2.17.1"
|
24
24
|
spec.add_dependency "ox", "~> 2.4.0"
|
25
25
|
spec.add_dependency "thor"
|
26
26
|
|
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.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daisuke Fujita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.5.1
|
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.5.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: oj
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.17.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.
|
40
|
+
version: 2.17.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: ox
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,6 +146,7 @@ extra_rdoc_files: []
|
|
146
146
|
files:
|
147
147
|
- ".gitignore"
|
148
148
|
- ".rspec"
|
149
|
+
- ".rubocop.yml"
|
149
150
|
- ".travis.yml"
|
150
151
|
- CHANGELOG.md
|
151
152
|
- CODE_OF_CONDUCT.md
|
@@ -179,6 +180,7 @@ files:
|
|
179
180
|
- lib/terraforming/resource/iam_user_policy.rb
|
180
181
|
- lib/terraforming/resource/internet_gateway.rb
|
181
182
|
- lib/terraforming/resource/launch_configuration.rb
|
183
|
+
- lib/terraforming/resource/nat_gateway.rb
|
182
184
|
- lib/terraforming/resource/network_acl.rb
|
183
185
|
- lib/terraforming/resource/network_interface.rb
|
184
186
|
- lib/terraforming/resource/rds.rb
|
@@ -214,6 +216,7 @@ files:
|
|
214
216
|
- lib/terraforming/template/tf/iam_user_policy.erb
|
215
217
|
- lib/terraforming/template/tf/internet_gateway.erb
|
216
218
|
- lib/terraforming/template/tf/launch_configuration.erb
|
219
|
+
- lib/terraforming/template/tf/nat_gateway.erb
|
217
220
|
- lib/terraforming/template/tf/network_acl.erb
|
218
221
|
- lib/terraforming/template/tf/network_interface.erb
|
219
222
|
- lib/terraforming/template/tf/rds.erb
|