Class: TerraformEnterprise::CommandLine::Commands::PolicyChecksCommand

Inherits:
TerraformEnterprise::CommandLine::Command show all
Includes:
Util::Tar
Defined in:
lib/terraform_enterprise/command_line/commands/policy_checks.rb

Overview

Configuration Version Commoand

Constant Summary collapse

ATTR_STR =
STRINGS[:policy_checks][:attributes]
CMD_STR =
STRINGS[:policy_checks][:commands]

Constants included from TerraformEnterprise::CommandLine

STRINGS, VERSION

Instance Method Summary collapse

Methods included from Util::Tar

#gzip, #tar, #tarball

Instance Method Details

#listObject



17
18
19
# File 'lib/terraform_enterprise/command_line/commands/policy_checks.rb', line 17

def list
  render client.policy_checks.list(run_id: options[:run_id])
end

#override(id) ⇒ Object



23
24
25
26
27
# File 'lib/terraform_enterprise/command_line/commands/policy_checks.rb', line 23

def override(id)
  params = { id: id, action: :override }
  params[:comment] = options[:comment] if options[:comment]
  render client.policy_checks.action(params)
end