Class: Terraspace::Terraform::Api

Inherits:
Object
  • Object
show all
Extended by:
Memoist
Defined in:
lib/terraspace/terraform/api.rb,
lib/terraspace/terraform/api/var.rb,
lib/terraspace/terraform/api/base.rb,
lib/terraspace/terraform/api/http.rb,
lib/terraspace/terraform/api/runs.rb,
lib/terraspace/terraform/api/vars.rb,
lib/terraspace/terraform/api/token.rb,
lib/terraspace/terraform/api/client.rb,
lib/terraspace/terraform/api/workspace.rb

Defined Under Namespace

Modules: Client Classes: Base, Http, Runs, Token, Var, Vars, Workspace

Instance Method Summary collapse

Constructor Details

#initialize(mod, remote) ⇒ Api

Returns a new instance of Api.



5
6
7
# File 'lib/terraspace/terraform/api.rb', line 5

def initialize(mod, remote)
  @mod, @remote = mod, remote
end

Instance Method Details

#runsObject



14
15
16
17
# File 'lib/terraspace/terraform/api.rb', line 14

def runs
  workspace_id = workspace.details['id']
  Runs.new(workspace_id)
end

#workspaceObject



9
10
11
# File 'lib/terraspace/terraform/api.rb', line 9

def workspace
  Workspace.new(@mod, @remote['organization'], @remote['workspaces']['name'])
end