Apply for invite to IaCP

scalr_variable

Manage the state of variables in Scalr. Creates, updates and destroy.

Syntax

resource scalr_variable example {
  key          = "{variable-key-name}"
  value        = "{variable value}"
  category     = "{category}"
  workspace_id = "{scalr-workspace-id}"
  hcl          = {true|false}
  sensitive    = {true|false}
}

Arguments

Argument

Required

Description

key

Yes

Name of the variable.

value

Yes

Value of the variable.

category

Yes

Configure whether a Terraform or environment variable. Valid values are terraform or env.

workspace_id

Yes

The workspace the variable is to be configued in, using the format <ORGANIZATION>/<WORKSPACE>.

hcl

No

Set (true/false) to configure if the value of the variable as a string of HCL code. Has no effect for environment variables. Defaults to false.

sensitive

No

Set (true/false) to configure if the value is sensitive. Sensitive variable values are not visible after being set. Defaults to false.

Attributes Reference

All arguments plus:

Attribute

Description

id

The variable ID.