terraforming 0.1.0 → 0.1.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 +8 -0
- data/README.md +162 -9
- data/lib/terraforming/cli.rb +17 -2
- data/lib/terraforming/resource/elasti_cache_cluster.rb +72 -0
- data/lib/terraforming/resource/elasti_cache_subnet_group.rb +54 -0
- data/lib/terraforming/resource/iam_group_membership.rb +61 -0
- data/lib/terraforming/template/tf/elasti_cache_cluster.erb +18 -0
- data/lib/terraforming/template/tf/elasti_cache_subnet_group.erb +8 -0
- data/lib/terraforming/template/tf/iam_group_membership.erb +8 -0
- data/lib/terraforming/version.rb +1 -1
- data/lib/terraforming.rb +3 -0
- data/terraforming.gemspec +2 -2
- metadata +12 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 732437685979fbd266b3f855c81ffb184be35856
|
4
|
+
data.tar.gz: 5f3ef26d21cab520886d5a4ebff23e2af13d5b03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c564d548f74b3650cf1509388cafd66bc831e705f16c881f05aa8cf5507aa93e35106f15eb5b0f74f77cbacae9f342508751417219e3ae009c94339806d6cd72
|
7
|
+
data.tar.gz: e451f2a2619e7cad7658fbfc33155fe948edb7e583fb2f4cb914b3b16d9a4dd6a444b98d08ec2301a56cb28bb876aebd2c454bb5797cbbfff864b9fa2e8d69f6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# [v0.1.1](https://github.com/dtan4/terraforming/releases/tag/v0.1.1) (2015-07-14)
|
2
|
+
|
3
|
+
### Resource
|
4
|
+
|
5
|
+
- AWS ElastiCache Cluster
|
6
|
+
- AWS ElastiCache Subnet Group
|
7
|
+
- AWS IAM Group Membership
|
8
|
+
|
1
9
|
# [v0.1.0](https://github.com/dtan4/terraforming/releases/tag/v0.1.0) (2015-06-20)
|
2
10
|
|
3
11
|
### New feature
|
data/README.md
CHANGED
@@ -8,7 +8,22 @@
|
|
8
8
|
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
|
9
9
|
[![Docker Repository on Quay.io](https://quay.io/repository/dtan4/terraforming/status "Docker Repository on Quay.io")](https://quay.io/repository/dtan4/terraforming)
|
10
10
|
|
11
|
-
|
11
|
+
Export existing AWS resources to [Terraform](https://terraform.io/) style (tf, tfstate)
|
12
|
+
|
13
|
+
- [Supported version](#supported-version)
|
14
|
+
- [Installation](#installation)
|
15
|
+
- [Prerequisites](#prerequisites)
|
16
|
+
- [Usage](#usage)
|
17
|
+
- [Export tf](#export-tf)
|
18
|
+
- [Export tfstate](#export-tfstate)
|
19
|
+
- [Run as Docker container](#run-as-docker-container-)
|
20
|
+
- [Development](#development)
|
21
|
+
- [Contributing](#contributing)
|
22
|
+
- [License](#license)
|
23
|
+
|
24
|
+
## Supported version
|
25
|
+
|
26
|
+
Ruby 2.x
|
12
27
|
|
13
28
|
## Installation
|
14
29
|
|
@@ -31,9 +46,9 @@ Or install it yourself as:
|
|
31
46
|
You need to set AWS credentials.
|
32
47
|
|
33
48
|
```bash
|
34
|
-
AWS_ACCESS_KEY_ID=
|
35
|
-
AWS_SECRET_ACCESS_KEY=
|
36
|
-
|
49
|
+
export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX
|
50
|
+
export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
51
|
+
export AWS_DEFAULT_REGION=xx-yyyy-0
|
37
52
|
```
|
38
53
|
|
39
54
|
## Usage
|
@@ -64,7 +79,9 @@ Commands:
|
|
64
79
|
terraforming vpc # VPC
|
65
80
|
```
|
66
81
|
|
67
|
-
|
82
|
+
### Export tf
|
83
|
+
|
84
|
+
(e.g. S3 buckets):
|
68
85
|
|
69
86
|
```bash
|
70
87
|
$ terraforming s3
|
@@ -82,7 +99,9 @@ resource "aws_s3_bucket" "fuga" {
|
|
82
99
|
}
|
83
100
|
```
|
84
101
|
|
85
|
-
|
102
|
+
### Export tfstate
|
103
|
+
|
104
|
+
Specify `--tfstate` option (e.g. S3 buckets):
|
86
105
|
|
87
106
|
```bash
|
88
107
|
$ terraforming s3 --tfstate
|
@@ -126,7 +145,142 @@ $ terraforming s3 --tfstate
|
|
126
145
|
}
|
127
146
|
```
|
128
147
|
|
129
|
-
|
148
|
+
If you want to merge exported tfstate to existing `terraform.tfstate`, specify `--tfstate --merge=/path/to/terraform.tfstate` option.
|
149
|
+
This option does NOT overwrite existing `terraform.tfstate`, but flush output to stdout like others.
|
150
|
+
You should copy output in stdout by hand or `pbcopy` command, and paste it to existing `terraform.tfstate`.
|
151
|
+
|
152
|
+
Existing `terraform.tfstate`:
|
153
|
+
|
154
|
+
```bash
|
155
|
+
# /path/to/terraform.tfstate
|
156
|
+
|
157
|
+
{
|
158
|
+
"version": 1,
|
159
|
+
"serial": 88,
|
160
|
+
"remote": {
|
161
|
+
"type": "s3",
|
162
|
+
"config": {
|
163
|
+
"bucket": "terraforming-tfstate",
|
164
|
+
"key": "tf"
|
165
|
+
}
|
166
|
+
},
|
167
|
+
"modules": {
|
168
|
+
"path": [
|
169
|
+
"root"
|
170
|
+
],
|
171
|
+
"outputs": {
|
172
|
+
},
|
173
|
+
"resources": {
|
174
|
+
"aws_elb.hogehoge": {
|
175
|
+
"type": "aws_elb",
|
176
|
+
"primary": {
|
177
|
+
"id": "hogehoge",
|
178
|
+
"attributes": {
|
179
|
+
"availability_zones.#": "2",
|
180
|
+
"connection_draining": "true",
|
181
|
+
"connection_draining_timeout": "300",
|
182
|
+
"cross_zone_load_balancing": "true",
|
183
|
+
"dns_name": "hoge-12345678.ap-northeast-1.elb.amazonaws.com",
|
184
|
+
"health_check.#": "1",
|
185
|
+
"id": "hogehoge",
|
186
|
+
"idle_timeout": "60",
|
187
|
+
"instances.#": "1",
|
188
|
+
"listener.#": "1",
|
189
|
+
"name": "hoge",
|
190
|
+
"security_groups.#": "2",
|
191
|
+
"source_security_group": "default",
|
192
|
+
"subnets.#": "2"
|
193
|
+
}
|
194
|
+
}
|
195
|
+
}
|
196
|
+
}
|
197
|
+
}
|
198
|
+
}
|
199
|
+
```
|
200
|
+
|
201
|
+
To generate merged tfstate:
|
202
|
+
|
203
|
+
```bash
|
204
|
+
$ terraforming s3 --tfstate --merge=/path/to/tfstate
|
205
|
+
```
|
206
|
+
|
207
|
+
```json
|
208
|
+
{
|
209
|
+
"version": 1,
|
210
|
+
"serial": 89,
|
211
|
+
"remote": {
|
212
|
+
"type": "s3",
|
213
|
+
"config": {
|
214
|
+
"bucket": "terraforming-tfstate",
|
215
|
+
"key": "tf"
|
216
|
+
}
|
217
|
+
},
|
218
|
+
"modules": {
|
219
|
+
"path": [
|
220
|
+
"root"
|
221
|
+
],
|
222
|
+
"outputs": {
|
223
|
+
},
|
224
|
+
"resources": {
|
225
|
+
"aws_elb.hogehoge": {
|
226
|
+
"type": "aws_elb",
|
227
|
+
"primary": {
|
228
|
+
"id": "hogehoge",
|
229
|
+
"attributes": {
|
230
|
+
"availability_zones.#": "2",
|
231
|
+
"connection_draining": "true",
|
232
|
+
"connection_draining_timeout": "300",
|
233
|
+
"cross_zone_load_balancing": "true",
|
234
|
+
"dns_name": "hoge-12345678.ap-northeast-1.elb.amazonaws.com",
|
235
|
+
"health_check.#": "1",
|
236
|
+
"id": "hogehoge",
|
237
|
+
"idle_timeout": "60",
|
238
|
+
"instances.#": "1",
|
239
|
+
"listener.#": "1",
|
240
|
+
"name": "hoge",
|
241
|
+
"security_groups.#": "2",
|
242
|
+
"source_security_group": "default",
|
243
|
+
"subnets.#": "2"
|
244
|
+
}
|
245
|
+
}
|
246
|
+
},
|
247
|
+
"aws_s3_bucket.hoge": {
|
248
|
+
"type": "aws_s3_bucket",
|
249
|
+
"primary": {
|
250
|
+
"id": "hoge",
|
251
|
+
"attributes": {
|
252
|
+
"acl": "private",
|
253
|
+
"bucket": "hoge",
|
254
|
+
"id": "hoge"
|
255
|
+
}
|
256
|
+
}
|
257
|
+
},
|
258
|
+
"aws_s3_bucket.fuga": {
|
259
|
+
"type": "aws_s3_bucket",
|
260
|
+
"primary": {
|
261
|
+
"id": "fuga",
|
262
|
+
"attributes": {
|
263
|
+
"acl": "private",
|
264
|
+
"bucket": "fuga",
|
265
|
+
"id": "fuga"
|
266
|
+
}
|
267
|
+
}
|
268
|
+
}
|
269
|
+
}
|
270
|
+
}
|
271
|
+
}
|
272
|
+
```
|
273
|
+
|
274
|
+
After writing exported tf and tfstate to files, execute `terraform plan` and check the result.
|
275
|
+
There should be no diff.
|
276
|
+
|
277
|
+
```bash
|
278
|
+
$ terraform plan
|
279
|
+
No changes. Infrastructure is up-to-date. This means that Terraform
|
280
|
+
could not detect any differences between your configuration and
|
281
|
+
the real physical resources that exist. As a result, Terraform
|
282
|
+
doesn't need to do anything.
|
283
|
+
```
|
130
284
|
|
131
285
|
## Run as Docker container [![Docker Repository on Quay.io](https://quay.io/repository/dtan4/terraforming/status "Docker Repository on Quay.io")](https://quay.io/repository/dtan4/terraforming)
|
132
286
|
|
@@ -144,7 +298,6 @@ And then run Terraforming as a Docker container:
|
|
144
298
|
$ docker run \
|
145
299
|
--rm \
|
146
300
|
--name terraforming \
|
147
|
-
-v /path/to/tf-files-dir:/app \
|
148
301
|
-e AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX \
|
149
302
|
-e AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
|
150
303
|
-e AWS_DEFAULT_REGION=xx-yyyy-0 \
|
@@ -166,6 +319,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
166
319
|
4. Push to the branch (`git push origin my-new-feature`)
|
167
320
|
5. Create a new Pull Request
|
168
321
|
|
169
|
-
##
|
322
|
+
## License
|
170
323
|
|
171
324
|
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
|
data/lib/terraforming/cli.rb
CHANGED
@@ -23,6 +23,16 @@ module Terraforming
|
|
23
23
|
execute(Terraforming::Resource::EC2, options)
|
24
24
|
end
|
25
25
|
|
26
|
+
desc "ecc", "ElastiCache Cluster"
|
27
|
+
def ecc
|
28
|
+
execute(Terraforming::Resource::ElastiCacheCluster, options)
|
29
|
+
end
|
30
|
+
|
31
|
+
desc "ecsn", "ElastiCache Subnet Group"
|
32
|
+
def ecsn
|
33
|
+
execute(Terraforming::Resource::ElastiCacheSubnetGroup, options)
|
34
|
+
end
|
35
|
+
|
26
36
|
desc "elb", "ELB"
|
27
37
|
def elb
|
28
38
|
execute(Terraforming::Resource::ELB, options)
|
@@ -33,6 +43,11 @@ module Terraforming
|
|
33
43
|
execute(Terraforming::Resource::IAMGroup, options)
|
34
44
|
end
|
35
45
|
|
46
|
+
desc "iamgm", "IAM Group Membership"
|
47
|
+
def iamgm
|
48
|
+
execute(Terraforming::Resource::IAMGroupMembership, options)
|
49
|
+
end
|
50
|
+
|
36
51
|
desc "iamgp", "IAM Group Policy"
|
37
52
|
def iamgp
|
38
53
|
execute(Terraforming::Resource::IAMGroupPolicy, options)
|
@@ -123,8 +138,8 @@ module Terraforming
|
|
123
138
|
def tfstate(klass, tfstate_path)
|
124
139
|
return klass.tfstate unless tfstate_path
|
125
140
|
|
126
|
-
|
127
|
-
klass.tfstate(tfstate_base:
|
141
|
+
tfstate_base = JSON.parse(open(tfstate_path).read)
|
142
|
+
klass.tfstate(tfstate_base: tfstate_base)
|
128
143
|
end
|
129
144
|
end
|
130
145
|
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
module Terraforming
|
2
|
+
module Resource
|
3
|
+
class ElastiCacheCluster
|
4
|
+
include Terraforming::Util
|
5
|
+
|
6
|
+
def self.tf(client: Aws::ElastiCache::Client.new)
|
7
|
+
self.new(client).tf
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.tfstate(client: Aws::ElastiCache::Client.new, tfstate_base: nil)
|
11
|
+
self.new(client).tfstate(tfstate_base)
|
12
|
+
end
|
13
|
+
|
14
|
+
def initialize(client)
|
15
|
+
@client = client
|
16
|
+
end
|
17
|
+
|
18
|
+
def tf
|
19
|
+
apply_template(@client, "tf/elasti_cache_cluster")
|
20
|
+
end
|
21
|
+
|
22
|
+
def tfstate(tfstate_base)
|
23
|
+
resources = cache_clusters.inject({}) do |result, cache_cluster|
|
24
|
+
attributes = {
|
25
|
+
"cache_nodes.#" => cache_cluster.cache_nodes.length.to_s,
|
26
|
+
"cluster_id" => cache_cluster.cache_cluster_id,
|
27
|
+
"engine" => cache_cluster.engine,
|
28
|
+
"engine_version" => cache_cluster.engine_version,
|
29
|
+
"id" => cache_cluster.cache_cluster_id,
|
30
|
+
"node_type" => cache_cluster.cache_node_type,
|
31
|
+
"num_cache_nodes" => "1",
|
32
|
+
"parameter_group_name" => cache_cluster.cache_parameter_group.cache_parameter_group_name,
|
33
|
+
"port" => "11211",
|
34
|
+
"security_group_ids.#" => security_group_ids_of(cache_cluster).length.to_s,
|
35
|
+
"security_group_names.#" => security_group_names_of(cache_cluster).length.to_s,
|
36
|
+
"subnet_group_name" => cache_cluster.cache_subnet_group_name,
|
37
|
+
"tags.#" => "0",
|
38
|
+
}
|
39
|
+
result["aws_elasticache_cluster.#{cache_cluster.cache_cluster_id}"] = {
|
40
|
+
"type" => "aws_elasticache_cluster",
|
41
|
+
"primary" => {
|
42
|
+
"id" => cache_cluster.cache_cluster_id,
|
43
|
+
"attributes" => attributes
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
result
|
48
|
+
end
|
49
|
+
|
50
|
+
generate_tfstate(resources, tfstate_base)
|
51
|
+
end
|
52
|
+
|
53
|
+
private
|
54
|
+
|
55
|
+
def cache_clusters
|
56
|
+
@client.describe_cache_clusters(show_cache_node_info: true).cache_clusters
|
57
|
+
end
|
58
|
+
|
59
|
+
def cluster_in_vpc?(cache_cluster)
|
60
|
+
cache_cluster.cache_security_groups.length == 0
|
61
|
+
end
|
62
|
+
|
63
|
+
def security_group_ids_of(cache_cluster)
|
64
|
+
cache_cluster.security_groups.map { |sg| sg.security_group_id }
|
65
|
+
end
|
66
|
+
|
67
|
+
def security_group_names_of(cache_cluster)
|
68
|
+
cache_cluster.cache_security_groups.map { |sg| sg.cache_security_group_name }
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Terraforming
|
2
|
+
module Resource
|
3
|
+
class ElastiCacheSubnetGroup
|
4
|
+
include Terraforming::Util
|
5
|
+
|
6
|
+
def self.tf(client: Aws::ElastiCache::Client.new)
|
7
|
+
self.new(client).tf
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.tfstate(client: Aws::ElastiCache::Client.new, tfstate_base: nil)
|
11
|
+
self.new(client).tfstate(tfstate_base)
|
12
|
+
end
|
13
|
+
|
14
|
+
def initialize(client)
|
15
|
+
@client = client
|
16
|
+
end
|
17
|
+
|
18
|
+
def tf
|
19
|
+
apply_template(@client, "tf/elasti_cache_subnet_group")
|
20
|
+
end
|
21
|
+
|
22
|
+
def tfstate(tfstate_base)
|
23
|
+
resources = cache_subnet_groups.inject({}) do |result, cache_subnet_group|
|
24
|
+
attributes = {
|
25
|
+
"description" => cache_subnet_group.cache_subnet_group_description,
|
26
|
+
"name" => cache_subnet_group.cache_subnet_group_name,
|
27
|
+
"subnet_ids.#" => subnet_ids_of(cache_subnet_group).length.to_s,
|
28
|
+
}
|
29
|
+
result["aws_elasticache_subnet_group.#{cache_subnet_group.cache_subnet_group_name}"] = {
|
30
|
+
"type" => "aws_elasticache_subnet_group",
|
31
|
+
"primary" => {
|
32
|
+
"id" => cache_subnet_group.cache_subnet_group_name,
|
33
|
+
"attributes" => attributes
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
result
|
38
|
+
end
|
39
|
+
|
40
|
+
generate_tfstate(resources, tfstate_base)
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def cache_subnet_groups
|
46
|
+
@client.describe_cache_subnet_groups.cache_subnet_groups
|
47
|
+
end
|
48
|
+
|
49
|
+
def subnet_ids_of(cache_subnet_group)
|
50
|
+
cache_subnet_group.subnets.map { |sn| sn.subnet_identifier }
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Terraforming
|
2
|
+
module Resource
|
3
|
+
class IAMGroupMembership
|
4
|
+
include Terraforming::Util
|
5
|
+
|
6
|
+
def self.tf(client: Aws::IAM::Client.new)
|
7
|
+
self.new(client).tf
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.tfstate(client: Aws::IAM::Client.new, tfstate_base: nil)
|
11
|
+
self.new(client).tfstate(tfstate_base)
|
12
|
+
end
|
13
|
+
|
14
|
+
def initialize(client)
|
15
|
+
@client = client
|
16
|
+
end
|
17
|
+
|
18
|
+
def tf
|
19
|
+
apply_template(@client, "tf/iam_group_membership")
|
20
|
+
end
|
21
|
+
|
22
|
+
def tfstate(tfstate_base)
|
23
|
+
resources = iam_groups.inject({}) do |result, group|
|
24
|
+
membership_name = membership_name_of(group)
|
25
|
+
|
26
|
+
attributes = {
|
27
|
+
"group"=> group.group_name,
|
28
|
+
"id" => membership_name,
|
29
|
+
"name" => membership_name,
|
30
|
+
"users.#" => group_members_of(group).length.to_s,
|
31
|
+
}
|
32
|
+
result["aws_iam_group_membership.#{group.group_name}"] = {
|
33
|
+
"type" => "aws_iam_group_membership",
|
34
|
+
"primary" => {
|
35
|
+
"id" => membership_name,
|
36
|
+
"attributes" => attributes
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
result
|
41
|
+
end
|
42
|
+
|
43
|
+
generate_tfstate(resources, tfstate_base)
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def group_members_of(group)
|
49
|
+
@client.get_group(group_name: group.group_name).users.map { |user| user.user_name }
|
50
|
+
end
|
51
|
+
|
52
|
+
def iam_groups
|
53
|
+
@client.list_groups.groups
|
54
|
+
end
|
55
|
+
|
56
|
+
def membership_name_of(group)
|
57
|
+
"#{group.group_name}-group-membership"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% cache_clusters.each do |cache_cluster| -%>
|
2
|
+
resource "aws_elasticache_cluster" "<%= cache_cluster.cache_cluster_id %>" {
|
3
|
+
cluster_id = "<%= cache_cluster.cache_cluster_id %>"
|
4
|
+
engine = "<%= cache_cluster.engine %>"
|
5
|
+
engine_version = "<%= cache_cluster.engine_version %>"
|
6
|
+
node_type = "<%= cache_cluster.cache_node_type %>"
|
7
|
+
num_cache_nodes = <%= cache_cluster.num_cache_nodes %>
|
8
|
+
parameter_group_name = "<%= cache_cluster.cache_parameter_group.cache_parameter_group_name %>"
|
9
|
+
port = <%= cache_cluster.configuration_endpoint.port %>
|
10
|
+
<%- if cluster_in_vpc?(cache_cluster) -%>
|
11
|
+
subnet_group_name = "<%= cache_cluster.cache_subnet_group_name %>"
|
12
|
+
security_group_ids = <%= security_group_ids_of(cache_cluster).inspect %>
|
13
|
+
<%- else -%>
|
14
|
+
security_group_names = <%= security_group_names_of(cache_cluster).inspect %>
|
15
|
+
<%- end -%>
|
16
|
+
}
|
17
|
+
|
18
|
+
<% end -%>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% cache_subnet_groups.each do |cache_subnet_group| -%>
|
2
|
+
resource "aws_elasticache_subnet_group" "<%= cache_subnet_group.cache_subnet_group_name %>" {
|
3
|
+
name = "<%= cache_subnet_group.cache_subnet_group_name %>"
|
4
|
+
description = "<%= cache_subnet_group.cache_subnet_group_description %>"
|
5
|
+
subnet_ids = <%= subnet_ids_of(cache_subnet_group).inspect %>
|
6
|
+
}
|
7
|
+
|
8
|
+
<% end -%>
|
data/lib/terraforming/version.rb
CHANGED
data/lib/terraforming.rb
CHANGED
@@ -15,8 +15,11 @@ require "terraforming/resource/db_parameter_group"
|
|
15
15
|
require "terraforming/resource/db_security_group"
|
16
16
|
require "terraforming/resource/db_subnet_group"
|
17
17
|
require "terraforming/resource/ec2"
|
18
|
+
require "terraforming/resource/elasti_cache_cluster"
|
19
|
+
require "terraforming/resource/elasti_cache_subnet_group"
|
18
20
|
require "terraforming/resource/elb"
|
19
21
|
require "terraforming/resource/iam_group"
|
22
|
+
require "terraforming/resource/iam_group_membership"
|
20
23
|
require "terraforming/resource/iam_group_policy"
|
21
24
|
require "terraforming/resource/iam_instance_profile"
|
22
25
|
require "terraforming/resource/iam_policy"
|
data/terraforming.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Daisuke Fujita"]
|
10
10
|
spec.email = ["dtanshi45@gmail.com"]
|
11
11
|
|
12
|
-
spec.summary = %q{
|
13
|
-
spec.description = %q{
|
12
|
+
spec.summary = %q{Export existing AWS resources to Terraform style (tf, tfstate)}
|
13
|
+
spec.description = %q{Export existing AWS resources to Terraform style (tf, tfstate)}
|
14
14
|
spec.homepage = "https://github.com/dtan4/terraforming"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
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.1.
|
4
|
+
version: 0.1.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-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -164,7 +164,7 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
-
description:
|
167
|
+
description: Export existing AWS resources to Terraform style (tf, tfstate)
|
168
168
|
email:
|
169
169
|
- dtanshi45@gmail.com
|
170
170
|
executables:
|
@@ -189,8 +189,11 @@ files:
|
|
189
189
|
- lib/terraforming/resource/db_security_group.rb
|
190
190
|
- lib/terraforming/resource/db_subnet_group.rb
|
191
191
|
- lib/terraforming/resource/ec2.rb
|
192
|
+
- lib/terraforming/resource/elasti_cache_cluster.rb
|
193
|
+
- lib/terraforming/resource/elasti_cache_subnet_group.rb
|
192
194
|
- lib/terraforming/resource/elb.rb
|
193
195
|
- lib/terraforming/resource/iam_group.rb
|
196
|
+
- lib/terraforming/resource/iam_group_membership.rb
|
194
197
|
- lib/terraforming/resource/iam_group_policy.rb
|
195
198
|
- lib/terraforming/resource/iam_instance_profile.rb
|
196
199
|
- lib/terraforming/resource/iam_policy.rb
|
@@ -210,8 +213,11 @@ files:
|
|
210
213
|
- lib/terraforming/template/tf/db_security_group.erb
|
211
214
|
- lib/terraforming/template/tf/db_subnet_group.erb
|
212
215
|
- lib/terraforming/template/tf/ec2.erb
|
216
|
+
- lib/terraforming/template/tf/elasti_cache_cluster.erb
|
217
|
+
- lib/terraforming/template/tf/elasti_cache_subnet_group.erb
|
213
218
|
- lib/terraforming/template/tf/elb.erb
|
214
219
|
- lib/terraforming/template/tf/iam_group.erb
|
220
|
+
- lib/terraforming/template/tf/iam_group_membership.erb
|
215
221
|
- lib/terraforming/template/tf/iam_group_policy.erb
|
216
222
|
- lib/terraforming/template/tf/iam_instance_profile.erb
|
217
223
|
- lib/terraforming/template/tf/iam_policy.erb
|
@@ -252,8 +258,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
258
|
version: '0'
|
253
259
|
requirements: []
|
254
260
|
rubyforge_project:
|
255
|
-
rubygems_version: 2.4.
|
261
|
+
rubygems_version: 2.4.7
|
256
262
|
signing_key:
|
257
263
|
specification_version: 4
|
258
|
-
summary:
|
264
|
+
summary: Export existing AWS resources to Terraform style (tf, tfstate)
|
259
265
|
test_files: []
|
266
|
+
has_rdoc:
|