Module: Terraspace::Terraform::Api::Client
- Extended by:
- Memoist
- Included in:
- Tfc::Runs::Base, Tfc::Runs::Pruner, Tfc::Sync, Tfc::Workspace
- Defined in:
- lib/terraspace/terraform/api/client.rb
Instance Method Summary collapse
-
#api ⇒ Object
api may be overridden in classes including this Concern.
-
#backend ⇒ Object
backend may be overridden in classes including this Concern.
- #build ⇒ Object
- #remote ⇒ Object
- #workspace_name ⇒ Object
Instance Method Details
#api ⇒ Object
api may be overridden in classes including this Concern
24 25 26 27 |
# File 'lib/terraspace/terraform/api/client.rb', line 24 def api return unless backend.dig('remote','workspaces') # in case called by terraspace down demo -y --destroy-workspace with a non-remote backend Terraspace::Terraform::Api.new(@mod, remote) end |
#backend ⇒ Object
backend may be overridden in classes including this Concern
18 19 20 |
# File 'lib/terraspace/terraform/api/client.rb', line 18 def backend Terraspace::Terraform::Runner::Backend::Parser.new(@mod).result end |
#build ⇒ Object
12 13 14 |
# File 'lib/terraspace/terraform/api/client.rb', line 12 def build Terraspace::Builder.new(@options).run end |
#remote ⇒ Object
4 5 6 |
# File 'lib/terraspace/terraform/api/client.rb', line 4 def remote backend["remote"] end |
#workspace_name ⇒ Object
8 9 10 |
# File 'lib/terraspace/terraform/api/client.rb', line 8 def workspace_name remote['workspaces']['name'] end |