domed-city 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/dome +8 -11
- data/lib/dome/environment.rb +1 -1
- data/lib/dome/terraform.rb +6 -0
- data/lib/dome/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: 1d99c9f67b0cb764bb7b36761a2c4e90c915ee94
|
4
|
+
data.tar.gz: 6aa2c3609ab8f1b88608a2cdcdd668ea9276926d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2ac36eef13ea7f05b2ae00261a28b9a1b293f479520c8dfd8c8e481ee1d6f10d56f6733300bf24c56ea50437f6170c677c569ada06622ec87e655e157100b66
|
7
|
+
data.tar.gz: e177fe3a851dc0ba125653745154e66aebf2e82f2d264ef15f0e5971c914b4553be6d63e8093980f52096e1d1d3392604396bd78db89c348f66a0d2a42295f6c
|
data/README.md
CHANGED
@@ -31,10 +31,10 @@ gem 'domed-city'
|
|
31
31
|
|
32
32
|
## Usage
|
33
33
|
|
34
|
-
For ease of use, type `dome` in the CLI:
|
34
|
+
For ease of use, type `bundle exec dome` (you may get some warnings if you do not use `bundle exec`) in the CLI:
|
35
35
|
|
36
36
|
```
|
37
|
-
$ dome
|
37
|
+
$ bundle exec dome
|
38
38
|
|
39
39
|
Dome wraps the Terraform API and performs useful stuff.
|
40
40
|
|
data/bin/dome
CHANGED
@@ -17,25 +17,22 @@ EOS
|
|
17
17
|
opt :apply, 'Applies a Terraform plan'
|
18
18
|
opt :plan_destroy, 'Creates a destructive Terraform plan'
|
19
19
|
opt :state, 'Synchronises the Terraform state'
|
20
|
+
opt :output, 'Print all Terraform output variables'
|
20
21
|
end
|
21
22
|
|
22
|
-
|
23
|
+
Trollop.educate unless opts.has_value?(true)
|
24
|
+
|
25
|
+
@dome = Dome::Terraform.new
|
26
|
+
@dome.validate_environment
|
27
|
+
|
23
28
|
if opts[:plan]
|
24
|
-
@dome = Dome::Terraform.new
|
25
|
-
@dome.validate_environment
|
26
29
|
@dome.plan
|
27
30
|
elsif opts[:apply]
|
28
|
-
@dome = Dome::Terraform.new
|
29
|
-
@dome.validate_environment
|
30
31
|
@dome.apply
|
31
32
|
elsif opts[:plan_destroy]
|
32
|
-
@dome = Dome::Terraform.new
|
33
|
-
@dome.validate_environment
|
34
33
|
@dome.plan_destroy
|
35
34
|
elsif opts[:state]
|
36
|
-
@dome = Dome::Terraform.new
|
37
|
-
@dome.validate_environment
|
38
35
|
@dome.state.s3_state
|
39
|
-
|
40
|
-
|
36
|
+
elsif opts[:output]
|
37
|
+
@dome.output
|
41
38
|
end
|
data/lib/dome/environment.rb
CHANGED
data/lib/dome/terraform.rb
CHANGED
@@ -72,5 +72,11 @@ module Dome
|
|
72
72
|
failure_message = 'something went wrong when pulling remote TF modules'
|
73
73
|
execute_command(command, failure_message)
|
74
74
|
end
|
75
|
+
|
76
|
+
def output
|
77
|
+
command = 'terraform output'
|
78
|
+
failure_message = 'something went wrong when printing TF output variables'
|
79
|
+
execute_command(command, failure_message)
|
80
|
+
end
|
75
81
|
end
|
76
82
|
end
|
data/lib/dome/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: domed-city
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Snape
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|