Module: RubyTerraform::ClassMethods
- Included in:
- RubyTerraform
- Defined in:
- lib/ruby_terraform.rb
Overview
rubocop:disable Metrics/ModuleLength
Instance Method Summary collapse
-
#apply(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform apply command which creates or updates infrastructure according to terraform configuration files in the provided directory.
-
#destroy(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform destroy command which destroys terraform managed infrastructure.
-
#force_unlock(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform force-unlock command which manually unlocks the state for the defined configuration.
-
#format(parameters = {}, invocation_options = {}) ⇒ Object
(also: #fmt)
Invokes the terraform fmt command which rewrites all terraform configuration files to a canonical format.
-
#get(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform get command which downloads and installs modules needed for the given configuration.
-
#graph(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform graph command which outputs the visual execution graph of terraform resources according to either the current configuration or an execution plan.
-
#import(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform import command which imports existing infrastructure into your terraform state.
-
#init(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform init command which initializes a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
-
#login(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform login command which retrieves an authentication token for the given hostname, if it supports automatic login, and saves it in a credentials file in your home directory.
-
#logout(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform logout command which removes locally-stored credentials for specified hostname.
-
#output(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform output command which reads an output variable from a Terraform state file and prints the value.
-
#plan(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform plan command which generates a speculative execution plan, showing what actions Terraform would take to apply the current configuration.
-
#providers(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform providers command which prints out a tree of modules in the referenced configuration annotated with their provider requirements.
-
#providers_lock(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform providers lock command which writes out dependency locks for the configured providers.
-
#providers_mirror(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform providers mirror command which saves local copies of all required provider plugins.
-
#providers_schema(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform providers schema command which prints out a json representation of the schemas for all providers used in the current configuration.
-
#refresh(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform refresh command which updates the state file of your infrastructure with metadata that matches the physical resources they are tracking.
-
#show(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform show command which reads and outputs a Terraform state or plan file in a human-readable form.
-
#state_list(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform state list command which lists resources in the Terraform state.
-
#state_move(parameters = {}, invocation_options = {}) ⇒ Object
(also: #state_mv)
Invokes the terraform state mv command which moves an item in the state.
-
#state_pull(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform state pull command which pulls the state from its location, upgrades the local copy, and outputs it to stdout.
-
#state_push(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform state push command which updates remote state from a local state file.
-
#state_remove(parameters = {}, invocation_options = {}) ⇒ Object
(also: #state_rm)
Invokes the terraform state rm command which removes one or more items from the Terraform state, causing Terraform to “forget” those items without first destroying them in the remote system.
-
#state_replace_provider(parameters = {}, invocation_options = {}) ⇒ Object
Invoke the terraform state replace-provider command which replaces provider for resources in the Terraform state.
-
#state_show(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform state show command which shows the attributes of a resource in the Terraform state.
-
#taint(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform taint command which marks a resource instance as not fully functional.
-
#untaint(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform untaint command which removes the ‘tainted’ state from a resource instance.
-
#validate(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform validate command which checks whether a configuration is valid.
-
#workspace(parameters = {}, invocation_options = {}) ⇒ Object
rubocop:disable Metrics/MethodLength.
-
#workspace_delete(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform workspace delete command which deletes a workspace.
-
#workspace_list(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform workspace list command which lists workspaces.
-
#workspace_new(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform workspace new command which creates a new workspace.
-
#workspace_select(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform workspace select command which selects a workspace.
-
#workspace_show(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform workspace show command which shows the name of the current workspace.
Instance Method Details
#apply(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform apply command which creates or updates infrastructure according to terraform configuration files in the provided directory.
By default, terraform will generate a new plan and present it for approval before taking any action. Alternatively, the command accepts a plan file created by a previous invocation, in which case terraform will take the actions described in that plan without any confirmation prompt.
110 111 112 |
# File 'lib/ruby_terraform.rb', line 110 def apply(parameters = {}, = {}) exec(RubyTerraform::Commands::Apply, parameters, ) end |
#destroy(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform destroy command which destroys terraform managed infrastructure.
177 178 179 180 |
# File 'lib/ruby_terraform.rb', line 177 def destroy(parameters = {}, = {}) exec(RubyTerraform::Commands::Destroy, parameters, ) end |
#force_unlock(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform force-unlock command which manually unlocks the state for the defined configuration.
This will not modify your infrastructure. This command removes the lock on the state for the current workspace. The behavior of this lock is dependent on the backend being used. Local state files cannot be unlocked by another process.
209 210 211 212 |
# File 'lib/ruby_terraform.rb', line 209 def force_unlock(parameters = {}, = {}) exec(RubyTerraform::Commands::ForceUnlock, parameters, ) end |
#format(parameters = {}, invocation_options = {}) ⇒ Object Also known as: fmt
Invokes the terraform fmt command which rewrites all terraform configuration files to a canonical format.
Both configuration files (.tf) and variables files (.tfvars) are updated. JSON files (.tf.json or .tfvars.json) are not modified.
If :directory
is not specified in the parameters map then the current working directory will be used. If :directory
is “-” then content will be read from the standard input. The given content must be in the terraform language native syntax; JSON is not supported.
254 255 256 257 |
# File 'lib/ruby_terraform.rb', line 254 def format(parameters = {}, = {}) exec(RubyTerraform::Commands::Format, parameters, ) end |
#get(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform get command which downloads and installs modules needed for the given configuration.
This recursively downloads all modules needed, such as modules imported by the root and so on. If a module is already downloaded, it will not be redownloaded or checked for updates unless :update
is true
.
Module installation also happens automatically by default as part of the #init command, so you should rarely need to run this command separately.
291 292 293 294 |
# File 'lib/ruby_terraform.rb', line 291 def get(parameters = {}, = {}) exec(RubyTerraform::Commands::Get, parameters, ) end |
#graph(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform graph command which outputs the visual execution graph of terraform resources according to either the current configuration or an execution plan.
The graph is outputted in DOT format. The typical program that can read this format is GraphViz, but many web services are also available to read this format.
The :type
option can be used to control the type of graph shown. Terraform creates different graphs for different operations. See the options below for the list of types supported. The default type is “plan” if a configuration is given, and “apply” if a plan file is passed as an argument.
335 336 337 338 |
# File 'lib/ruby_terraform.rb', line 335 def graph(parameters = {}, = {}) exec(RubyTerraform::Commands::Graph, parameters, ) end |
#import(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform import command which imports existing infrastructure into your terraform state.
This will find and import the specified resource into your terraform state, allowing existing infrastructure to come under terraform management without having to be initially created by terraform.
The :address
specified is the address to import the resource to. Please see the documentation online for resource addresses. The :id
is a resource-specific ID to identify that resource being imported. Please reference the documentation for the resource type you’re importing to determine the ID syntax to use. It typically matches directly to the ID that the provider uses.
The current implementation of terraform import can only import resources into the state. It does not generate configuration. A future version of terraform will also generate configuration.
Because of this, prior to running terraform import it is necessary to write a resource configuration block for the resource manually, to which the imported object will be attached.
This command will not modify your infrastructure, but it will make network requests to inspect parts of your infrastructure relevant to the resource being imported.
432 433 434 435 |
# File 'lib/ruby_terraform.rb', line 432 def import(parameters = {}, = {}) exec(RubyTerraform::Commands::Import, parameters, ) end |
#init(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform init command which initializes a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
This is the first command that should be run for any new or existing Terraform configuration per machine. This sets up all the local data necessary to run Terraform that is typically not committed to version control.
This command is always safe to run multiple times. Though subsequent runs may give errors, this command will never delete your configuration or state. Even so, if you have important information, please back it up prior to running this command, just in case.
509 510 511 512 |
# File 'lib/ruby_terraform.rb', line 509 def init(parameters = {}, = {}) exec(RubyTerraform::Commands::Init, parameters, ) end |
#login(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform login command which retrieves an authentication token for the given hostname, if it supports automatic login, and saves it in a credentials file in your home directory.
If no hostname is provided, the default hostname is app.terraform.io, to log in to Terraform Cloud.
If not overridden by credentials helper settings in the CLI configuration, the credentials will be written to the following local file:
~/.terraform.d/credentials.tfrc.json
536 537 538 539 |
# File 'lib/ruby_terraform.rb', line 536 def login(parameters = {}, = {}) exec(RubyTerraform::Commands::Login, parameters, ) end |
#logout(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform logout command which removes locally-stored credentials for specified hostname.
Note: the API token is only removed from local storage, not destroyed on the remote server, so it will remain valid until manually revoked.
If no hostname is provided, the default hostname is app.terraform.io.
560 561 562 563 |
# File 'lib/ruby_terraform.rb', line 560 def logout(parameters = {}, = {}) exec(RubyTerraform::Commands::Logout, parameters, ) end |
#output(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform output command which reads an output variable from a Terraform state file and prints the value. With no additional arguments, output will display all the outputs for the root module. If :name
is not specified, all outputs are printed.
592 593 594 595 |
# File 'lib/ruby_terraform.rb', line 592 def output(parameters = {}, = {}) exec(RubyTerraform::Commands::Output, parameters, ) end |
#plan(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform plan command which generates a speculative execution plan, showing what actions Terraform would take to apply the current configuration. This command will not actually perform the planned actions.
You can optionally save the plan to a file, which you can then pass to the #apply command to perform exactly the actions described in the plan.
672 673 674 |
# File 'lib/ruby_terraform.rb', line 672 def plan(parameters = {}, = {}) exec(RubyTerraform::Commands::Plan, parameters, ) end |
#providers(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform providers command which prints out a tree of modules in the referenced configuration annotated with their provider requirements.
This provides an overview of all of the provider requirements across all referenced modules, as an aid to understanding why particular provider plugins are needed and why particular versions are selected.
698 699 700 701 |
# File 'lib/ruby_terraform.rb', line 698 def providers(parameters = {}, = {}) exec(RubyTerraform::Commands::Providers, parameters, ) end |
#providers_lock(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform providers lock command which writes out dependency locks for the configured providers.
Normally the dependency lock file (.terraform.lock.hcl) is updated automatically by “terraform init”, but the information available to the normal provider installer can be constrained when you’re installing providers from filesystem or network mirrors, and so the generated lock file can end up incomplete.
The “providers lock” subcommand addresses that by updating the lock file based on the official packages available in the origin registry, ignoring the currently-configured installation strategy.
After this command succeeds, the lock file will contain suitable checksums to allow installation of the providers needed by the current configuration on all of the selected platforms.
By default this command updates the lock file for every provider declared in the configuration. You can override that behavior by providing one or more provider source addresses on the command line.
773 774 775 776 |
# File 'lib/ruby_terraform.rb', line 773 def providers_lock(parameters = {}, = {}) exec(RubyTerraform::Commands::ProvidersLock, parameters, ) end |
#providers_mirror(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform providers mirror command which saves local copies of all required provider plugins.
Populates a local directory with copies of the provider plugins needed for the current configuration, so that the directory can be used either directly as a filesystem mirror or as the basis for a network mirror and thus obtain those providers without access to their origin registries in future.
The mirror directory will contain JSON index files that can be published along with the mirrored packages on a static HTTP file server to produce a network mirror. Those index files will be ignored if the directory is used instead as a local filesystem mirror.
819 820 821 822 |
# File 'lib/ruby_terraform.rb', line 819 def providers_mirror(parameters = {}, = {}) exec(RubyTerraform::Commands::ProvidersMirror, parameters, ) end |
#providers_schema(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform providers schema command which prints out a json representation of the schemas for all providers used in the current configuration.
840 841 842 843 |
# File 'lib/ruby_terraform.rb', line 840 def providers_schema(parameters = {}, = {}) exec(RubyTerraform::Commands::ProvidersSchema, parameters, ) end |
#refresh(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform refresh command which updates the state file of your infrastructure with metadata that matches the physical resources they are tracking.
This will not modify your infrastructure, but it can modify your state file to update metadata. This metadata might cause new changes to occur when you generate a plan or call apply next.
915 916 917 |
# File 'lib/ruby_terraform.rb', line 915 def refresh(parameters = {}, = {}) exec(RubyTerraform::Commands::Refresh, parameters, ) end |
#show(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform show command which reads and outputs a Terraform state or plan file in a human-readable form. If no path is specified, the current state will be shown.
940 941 942 943 |
# File 'lib/ruby_terraform.rb', line 940 def show(parameters = {}, = {}) exec(RubyTerraform::Commands::Show, parameters, ) end |
#state_list(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform state list command which lists resources in the Terraform state.
This command lists resource instances in the Terraform state. The address option can be used to filter the instances by resource or module. If no pattern is given, all resource instances are listed.
The addresses must either be module addresses or absolute resource addresses, such as:
-
aws_instance.example
-
module.example
-
module.example.module.child
-
module.example.aws_instance.example
An Errors::ExecutionError will be raised if any of the resources or modules given as filter addresses do not exist in the state.
986 987 988 989 |
# File 'lib/ruby_terraform.rb', line 986 def state_list(parameters = {}, = {}) exec(RubyTerraform::Commands::StateList, parameters, ) end |
#state_move(parameters = {}, invocation_options = {}) ⇒ Object Also known as: state_mv
Invokes the terraform state mv command which moves an item in the state.
This command will move an item matched by the address given to the destination address. This command can also move to a destination address in a completely different state file.
This can be used for simple resource renaming, moving items to and from a module, moving entire modules, and more. And because this command can also move data to a completely new state, it can also be used for refactoring one configuration into multiple separately managed Terraform configurations.
This command will output a backup copy of the state prior to saving any changes. The backup cannot be disabled. Due to the destructive nature of this command, backups are required.
If you’re moving an item to a different state file, a backup will be created for each state file.
1052 1053 1054 1055 |
# File 'lib/ruby_terraform.rb', line 1052 def state_move(parameters = {}, = {}) exec(RubyTerraform::Commands::StateMove, parameters, ) end |
#state_pull(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform state pull command which pulls the state from its location, upgrades the local copy, and outputs it to stdout.
This command “pulls” the current state and outputs it to stdout. As part of this process, Terraform will upgrade the state format of the local copy to the current version.
The primary use of this is for state stored remotely. This command will still work with local state but is less useful for this.
1079 1080 1081 1082 |
# File 'lib/ruby_terraform.rb', line 1079 def state_pull(parameters = {}, = {}) exec(RubyTerraform::Commands::StatePull, parameters, ) end |
#state_push(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform state push command which updates remote state from a local state file.
This command “pushes” a local state and overwrites remote state with a local state file. The command will protect you against writing an older serial or a different state file lineage unless you pass true
for the :force
option.
This command works with local state (it will overwrite the local state), but is less useful for this use case.
If :path
is “-”, then this command will read the state to push from stdin. Data from stdin is not streamed to the backend: it is loaded completely (until pipe close), verified, and then pushed.
1124 1125 1126 1127 |
# File 'lib/ruby_terraform.rb', line 1124 def state_push(parameters = {}, = {}) exec(RubyTerraform::Commands::StatePush, parameters, ) end |
#state_remove(parameters = {}, invocation_options = {}) ⇒ Object Also known as: state_rm
Invokes the terraform state rm command which removes one or more items from the Terraform state, causing Terraform to “forget” those items without first destroying them in the remote system.
This command removes one or more resource instances from the Terraform state based on the addresses given. You can view and list the available instances with #state_list.
If you give the address of an entire module then all of the instances in that module and any of its child modules will be removed from the state.
If you give the address of a resource that has “count” or “for_each” set, all of the instances of that resource will be removed from the state.
1178 1179 1180 1181 |
# File 'lib/ruby_terraform.rb', line 1178 def state_remove(parameters = {}, = {}) exec(RubyTerraform::Commands::StateRemove, parameters, ) end |
#state_replace_provider(parameters = {}, invocation_options = {}) ⇒ Object
Invoke the terraform state replace-provider command which replaces provider for resources in the Terraform state.
Terraform will write it to the same path as the state file with a “.backup” extension.
1221 1222 1223 1224 |
# File 'lib/ruby_terraform.rb', line 1221 def state_replace_provider(parameters = {}, = {}) exec(RubyTerraform::Commands::StateReplaceProvider, parameters, ) end |
#state_show(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform state show command which shows the attributes of a resource in the Terraform state.
This command shows the attributes of a single resource in the Terraform state. The :address
argument must be used to specify a single resource. You can view the list of available resources with #state_list.
1247 1248 1249 1250 |
# File 'lib/ruby_terraform.rb', line 1247 def state_show(parameters = {}, = {}) exec(RubyTerraform::Commands::StateShow, parameters, ) end |
#taint(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform taint command which marks a resource instance as not fully functional.
Terraform uses the term “tainted” to describe a resource instance which may not be fully functional, either because its creation partially failed or because you’ve manually marked it as such using this command.
This will not modify your infrastructure directly, but subsequent Terraform plans will include actions to destroy the remote object and create a new object to replace it.
You can remove the “taint” state from a resource instance using the #untaint command.
The address is in the usual resource address syntax, such as:
-
aws_instance.foo
-
aws_instance.bar[1]
-
module.foo.module.bar.aws_instance.baz
Use your shell’s quoting or escaping syntax to ensure that the address will reach Terraform correctly, without any special interpretation.
1313 1314 1315 1316 |
# File 'lib/ruby_terraform.rb', line 1313 def taint(parameters = {}, = {}) exec(RubyTerraform::Commands::Taint, parameters, ) end |
#untaint(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform untaint command which removes the ‘tainted’ state from a resource instance.
Terraform uses the term “tainted” to describe a resource instance which may not be fully functional, either because its creation partially failed or because you’ve manually marked it as such using the #taint command.
This command removes that state from a resource instance, causing Terraform to see it as fully-functional and not in need of replacement.
This will not modify your infrastructure directly. It only avoids Terraform planning to replace a tainted instance in a future operation.
1372 1373 1374 1375 |
# File 'lib/ruby_terraform.rb', line 1372 def untaint(parameters = {}, = {}) exec(RubyTerraform::Commands::Untaint, parameters, ) end |
#validate(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform validate command which checks whether a configuration is valid.
Validates the configuration files in a directory, referring only to the configuration and not accessing any remote services such as remote state, provider APIs, etc.
Validate runs checks that verify whether a configuration is syntactically valid and internally consistent, regardless of any provided variables or existing state. It is thus primarily useful for general verification of reusable modules, including correctness of attribute names and value types.
It is safe to run this command automatically, for example as a post-save check in a text editor or as a test step for a re-usable module in a CI system.
Validation requires an initialized working directory with any referenced plugins and modules installed. To initialize a working directory for validation without accessing any configured remote backend, use the #init command passing :backend
as false
.
To verify configuration in the context of a particular run (a particular target workspace, input variable values, etc), use the #plan command instead, which includes an implied validation check.
1423 1424 1425 1426 |
# File 'lib/ruby_terraform.rb', line 1423 def validate(parameters = {}, = {}) exec(RubyTerraform::Commands::Validate, parameters, ) end |
#workspace(parameters = {}, invocation_options = {}) ⇒ Object
rubocop:disable Metrics/MethodLength
1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 |
# File 'lib/ruby_terraform.rb', line 1560 def workspace(parameters = {}, = {}) case parameters[:operation] when nil, 'list' exec(RubyTerraform::Commands::WorkspaceList, parameters, ) when 'select' exec(RubyTerraform::Commands::WorkspaceSelect, parameters, ) when 'new' exec(RubyTerraform::Commands::WorkspaceNew, parameters, ) when 'delete' exec(RubyTerraform::Commands::WorkspaceDelete, parameters, ) when 'show' exec(RubyTerraform::Commands::WorkspaceShow, parameters, ) else raise( "Invalid operation '#{parameters[:operation]}' supplied to workspace" ) end end |
#workspace_delete(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform workspace delete command which deletes a workspace.
1455 1456 1457 1458 |
# File 'lib/ruby_terraform.rb', line 1455 def workspace_delete(parameters = {}, = {}) exec(RubyTerraform::Commands::WorkspaceDelete, parameters, ) end |
#workspace_list(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform workspace list command which lists workspaces.
1477 1478 1479 1480 |
# File 'lib/ruby_terraform.rb', line 1477 def workspace_list(parameters = {}, = {}) exec(RubyTerraform::Commands::WorkspaceList, parameters, ) end |
#workspace_new(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform workspace new command which creates a new workspace.
1509 1510 1511 1512 |
# File 'lib/ruby_terraform.rb', line 1509 def workspace_new(parameters = {}, = {}) exec(RubyTerraform::Commands::WorkspaceNew, parameters, ) end |
#workspace_select(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform workspace select command which selects a workspace.
1534 1535 1536 1537 |
# File 'lib/ruby_terraform.rb', line 1534 def workspace_select(parameters = {}, = {}) exec(RubyTerraform::Commands::WorkspaceSelect, parameters, ) end |
#workspace_show(parameters = {}, invocation_options = {}) ⇒ Object
Invokes the terraform workspace show command which shows the name of the current workspace.
1553 1554 1555 1556 |
# File 'lib/ruby_terraform.rb', line 1553 def workspace_show(parameters = {}, = {}) exec(RubyTerraform::Commands::WorkspaceShow, parameters, ) end |