Class: TerraformEnterprise::Commands::VariablesCommand
- Defined in:
- lib/terraform-enterprise/commands/variables_command.rb
Constant Summary collapse
Instance Method Summary collapse
- #create(key, value) ⇒ Object
- #delete(id) ⇒ Object
- #get(id) ⇒ Object
- #list ⇒ Object
- #update(id) ⇒ Object
Instance Method Details
#create(key, value) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/terraform-enterprise/commands/variables_command.rb', line 23 def create(key, value) params = { category: [:category], hcl: [:hcl], key: key, organization: [:organization], sensitive: [:sensitive], value: value, workspace: [:workspace], } render client.variables.create(params) end |
#delete(id) ⇒ Object
56 57 58 |
# File 'lib/terraform-enterprise/commands/variables_command.rb', line 56 def delete(id) render client.variables.delete(id: id) end |
#get(id) ⇒ Object
51 52 53 |
# File 'lib/terraform-enterprise/commands/variables_command.rb', line 51 def get(id) render client.variables.get(id:id) end |
#list ⇒ Object
13 14 15 |
# File 'lib/terraform-enterprise/commands/variables_command.rb', line 13 def list render client.variables.list() end |
#update(id) ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/terraform-enterprise/commands/variables_command.rb', line 41 def update(id) params = {id: id} params[:hcl] = [:hcl] if .include?('hcl') params[:key] = [:key] if [:key] params[:sensitive] = [:sensitive] if .include?('sensitive') params[:value] = [:value] if [:value] render client.variables.update(params) end |