ruby-terraform 0.11.0 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +2 -0
- data/lib/ruby_terraform.rb +8 -0
- data/lib/ruby_terraform/commands.rb +2 -0
- data/lib/ruby_terraform/commands/refresh.rb +34 -0
- data/lib/ruby_terraform/commands/validate.rb +28 -0
- data/lib/ruby_terraform/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01d2a9dcce67b647a41e7ea92ddd11a954439569
|
4
|
+
data.tar.gz: d85003dbb68b6a0caed70a6a05f243b232114a56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09294eaad60cde3f66dee9613699866bcefd292ab150056926a403343d852bfca3ef8af2f9096cb489f01d489705838da86bcfb85b6a2a9d9c5ab6eeea568762
|
7
|
+
data.tar.gz: 3217aaac884cefd9aefd2208a1897e7b98f918736a7721f9efe81b64d7b6057f50428aba6c10b86acb66e0fd14f9995a1e37a17d0a7bd9289c75dd2a963e8139
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -167,6 +167,8 @@ The apply command supports the following options passed as keyword arguments:
|
|
167
167
|
* `no_backup`: when `true`, no backup file will be written; defaults to `false`.
|
168
168
|
* `no_color`: whether or not the output from the command should be in color;
|
169
169
|
defaults to `false`.
|
170
|
+
* `auto_approve`: if `true`, the command applys without prompting the user to confirm
|
171
|
+
the changes; defaults to `false`.
|
170
172
|
|
171
173
|
|
172
174
|
### RubyTerraform::Commands::Destroy
|
data/lib/ruby_terraform.rb
CHANGED
@@ -31,6 +31,10 @@ module RubyTerraform
|
|
31
31
|
Commands::Get.new.execute(opts)
|
32
32
|
end
|
33
33
|
|
34
|
+
def validate(opts = {})
|
35
|
+
Commands::Validate.new.execute(opts)
|
36
|
+
end
|
37
|
+
|
34
38
|
def plan(opts = {})
|
35
39
|
Commands::Plan.new.execute(opts)
|
36
40
|
end
|
@@ -47,6 +51,10 @@ module RubyTerraform
|
|
47
51
|
Commands::RemoteConfig.new.execute(opts)
|
48
52
|
end
|
49
53
|
|
54
|
+
def refresh(opts = {})
|
55
|
+
Commands::Refresh.new.execute(opts)
|
56
|
+
end
|
57
|
+
|
50
58
|
def output(opts = {})
|
51
59
|
Commands::Output.new.execute(opts)
|
52
60
|
end
|
@@ -1,10 +1,12 @@
|
|
1
1
|
require_relative 'commands/clean'
|
2
2
|
require_relative 'commands/init'
|
3
3
|
require_relative 'commands/get'
|
4
|
+
require_relative 'commands/validate'
|
4
5
|
require_relative 'commands/plan'
|
5
6
|
require_relative 'commands/apply'
|
6
7
|
require_relative 'commands/destroy'
|
7
8
|
require_relative 'commands/output'
|
9
|
+
require_relative 'commands/refresh'
|
8
10
|
require_relative 'commands/remote_config'
|
9
11
|
|
10
12
|
module RubyTerraform
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'lino'
|
2
|
+
require_relative 'base'
|
3
|
+
|
4
|
+
module RubyTerraform
|
5
|
+
module Commands
|
6
|
+
class Refresh < Base
|
7
|
+
def configure_command(builder, opts)
|
8
|
+
directory = opts[:directory]
|
9
|
+
vars = opts[:vars] || {}
|
10
|
+
var_file = opts[:var_file]
|
11
|
+
state = opts[:state]
|
12
|
+
refresh = opts[:refresh]
|
13
|
+
input = opts[:input]
|
14
|
+
target = opts[:target]
|
15
|
+
destroy = opts[:destroy]
|
16
|
+
no_color = opts[:no_color]
|
17
|
+
|
18
|
+
builder
|
19
|
+
.with_subcommand('refresh') do |sub|
|
20
|
+
vars.each do |key, value|
|
21
|
+
sub = sub.with_option('-var', "'#{key}=#{value}'", separator: ' ')
|
22
|
+
end
|
23
|
+
sub = sub.with_option('-var-file', var_file) if var_file
|
24
|
+
sub = sub.with_option('-state', state) if state
|
25
|
+
sub = sub.with_option('-input', input) if input
|
26
|
+
sub = sub.with_option('-target', target) if target
|
27
|
+
sub = sub.with_flag('-no-color') if no_color
|
28
|
+
sub
|
29
|
+
end
|
30
|
+
.with_argument(directory)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'lino'
|
2
|
+
require_relative 'base'
|
3
|
+
|
4
|
+
module RubyTerraform
|
5
|
+
module Commands
|
6
|
+
class Validate < Base
|
7
|
+
def configure_command(builder, opts)
|
8
|
+
directory = opts[:directory]
|
9
|
+
vars = opts[:vars] || {}
|
10
|
+
var_file = opts[:var_file]
|
11
|
+
state = opts[:state]
|
12
|
+
no_color = opts[:no_color]
|
13
|
+
|
14
|
+
builder
|
15
|
+
.with_subcommand('validate') do |sub|
|
16
|
+
vars.each do |key, value|
|
17
|
+
sub = sub.with_option('-var', "'#{key}=#{value}'", separator: ' ')
|
18
|
+
end
|
19
|
+
sub = sub.with_option('-var-file', var_file) if var_file
|
20
|
+
sub = sub.with_option('-state', state) if state
|
21
|
+
sub = sub.with_flag('-no-color') if no_color
|
22
|
+
sub
|
23
|
+
end
|
24
|
+
.with_argument(directory)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-terraform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Clemson
|
@@ -111,7 +111,9 @@ files:
|
|
111
111
|
- lib/ruby_terraform/commands/init.rb
|
112
112
|
- lib/ruby_terraform/commands/output.rb
|
113
113
|
- lib/ruby_terraform/commands/plan.rb
|
114
|
+
- lib/ruby_terraform/commands/refresh.rb
|
114
115
|
- lib/ruby_terraform/commands/remote_config.rb
|
116
|
+
- lib/ruby_terraform/commands/validate.rb
|
115
117
|
- lib/ruby_terraform/version.rb
|
116
118
|
- ruby_terraform.gemspec
|
117
119
|
homepage: https://github.com/tobyclemson/ruby_terraform
|