Sha256: 0cef56be58a16611620bb6ab58ae1278a0c240aea999e1506bbe78f018fa03b0

Contents?: true

Size: 756 Bytes

Versions: 48

Compression:

Stored size: 756 Bytes

Contents

class Terraspace::Terraform::Api
  module Client
    extend Memoist
    def remote
      backend["remote"]
    end

    def workspace_name
      remote['workspaces']['name']
    end

    def build
      Terraspace::Builder.new(@options).run
    end
    memoize :build

    # backend may be overridden in classes including this Concern
    def backend
      Terraspace::Terraform::Runner::Backend::Parser.new(@mod).result
    end
    memoize :backend

    # api may be overridden in classes including this Concern
    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
    memoize :api
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
terraspace-2.2.17 lib/terraspace/terraform/api/client.rb
terraspace-2.2.16 lib/terraspace/terraform/api/client.rb
terraspace-2.2.15 lib/terraspace/terraform/api/client.rb
terraspace-2.2.14 lib/terraspace/terraform/api/client.rb
terraspace-2.2.13 lib/terraspace/terraform/api/client.rb
terraspace-2.2.12 lib/terraspace/terraform/api/client.rb
terraspace-2.2.11 lib/terraspace/terraform/api/client.rb
terraspace-2.2.10 lib/terraspace/terraform/api/client.rb
terraspace-2.2.9 lib/terraspace/terraform/api/client.rb
terraspace-2.2.8 lib/terraspace/terraform/api/client.rb
terraspace-2.2.7 lib/terraspace/terraform/api/client.rb
terraspace-2.2.6 lib/terraspace/terraform/api/client.rb
terraspace-2.2.5 lib/terraspace/terraform/api/client.rb
terraspace-2.2.4 lib/terraspace/terraform/api/client.rb
terraspace-2.2.3 lib/terraspace/terraform/api/client.rb
terraspace-2.2.2 lib/terraspace/terraform/api/client.rb
terraspace-2.2.1 lib/terraspace/terraform/api/client.rb
terraspace-2.2.0 lib/terraspace/terraform/api/client.rb
terraspace-2.1.7 lib/terraspace/terraform/api/client.rb
terraspace-2.1.6 lib/terraspace/terraform/api/client.rb