ruby-terraform 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +32 -0
- data/lib/ruby_terraform/commands/apply.rb +2 -0
- data/lib/ruby_terraform/commands/plan.rb +2 -0
- data/lib/ruby_terraform/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb3ed2a129bfa91408bdefba600f61f73c8b6540
|
4
|
+
data.tar.gz: 97c3f529ee72905f9d90453138db4b51b678d967
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5ab47ecf0e9444481df325a1756b07b2290357eda21ea7f4862c7d4900c136bfd0a7c45da720f94701c56ce082119ea14b3c0498da44c38f5e1a785b450682f
|
7
|
+
data.tar.gz: ca3653f7076b0737bab1600e205349aeac26b2d9ad0112f570d5c65f363316bae521a34230df70a33f511ac0f166d1bf29b897f294ab91a2dfb3ca7375f64897
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -106,7 +106,38 @@ The get command supports the following options passed as keyword arguments:
|
|
106
106
|
* `no_color`: whether or not the output from the command should be in color;
|
107
107
|
defaults to `false`.
|
108
108
|
|
109
|
+
|
110
|
+
### RubyTerraform::Commands::Plan
|
111
|
+
|
112
|
+
The plan command will generate the execution plan in the provided
|
113
|
+
configuration directory. It can be called in the following ways:
|
114
|
+
|
115
|
+
```ruby
|
116
|
+
RubyTerraform.plan(
|
117
|
+
directory: 'infra/networking',
|
118
|
+
vars: {
|
119
|
+
region: 'eu-central'
|
120
|
+
})
|
121
|
+
RubyTerraform::Commands::Plan.new.execute(
|
122
|
+
directory: 'infra/networking',
|
123
|
+
vars: {
|
124
|
+
region: 'eu-central'
|
125
|
+
})
|
126
|
+
```
|
109
127
|
|
128
|
+
The plan command supports the following options passed as keyword arguments:
|
129
|
+
* `directory`: the directory containing terraform configuration; required.
|
130
|
+
* `vars`: a map of vars to be passed in to the terraform configuration.
|
131
|
+
* `var_file`: a file holding list of variables with their values (in terraform format) to be passed to terraform.
|
132
|
+
* `state`: the path to the state file in which to store state; defaults to
|
133
|
+
terraform.tfstate in the working directory or the remote state if configured.
|
134
|
+
* `plan`: the name of the in which to save the generated plan.
|
135
|
+
* `input`: when `false`, will not ask for input for variables not directly set; defaults to `true`.
|
136
|
+
* `destroy`: when `true`, no backup file will be written; defaults to `false`.
|
137
|
+
* `no_color`: whether or not the output from the command should be in color;
|
138
|
+
defaults to `false`.
|
139
|
+
|
140
|
+
|
110
141
|
### RubyTerraform::Commands::Apply
|
111
142
|
|
112
143
|
The apply command applies terraform configuration in the provided terraform
|
@@ -132,6 +163,7 @@ The apply command supports the following options passed as keyword arguments:
|
|
132
163
|
* `state`: the path to the state file in which to store state; defaults to
|
133
164
|
terraform.tfstate in the working directory or the remote state if configured.
|
134
165
|
* `backup`: the path to the backup file in which to store the state backup.
|
166
|
+
* `input`: when `false`, will not ask for input for variables not directly set; defaults to `true`.
|
135
167
|
* `no_backup`: when `true`, no backup file will be written; defaults to `false`.
|
136
168
|
* `no_color`: whether or not the output from the command should be in color;
|
137
169
|
defaults to `false`.
|
@@ -9,6 +9,7 @@ module RubyTerraform
|
|
9
9
|
vars = opts[:vars] || {}
|
10
10
|
var_file = opts[:var_file]
|
11
11
|
state = opts[:state]
|
12
|
+
input = opts[:input]
|
12
13
|
auto_approve = opts[:auto_approve]
|
13
14
|
no_backup = opts[:no_backup]
|
14
15
|
backup = no_backup ? '-' : opts[:backup]
|
@@ -21,6 +22,7 @@ module RubyTerraform
|
|
21
22
|
end
|
22
23
|
sub = sub.with_option('-var-file', var_file) if var_file
|
23
24
|
sub = sub.with_option('-state', state) if state
|
25
|
+
sub = sub.with_option('-input', input) if input
|
24
26
|
sub = sub.with_option('-auto-approve', auto_approve) unless auto_approve.nil?
|
25
27
|
sub = sub.with_option('-backup', backup) if backup
|
26
28
|
sub = sub.with_flag('-no-color') if no_color
|
@@ -10,6 +10,7 @@ module RubyTerraform
|
|
10
10
|
var_file = opts[:var_file]
|
11
11
|
state = opts[:state]
|
12
12
|
plan = opts[:plan]
|
13
|
+
input = opts[:input]
|
13
14
|
destroy = opts[:destroy]
|
14
15
|
no_color = opts[:no_color]
|
15
16
|
|
@@ -21,6 +22,7 @@ module RubyTerraform
|
|
21
22
|
sub = sub.with_option('-var-file', var_file) if var_file
|
22
23
|
sub = sub.with_option('-state', state) if state
|
23
24
|
sub = sub.with_option('-out', plan) if plan
|
25
|
+
sub = sub.with_option('-input', input) if input
|
24
26
|
sub = sub.with_flag('-destroy') if destroy
|
25
27
|
sub = sub.with_flag('-no-color') if no_color
|
26
28
|
sub
|