ruby-terraform 1.6.0.pre.2 → 1.6.0.pre.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -2
- data/README.md +36 -11
- data/Rakefile +1 -1
- data/lib/ruby_terraform/commands/apply.rb +5 -0
- data/lib/ruby_terraform/commands/base.rb +4 -0
- data/lib/ruby_terraform/commands/destroy.rb +5 -0
- data/lib/ruby_terraform/commands/force_unlock.rb +5 -0
- data/lib/ruby_terraform/commands/format.rb +5 -0
- data/lib/ruby_terraform/commands/get.rb +5 -0
- data/lib/ruby_terraform/commands/graph.rb +5 -0
- data/lib/ruby_terraform/commands/import.rb +5 -0
- data/lib/ruby_terraform/commands/init.rb +5 -0
- data/lib/ruby_terraform/commands/login.rb +5 -0
- data/lib/ruby_terraform/commands/logout.rb +5 -0
- data/lib/ruby_terraform/commands/output.rb +5 -0
- data/lib/ruby_terraform/commands/plan.rb +5 -0
- data/lib/ruby_terraform/commands/providers.rb +5 -0
- data/lib/ruby_terraform/commands/providers_lock.rb +5 -0
- data/lib/ruby_terraform/commands/providers_mirror.rb +5 -0
- data/lib/ruby_terraform/commands/providers_schema.rb +5 -0
- data/lib/ruby_terraform/commands/refresh.rb +5 -0
- data/lib/ruby_terraform/commands/show.rb +5 -0
- data/lib/ruby_terraform/commands/state_list.rb +5 -0
- data/lib/ruby_terraform/commands/state_move.rb +5 -0
- data/lib/ruby_terraform/commands/state_pull.rb +5 -0
- data/lib/ruby_terraform/commands/state_push.rb +5 -0
- data/lib/ruby_terraform/commands/state_remove.rb +5 -0
- data/lib/ruby_terraform/commands/state_replace_provider.rb +5 -0
- data/lib/ruby_terraform/commands/state_show.rb +5 -0
- data/lib/ruby_terraform/commands/taint.rb +5 -0
- data/lib/ruby_terraform/commands/untaint.rb +5 -0
- data/lib/ruby_terraform/commands/validate.rb +5 -0
- data/lib/ruby_terraform/commands/workspace_delete.rb +5 -0
- data/lib/ruby_terraform/commands/workspace_list.rb +5 -0
- data/lib/ruby_terraform/commands/workspace_new.rb +5 -0
- data/lib/ruby_terraform/commands/workspace_select.rb +5 -0
- data/lib/ruby_terraform/commands/workspace_show.rb +5 -0
- data/lib/ruby_terraform/version.rb +1 -1
- data/lib/ruby_terraform.rb +237 -74
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3d7192a520d734b246ea0384e49ac60341ed2169ddad8dd63bd0f8c281b5715
|
4
|
+
data.tar.gz: 5ca820f3ee95ce07d2d8d5f1e13edf284e53eabd7137732d20234eee4b3f30d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 565db2201a431fa3b53e75162c965717fb6b76f935404f75f521ae374c44bc651e7c5c428a2ac6b87993df5a2668922a7b17d55069194e00ec52aba2bb520cf6
|
7
|
+
data.tar.gz: efc862a5c9a2385a7f28f53d71baa6a6b4aa7bc50ae7bbfe7e5de289af95ccb9d8966d4636176c5ecfbcefcd46c75feb0eb4e9b2056a2979abbcf0a0459ba806
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ruby-terraform (1.6.0.pre.
|
4
|
+
ruby-terraform (1.6.0.pre.5)
|
5
5
|
immutable-struct (~> 2.4)
|
6
6
|
lino (~> 3.0)
|
7
7
|
|
@@ -50,6 +50,7 @@ GEM
|
|
50
50
|
i18n (1.10.0)
|
51
51
|
concurrent-ruby (~> 1.0)
|
52
52
|
immutable-struct (2.4.1)
|
53
|
+
json (2.6.2)
|
53
54
|
lino (3.0.0)
|
54
55
|
hamster (~> 3.0)
|
55
56
|
open4 (~> 1.3)
|
@@ -114,7 +115,8 @@ GEM
|
|
114
115
|
diff-lcs (>= 1.2.0, < 2.0)
|
115
116
|
rspec-support (~> 3.11.0)
|
116
117
|
rspec-support (3.11.0)
|
117
|
-
rubocop (1.31.
|
118
|
+
rubocop (1.31.1)
|
119
|
+
json (~> 2.3)
|
118
120
|
parallel (~> 1.10)
|
119
121
|
parser (>= 3.1.0.0)
|
120
122
|
rainbow (>= 2.2.2, < 4.0)
|
data/README.md
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
A simple wrapper around the Terraform binary to allow execution from within
|
4
4
|
a Ruby program, RSpec test or Rakefile.
|
5
5
|
|
6
|
-
|
7
6
|
## Installation
|
8
7
|
|
9
8
|
Add this line to your application's Gemfile:
|
@@ -20,7 +19,6 @@ Or install it yourself as:
|
|
20
19
|
|
21
20
|
$ gem install ruby-terraform
|
22
21
|
|
23
|
-
|
24
22
|
## Usage
|
25
23
|
|
26
24
|
To require `RubyTerraform`:
|
@@ -82,6 +80,30 @@ RubyTerraform.destroy(
|
|
82
80
|
)
|
83
81
|
```
|
84
82
|
|
83
|
+
Each class method also accepts a second hash argument of invocation options to
|
84
|
+
use at command invocation time. Currently, the only supported option is
|
85
|
+
`:environment` which allows environment variables to be exposed to Terraform.
|
86
|
+
|
87
|
+
For example, to apply a configuration with trace level logging:
|
88
|
+
|
89
|
+
```ruby
|
90
|
+
RubyTerraform.apply(
|
91
|
+
{
|
92
|
+
chdir: 'infra/network',
|
93
|
+
plan: 'network.tfplan',
|
94
|
+
vars: {
|
95
|
+
region: 'eu-central'
|
96
|
+
},
|
97
|
+
var_file: 'defaults.tfvars'
|
98
|
+
},
|
99
|
+
{
|
100
|
+
environment: {
|
101
|
+
'TF_LOG' => 'trace'
|
102
|
+
}
|
103
|
+
}
|
104
|
+
)
|
105
|
+
```
|
106
|
+
|
85
107
|
Additionally, `RubyTerraform` allows command instances to be constructed and
|
86
108
|
invoked separately. This is useful when you need to override global
|
87
109
|
configuration on a command by command basis or when you need to pass a command
|
@@ -102,28 +124,31 @@ command.execute(
|
|
102
124
|
)
|
103
125
|
```
|
104
126
|
|
127
|
+
As with the class methods, the `#execute` method accepts a second hash argument
|
128
|
+
of invocation options allowing an environment to be specified.
|
129
|
+
|
105
130
|
See the [API docs](https://infrablocks.github.io/ruby_terraform/index.html) for
|
106
|
-
the
|
131
|
+
the
|
107
132
|
[`RubyTerraform` module](https://infrablocks.github.io/ruby_terraform/RubyTerraform.html)
|
108
|
-
or the
|
133
|
+
or the
|
109
134
|
[`RubyTerraform::Commands` module](https://infrablocks.github.io/ruby_terraform/RubyTerraform/Commands.html)
|
110
135
|
more details on the supported commands.
|
111
136
|
|
112
137
|
### Parameters
|
113
138
|
|
114
139
|
The parameter hash passed to each command, whether via the class methods or the
|
115
|
-
`#execute` method, supports all the options available on the corresponding
|
140
|
+
`#execute` method, supports all the options available on the corresponding
|
116
141
|
Terraform command. There are a few different types of options depending on what
|
117
142
|
Terraform expects to receive:
|
118
143
|
|
119
144
|
* `Boolean` options, accepting `true` or `false`, such as `:input` or `:lock`;
|
120
|
-
* `String` options, accepting a single string value, such as `:state` or
|
145
|
+
* `String` options, accepting a single string value, such as `:state` or
|
121
146
|
`:target`;
|
122
147
|
* `Array<String>` options, accepting an array of strings, such as `:var_files`
|
123
148
|
or `:targets`; and
|
124
149
|
* `Hash<String,Object>` options, accepting a hash of key value pairs, where the
|
125
150
|
value might be complex, such as `:vars` and `:backend_config`.
|
126
|
-
|
151
|
+
|
127
152
|
For all options that allow multiple values, both a singular and a plural option
|
128
153
|
key are supported. For example, to specify multiple var files during a plan:
|
129
154
|
|
@@ -211,6 +236,7 @@ RubyTerraform.configure do |config|
|
|
211
236
|
config.stderr = multi_io
|
212
237
|
end
|
213
238
|
```
|
239
|
+
|
214
240
|
> Creating the Logger with a file this way (using `Logger::LogDevice`),
|
215
241
|
> guarantees that the buffer content will be saved/written, as it sets
|
216
242
|
> **implicit flushing**.
|
@@ -218,7 +244,7 @@ end
|
|
218
244
|
Configured in this way, any logging performed by `RubyTerraform` will log to
|
219
245
|
both `STDOUT` and to the specified file.
|
220
246
|
|
221
|
-
To configure the logger on a command by command basis, for example for the
|
247
|
+
To configure the logger on a command by command basis, for example for the
|
222
248
|
`Show` command:
|
223
249
|
|
224
250
|
```ruby
|
@@ -298,7 +324,7 @@ To install dependencies and run the build, run the pre-commit build:
|
|
298
324
|
./go
|
299
325
|
```
|
300
326
|
|
301
|
-
This runs all unit tests and other checks including coverage and code linting /
|
327
|
+
This runs all unit tests and other checks including coverage and code linting /
|
302
328
|
formatting.
|
303
329
|
|
304
330
|
To run only the unit tests, including coverage:
|
@@ -319,7 +345,7 @@ To check for code linting / formatting issues without fixing:
|
|
319
345
|
./go library:check
|
320
346
|
```
|
321
347
|
|
322
|
-
You can also run `bin/console` for an interactive prompt that will allow you to
|
348
|
+
You can also run `bin/console` for an interactive prompt that will allow you to
|
323
349
|
experiment.
|
324
350
|
|
325
351
|
### Managing CircleCI keys
|
@@ -352,7 +378,6 @@ https://github.com/infrablocks/ruby_terraform. This project is intended to be a
|
|
352
378
|
safe, welcoming space for collaboration, and contributors are expected to adhere
|
353
379
|
to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
354
380
|
|
355
|
-
|
356
381
|
## License
|
357
382
|
|
358
383
|
The gem is available as open source under the terms of the
|
data/Rakefile
CHANGED
@@ -71,6 +71,11 @@ module RubyTerraform
|
|
71
71
|
# +:var_file+ and +:var_files+ are provided, all var files will be passed
|
72
72
|
# to terraform.
|
73
73
|
#
|
74
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
75
|
+
# of invocation options. Currently, the only supported option is
|
76
|
+
# +:environment+ which is a map of environment variables to expose during
|
77
|
+
# invocation of the command.
|
78
|
+
#
|
74
79
|
# @example Basic Invocation
|
75
80
|
# RubyTerraform::Commands::Apply.new.execute(
|
76
81
|
# directory: 'infra/networking',
|
@@ -27,6 +27,10 @@ module RubyTerraform
|
|
27
27
|
# @param [Hash<String, Object>] parameters The parameters used to
|
28
28
|
# invoke the command. See subclass documentation for details of
|
29
29
|
# supported options.
|
30
|
+
# @param [Hash<String, Object>] invocation_options Additional options
|
31
|
+
# controlling the invocation of the command.
|
32
|
+
# @option invocation_options [Hash<String, String>] :environment A map
|
33
|
+
# of environment variables to expose at command invocation time.
|
30
34
|
def execute(parameters = {}, invocation_options = {})
|
31
35
|
do_before(parameters)
|
32
36
|
build_and_execute_command(parameters, invocation_options)
|
@@ -56,6 +56,11 @@ module RubyTerraform
|
|
56
56
|
# +:var_file+ and +:var_files+ are provided, all var files will be passed
|
57
57
|
# to terraform.
|
58
58
|
#
|
59
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
60
|
+
# of invocation options. Currently, the only supported option is
|
61
|
+
# +:environment+ which is a map of environment variables to expose during
|
62
|
+
# invocation of the command.
|
63
|
+
#
|
59
64
|
# @example Basic Invocation
|
60
65
|
# RubyTerraform::Commands::Destroy.new.execute(
|
61
66
|
# directory: 'infra/networking',
|
@@ -28,6 +28,11 @@ module RubyTerraform
|
|
28
28
|
# * +:force+: If +true+, does not ask for input for unlock confirmation;
|
29
29
|
# defaults to +false+.
|
30
30
|
#
|
31
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
32
|
+
# of invocation options. Currently, the only supported option is
|
33
|
+
# +:environment+ which is a map of environment variables to expose during
|
34
|
+
# invocation of the command.
|
35
|
+
#
|
31
36
|
# @example Basic Invocation
|
32
37
|
# RubyTerraform::Commands::ForceUnlock.new.execute(
|
33
38
|
# lock_id: '50e844a7-ebb0-fcfd-da85-5cce5bd1ec90')
|
@@ -41,6 +41,11 @@ module RubyTerraform
|
|
41
41
|
# defaults to +false+ such that only the provided +:directory+ is
|
42
42
|
# processed.
|
43
43
|
#
|
44
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
45
|
+
# of invocation options. Currently, the only supported option is
|
46
|
+
# +:environment+ which is a map of environment variables to expose during
|
47
|
+
# invocation of the command.
|
48
|
+
#
|
44
49
|
# @example Basic Invocation
|
45
50
|
# RubyTerraform::Commands::Format.new.execute(
|
46
51
|
# directory: 'infra/networking')
|
@@ -31,6 +31,11 @@ module RubyTerraform
|
|
31
31
|
# * +:no_color+: whether or not the output from the command should be in
|
32
32
|
# color; defaults to +false+.
|
33
33
|
#
|
34
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
35
|
+
# of invocation options. Currently, the only supported option is
|
36
|
+
# +:environment+ which is a map of environment variables to expose during
|
37
|
+
# invocation of the command.
|
38
|
+
#
|
34
39
|
# @example Basic Invocation
|
35
40
|
# RubyTerraform::Commands::Get.new.execute(
|
36
41
|
# directory: 'infra/networking')
|
@@ -40,6 +40,11 @@ module RubyTerraform
|
|
40
40
|
# * +:module_depth+: (deprecated) in prior versions of terraform, specified
|
41
41
|
# the depth of modules to show in the output.
|
42
42
|
#
|
43
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
44
|
+
# of invocation options. Currently, the only supported option is
|
45
|
+
# +:environment+ which is a map of environment variables to expose during
|
46
|
+
# invocation of the command.
|
47
|
+
#
|
43
48
|
# @example Basic Invocation
|
44
49
|
# RubyTerraform::Commands::Graph.new.execute
|
45
50
|
#
|
@@ -81,6 +81,11 @@ module RubyTerraform
|
|
81
81
|
# Cloud workspace, and should be used with extreme caution; defaults to
|
82
82
|
# +false+.
|
83
83
|
#
|
84
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
85
|
+
# of invocation options. Currently, the only supported option is
|
86
|
+
# +:environment+ which is a map of environment variables to expose during
|
87
|
+
# invocation of the command.
|
88
|
+
#
|
84
89
|
# @example Basic Invocation
|
85
90
|
# RubyTerraform::Commands::Import.new.execute(
|
86
91
|
# directory: 'infra/networking',
|
@@ -72,6 +72,11 @@ module RubyTerraform
|
|
72
72
|
# * +:lockfile+: sets a dependency lockfile mode; currently only "readonly"
|
73
73
|
# is valid.
|
74
74
|
#
|
75
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
76
|
+
# of invocation options. Currently, the only supported option is
|
77
|
+
# +:environment+ which is a map of environment variables to expose during
|
78
|
+
# invocation of the command.
|
79
|
+
#
|
75
80
|
# @example Basic Invocation
|
76
81
|
# RubyTerraform::Commands::Init.new.execute(
|
77
82
|
# from_module: 'some/module/path',
|
@@ -24,6 +24,11 @@ module RubyTerraform
|
|
24
24
|
# * +:chdir+: the path of a working directory to switch to before executing
|
25
25
|
# the given subcommand.
|
26
26
|
#
|
27
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
28
|
+
# of invocation options. Currently, the only supported option is
|
29
|
+
# +:environment+ which is a map of environment variables to expose during
|
30
|
+
# invocation of the command.
|
31
|
+
#
|
27
32
|
# @example Basic Invocation
|
28
33
|
# RubyTerraform::Commands::Login.new.execute
|
29
34
|
#
|
@@ -21,6 +21,11 @@ module RubyTerraform
|
|
21
21
|
# * +:chdir+: the path of a working directory to switch to before executing
|
22
22
|
# the given subcommand.
|
23
23
|
#
|
24
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
25
|
+
# of invocation options. Currently, the only supported option is
|
26
|
+
# +:environment+ which is a map of environment variables to expose during
|
27
|
+
# invocation of the command.
|
28
|
+
#
|
24
29
|
# @example Basic Invocation
|
25
30
|
# RubyTerraform::Commands::Logout.new.execute
|
26
31
|
#
|
@@ -29,6 +29,11 @@ module RubyTerraform
|
|
29
29
|
# to a string, will print the raw string directly, rather than a
|
30
30
|
# human-oriented representation of the value.
|
31
31
|
#
|
32
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
33
|
+
# of invocation options. Currently, the only supported option is
|
34
|
+
# +:environment+ which is a map of environment variables to expose during
|
35
|
+
# invocation of the command.
|
36
|
+
#
|
32
37
|
# @example Basic Invocation
|
33
38
|
# RubyTerraform::Commands::Output.new.execute(
|
34
39
|
# name: 'vpc_id')
|
@@ -65,6 +65,11 @@ module RubyTerraform
|
|
65
65
|
# +:var_file+ and +:var_files+ are provided, all var files will be passed
|
66
66
|
# to terraform.
|
67
67
|
#
|
68
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
69
|
+
# of invocation options. Currently, the only supported option is
|
70
|
+
# +:environment+ which is a map of environment variables to expose during
|
71
|
+
# invocation of the command.
|
72
|
+
#
|
68
73
|
# @example Basic Invocation
|
69
74
|
# RubyTerraform::Commands::Plan.new.execute(
|
70
75
|
# directory: 'infra/networking',
|
@@ -24,6 +24,11 @@ module RubyTerraform
|
|
24
24
|
# * +:chdir+: the path of a working directory to switch to before executing
|
25
25
|
# the given subcommand.
|
26
26
|
#
|
27
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
28
|
+
# of invocation options. Currently, the only supported option is
|
29
|
+
# +:environment+ which is a map of environment variables to expose during
|
30
|
+
# invocation of the command.
|
31
|
+
#
|
27
32
|
# @example Basic Invocation
|
28
33
|
# RubyTerraform::Commands::Providers.new.execute
|
29
34
|
#
|
@@ -65,6 +65,11 @@ module RubyTerraform
|
|
65
65
|
# for; see +:platform+ for more details; if both +:platform+ and
|
66
66
|
# +:platforms+ are provided, all platforms will be passed to Terraform.
|
67
67
|
#
|
68
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
69
|
+
# of invocation options. Currently, the only supported option is
|
70
|
+
# +:environment+ which is a map of environment variables to expose during
|
71
|
+
# invocation of the command.
|
72
|
+
#
|
68
73
|
# @example Basic Invocation
|
69
74
|
# RubyTerraform::Commands::ProvidersLock.new.execute(
|
70
75
|
# fs_mirror: "/usr/local/terraform/providers",
|
@@ -39,6 +39,11 @@ module RubyTerraform
|
|
39
39
|
# see +:platform+ for more details; if both +:platform+ and +:platforms+
|
40
40
|
# are provided, all platforms will be passed to Terraform.
|
41
41
|
#
|
42
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
43
|
+
# of invocation options. Currently, the only supported option is
|
44
|
+
# +:environment+ which is a map of environment variables to expose during
|
45
|
+
# invocation of the command.
|
46
|
+
#
|
42
47
|
# @example Basic Invocation
|
43
48
|
# RubyTerraform::Commands::ProvidersMirror.new.execute(
|
44
49
|
# directory: './plugins',
|
@@ -17,6 +17,11 @@ module RubyTerraform
|
|
17
17
|
# * +:chdir+: the path of a working directory to switch to before executing
|
18
18
|
# the given subcommand.
|
19
19
|
#
|
20
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
21
|
+
# of invocation options. Currently, the only supported option is
|
22
|
+
# +:environment+ which is a map of environment variables to expose during
|
23
|
+
# invocation of the command.
|
24
|
+
#
|
20
25
|
# @example Basic Invocation
|
21
26
|
# RubyTerraform::Commands::ProvidersSchema.new.execute(
|
22
27
|
# directory: 'infra/networking')
|
@@ -56,6 +56,11 @@ module RubyTerraform
|
|
56
56
|
# +:var_file+ and +:var_files+ are provided, all var files will be passed
|
57
57
|
# to terraform.
|
58
58
|
#
|
59
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
60
|
+
# of invocation options. Currently, the only supported option is
|
61
|
+
# +:environment+ which is a map of environment variables to expose during
|
62
|
+
# invocation of the command.
|
63
|
+
#
|
59
64
|
# @example Basic Invocation
|
60
65
|
# RubyTerraform::Commands::Refresh.new.execute(
|
61
66
|
# directory: 'infra/networking',
|
@@ -22,6 +22,11 @@ module RubyTerraform
|
|
22
22
|
# * +:json+: if +true+, outputs the Terraform plan or state in a
|
23
23
|
# machine-readable form; defaults to +false+.
|
24
24
|
#
|
25
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
26
|
+
# of invocation options. Currently, the only supported option is
|
27
|
+
# +:environment+ which is a map of environment variables to expose during
|
28
|
+
# invocation of the command.
|
29
|
+
#
|
25
30
|
# @example Basic Invocation
|
26
31
|
# RubyTerraform::Commands::Show.new.execute
|
27
32
|
#
|
@@ -43,6 +43,11 @@ module RubyTerraform
|
|
43
43
|
# whose resource types have an attribute named "id" whose value equals the
|
44
44
|
# given id string.
|
45
45
|
#
|
46
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
47
|
+
# of invocation options. Currently, the only supported option is
|
48
|
+
# +:environment+ which is a map of environment variables to expose during
|
49
|
+
# invocation of the command.
|
50
|
+
#
|
46
51
|
# @example Basic Invocation
|
47
52
|
# RubyTerraform::Commands::StateList.new.execute
|
48
53
|
#
|
@@ -56,6 +56,11 @@ module RubyTerraform
|
|
56
56
|
# unusable workspace, and should be used with extreme caution; defaults to
|
57
57
|
# +false+.
|
58
58
|
#
|
59
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
60
|
+
# of invocation options. Currently, the only supported option is
|
61
|
+
# +:environment+ which is a map of environment variables to expose during
|
62
|
+
# invocation of the command.
|
63
|
+
#
|
59
64
|
# @example Basic Invocation
|
60
65
|
# RubyTerraform::Commands::StateMove.new.execute(
|
61
66
|
# source: 'packet_device.worker',
|
@@ -23,6 +23,11 @@ module RubyTerraform
|
|
23
23
|
# * +:chdir+: the path of a working directory to switch to before executing
|
24
24
|
# the given subcommand.
|
25
25
|
#
|
26
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
27
|
+
# of invocation options. Currently, the only supported option is
|
28
|
+
# +:environment+ which is a map of environment variables to expose during
|
29
|
+
# invocation of the command.
|
30
|
+
#
|
26
31
|
# @example Basic Invocation
|
27
32
|
# RubyTerraform::Commands::StatePull.new.execute
|
28
33
|
#
|
@@ -39,6 +39,11 @@ module RubyTerraform
|
|
39
39
|
# unusable workspace, and should be used with extreme caution; defaults to
|
40
40
|
# +false+.
|
41
41
|
#
|
42
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
43
|
+
# of invocation options. Currently, the only supported option is
|
44
|
+
# +:environment+ which is a map of environment variables to expose during
|
45
|
+
# invocation of the command.
|
46
|
+
#
|
42
47
|
# @example Basic Invocation
|
43
48
|
# RubyTerraform::Commands::StatePush.new.execute(
|
44
49
|
# path: 'some/statefile.tfstate')
|
@@ -47,6 +47,11 @@ module RubyTerraform
|
|
47
47
|
# unusable workspace, and should be used with extreme caution; defaults to
|
48
48
|
# +false+.
|
49
49
|
#
|
50
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
51
|
+
# of invocation options. Currently, the only supported option is
|
52
|
+
# +:environment+ which is a map of environment variables to expose during
|
53
|
+
# invocation of the command.
|
54
|
+
#
|
50
55
|
# @example Basic Invocation
|
51
56
|
# RubyTerraform::Commands::StateRemove.new.execute(
|
52
57
|
# address: 'packet_device.worker')
|
@@ -34,6 +34,11 @@ module RubyTerraform
|
|
34
34
|
# unusable workspace, and should be used with extreme caution; defaults to
|
35
35
|
# +false+.
|
36
36
|
#
|
37
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
38
|
+
# of invocation options. Currently, the only supported option is
|
39
|
+
# +:environment+ which is a map of environment variables to expose during
|
40
|
+
# invocation of the command.
|
41
|
+
#
|
37
42
|
# @example Basic Invocation
|
38
43
|
# RubyTerraform::Commands::StateReplaceProvider.new.execute(
|
39
44
|
# from: 'hashicorp/aws',
|
@@ -22,6 +22,11 @@ module RubyTerraform
|
|
22
22
|
# * +:chdir+: the path of a working directory to switch to before executing
|
23
23
|
# the given subcommand.
|
24
24
|
#
|
25
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
26
|
+
# of invocation options. Currently, the only supported option is
|
27
|
+
# +:environment+ which is a map of environment variables to expose during
|
28
|
+
# invocation of the command.
|
29
|
+
#
|
25
30
|
# @example Basic Invocation
|
26
31
|
# RubyTerraform::Commands::StateShow.new.execute(
|
27
32
|
# address: 'packet_device.worker')
|
@@ -58,6 +58,11 @@ module RubyTerraform
|
|
58
58
|
# unusable workspace, and should be used with extreme caution; defaults to
|
59
59
|
# +false+.
|
60
60
|
#
|
61
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
62
|
+
# of invocation options. Currently, the only supported option is
|
63
|
+
# +:environment+ which is a map of environment variables to expose during
|
64
|
+
# invocation of the command.
|
65
|
+
#
|
61
66
|
# @example Basic Invocation
|
62
67
|
# RubyTerraform::Commands::Taint.new.execute(
|
63
68
|
# address: 'aws_security_group.allow_all')
|
@@ -50,6 +50,11 @@ module RubyTerraform
|
|
50
50
|
# unusable workspace, and should be used with extreme caution; defaults to
|
51
51
|
# +false+.
|
52
52
|
#
|
53
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
54
|
+
# of invocation options. Currently, the only supported option is
|
55
|
+
# +:environment+ which is a map of environment variables to expose during
|
56
|
+
# invocation of the command.
|
57
|
+
#
|
53
58
|
# @example Basic Invocation
|
54
59
|
# RubyTerraform::Commands::Untaint.new.execute(
|
55
60
|
# name: 'aws_security_group.allow_all')
|
@@ -47,6 +47,11 @@ module RubyTerraform
|
|
47
47
|
# * +:no_color+: whether or not the output from the command should be in
|
48
48
|
# color; defaults to +false+.
|
49
49
|
#
|
50
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
51
|
+
# of invocation options. Currently, the only supported option is
|
52
|
+
# +:environment+ which is a map of environment variables to expose during
|
53
|
+
# invocation of the command.
|
54
|
+
#
|
50
55
|
# @example Basic Invocation
|
51
56
|
# RubyTerraform::Commands::Validate.new.execute(
|
52
57
|
# directory: 'infra/networking')
|
@@ -24,6 +24,11 @@ module RubyTerraform
|
|
24
24
|
# when +false+, does not lock the state file; defaults to +true+.
|
25
25
|
# * +:lock_timeout+: the duration to retry a state lock; defaults to +"0s"+.
|
26
26
|
#
|
27
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
28
|
+
# of invocation options. Currently, the only supported option is
|
29
|
+
# +:environment+ which is a map of environment variables to expose during
|
30
|
+
# invocation of the command.
|
31
|
+
#
|
27
32
|
# @example Basic Invocation
|
28
33
|
# RubyTerraform::Commands::WorkspaceDelete.new.execute(
|
29
34
|
# name: 'example')
|
@@ -18,6 +18,11 @@ module RubyTerraform
|
|
18
18
|
# * +:chdir+: the path of a working directory to switch to before executing
|
19
19
|
# the given subcommand.
|
20
20
|
#
|
21
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
22
|
+
# of invocation options. Currently, the only supported option is
|
23
|
+
# +:environment+ which is a map of environment variables to expose during
|
24
|
+
# invocation of the command.
|
25
|
+
#
|
21
26
|
# @example Basic Invocation
|
22
27
|
# RubyTerraform::Commands::WorkspaceList.new.execute(
|
23
28
|
# directory: 'infra/networking')
|
@@ -23,6 +23,11 @@ module RubyTerraform
|
|
23
23
|
# * +:lock_timeout+: the duration to retry a state lock; defaults to +"0s"+.
|
24
24
|
# * +:state+: the path to a state file to copy into the new workspace.
|
25
25
|
#
|
26
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
27
|
+
# of invocation options. Currently, the only supported option is
|
28
|
+
# +:environment+ which is a map of environment variables to expose during
|
29
|
+
# invocation of the command.
|
30
|
+
#
|
26
31
|
# @example Basic Invocation
|
27
32
|
# RubyTerraform::Commands::WorkspaceNew.new.execute(
|
28
33
|
# name: 'example')
|
@@ -19,6 +19,11 @@ module RubyTerraform
|
|
19
19
|
# * +:chdir+: the path of a working directory to switch to before executing
|
20
20
|
# the given subcommand.
|
21
21
|
#
|
22
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
23
|
+
# of invocation options. Currently, the only supported option is
|
24
|
+
# +:environment+ which is a map of environment variables to expose during
|
25
|
+
# invocation of the command.
|
26
|
+
#
|
22
27
|
# @example BasicInvocation
|
23
28
|
# RubyTerraform::Commands::WorkspaceSelect.new.execute(
|
24
29
|
# name: 'example')
|
@@ -16,6 +16,11 @@ module RubyTerraform
|
|
16
16
|
# * +:chdir+: the path of a working directory to switch to before executing
|
17
17
|
# the given subcommand.
|
18
18
|
#
|
19
|
+
# The {#execute} method accepts an optional second parameter which is a map
|
20
|
+
# of invocation options. Currently, the only supported option is
|
21
|
+
# +:environment+ which is a map of environment variables to expose during
|
22
|
+
# invocation of the command.
|
23
|
+
#
|
19
24
|
# @example Basic Invocation
|
20
25
|
# RubyTerraform::Commands::WorkspaceShow.new.execute
|
21
26
|
#
|