ruby-terraform 0.65.0.pre.14 → 0.65.0.pre.15
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 +1 -1
- data/README.md +2 -19
- data/lib/ruby_terraform.rb +606 -16
- data/lib/ruby_terraform/commands/apply.rb +2 -2
- data/lib/ruby_terraform/commands/destroy.rb +67 -1
- data/lib/ruby_terraform/commands/force_unlock.rb +28 -0
- data/lib/ruby_terraform/commands/format.rb +39 -0
- data/lib/ruby_terraform/commands/get.rb +31 -0
- data/lib/ruby_terraform/commands/graph.rb +38 -0
- data/lib/ruby_terraform/commands/import.rb +95 -1
- data/lib/ruby_terraform/commands/init.rb +72 -1
- data/lib/ruby_terraform/commands/login.rb +24 -0
- data/lib/ruby_terraform/commands/logout.rb +21 -0
- data/lib/ruby_terraform/commands/output.rb +32 -0
- data/lib/ruby_terraform/commands/plan.rb +67 -1
- data/lib/ruby_terraform/commands/providers.rb +22 -0
- data/lib/ruby_terraform/commands/providers_lock.rb +66 -0
- data/lib/ruby_terraform/commands/providers_mirror.rb +42 -0
- data/lib/ruby_terraform/version.rb +1 -1
- metadata +2 -2
@@ -5,17 +5,59 @@ require_relative '../options/common'
|
|
5
5
|
|
6
6
|
module RubyTerraform
|
7
7
|
module Commands
|
8
|
+
# Wraps the +terraform providers mirror+ command which saves local copies of
|
9
|
+
# all required provider plugins.
|
10
|
+
#
|
11
|
+
# Populates a local directory with copies of the provider plugins needed for
|
12
|
+
# the current configuration, so that the directory can be used either
|
13
|
+
# directly as a filesystem mirror or as the basis for a network mirror and
|
14
|
+
# thus obtain those providers without access to their origin registries in
|
15
|
+
# future.
|
16
|
+
#
|
17
|
+
# The mirror directory will contain JSON index files that can be published
|
18
|
+
# along with the mirrored packages on a static HTTP file server to produce a
|
19
|
+
# network mirror. Those index files will be ignored if the directory is used
|
20
|
+
# instead as a local filesystem mirror.
|
21
|
+
#
|
22
|
+
# For options accepted on construction, see {#initialize}.
|
23
|
+
#
|
24
|
+
# When executing an instance of {ProvidersMirror} via {#execute}, the
|
25
|
+
# following options are supported:
|
26
|
+
#
|
27
|
+
# * +:directory+: the directory to populate with the mirrored provider
|
28
|
+
# plugins.
|
29
|
+
# * +:chdir+: the path of a working directory to switch to before executing
|
30
|
+
# the given subcommand.
|
31
|
+
# * +:platform+: the target platform to build a mirror for; by default
|
32
|
+
# Terraform will obtain plugin packages suitable for the platform where
|
33
|
+
# you run this command; target names consist of an operating system and a
|
34
|
+
# CPU architecture; for example, "linux_amd64" selects the Linux operating
|
35
|
+
# system running on an AMD64 or x86_64 CPU; each provider is available
|
36
|
+
# only for a limited set of target platforms; if both +:platform+ and
|
37
|
+
# +:platforms+ are provided, all platforms will be passed to Terraform.
|
38
|
+
# * +:platforms+: an array of target platforms to build a mirror for for;
|
39
|
+
# see +:platform+ for more details; if both +:platform+ and +:platforms+
|
40
|
+
# are provided, all platforms will be passed to Terraform.
|
41
|
+
#
|
42
|
+
# @example Basic Invocation
|
43
|
+
# RubyTerraform::Commands::PlatformsMirror.new.execute(
|
44
|
+
# directory: './plugins',
|
45
|
+
# platforms: ["windows_amd64", "darwin_amd64", "linux_amd64"])
|
46
|
+
#
|
8
47
|
class ProvidersMirror < Base
|
9
48
|
include RubyTerraform::Options::Common
|
10
49
|
|
50
|
+
# @!visibility private
|
11
51
|
def subcommands
|
12
52
|
%w[providers mirror]
|
13
53
|
end
|
14
54
|
|
55
|
+
# @!visibility private
|
15
56
|
def options
|
16
57
|
%w[-platform] + super
|
17
58
|
end
|
18
59
|
|
60
|
+
# @!visibility private
|
19
61
|
def arguments(parameters)
|
20
62
|
[parameters[:directory]]
|
21
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-terraform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.65.0.pre.
|
4
|
+
version: 0.65.0.pre.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Clemson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: immutable-struct
|