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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45d6e6054b0fc6c230e5fbe0d2fd8eb83fdfdb3a
4
- data.tar.gz: 7b9a2c1ebc783c7978e0bcd19bc0ec922c1f2a78
3
+ metadata.gz: cb3ed2a129bfa91408bdefba600f61f73c8b6540
4
+ data.tar.gz: 97c3f529ee72905f9d90453138db4b51b678d967
5
5
  SHA512:
6
- metadata.gz: f509d8f32ff9c8a226872f453a25b3c4a9d59afe8de5adda32f685df5a671d129c9a00721abd75aefd37d25cfee5efdbeaba2637ac172ba391a78a1237432d51
7
- data.tar.gz: ea86fa881219875894a94361d8f6ca92d33c0032202217ac4b320ebf1ecee22eebe9f7b28de7c9600ca4c34449b9d7011b9984945dc77e1b0e60e8ede692f6fb
6
+ metadata.gz: e5ab47ecf0e9444481df325a1756b07b2290357eda21ea7f4862c7d4900c136bfd0a7c45da720f94701c56ce082119ea14b3c0498da44c38f5e1a785b450682f
7
+ data.tar.gz: ca3653f7076b0737bab1600e205349aeac26b2d9ad0112f570d5c65f363316bae521a34230df70a33f511ac0f166d1bf29b897f294ab91a2dfb3ca7375f64897
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-terraform (0.10.0)
4
+ ruby-terraform (0.11.0)
5
5
  lino (~> 1.1)
6
6
 
7
7
  GEM
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
@@ -1,3 +1,3 @@
1
1
  module RubyTerraform
2
- VERSION = "0.10.0"
2
+ VERSION = "0.11.0"
3
3
  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.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson