scalr_variable
Resource: scalr_variable
Manages the state of variables in Scalr.
Example Usage
resource "scalr_variable" "example1" {
key = "my_key_name"
value = "my_value_name"
category = "terraform"
description = "variable description"
workspace_id = "ws-xxxxxxxxxx"
}
resource "scalr_variable" "example2" {
key = "xyz"
value = jsonencode(["foo", "bar"])
hcl = true
category = "terraform"
workspace_id = "ws-yyyyyyyyyy"
}
Schema
Required
category(String) Indicates if this is a Terraform or shell variable. Allowed values areterraformorshell.key(String) Key of the variable.
Optional
account_id(String) ID of the account, in the formatacc-<RANDOM STRING>.description(String) Variable verbose description, defaults to empty string.environment_id(String) The environment that owns the variable, specified as an ID, in the formatenv-<RANDOM STRING>.final(Boolean) Set (true/false) to configure as final. Indicates whether the variable can be overridden on a lower scope down the Scalr organizational model. Defaultfalse.force(Boolean) Set (true/false) to configure as force. Allows creating final variables on higher scope, even if the same variable exists on lower scope (lower is to be deleted). Defaultfalse.hcl(Boolean) Set (true/false) to configure the variable as a string of HCL code. Has no effect forcategory = "shell"variables. Defaultfalse.sensitive(Boolean) Set (true/false) to configure as sensitive. Sensitive variable values are not visible after being set. Defaultfalse.value(String, Sensitive) Variable value.workspace_id(String) The workspace that owns the variable, specified as an ID, in the formatws-<RANDOM STRING>.
Read-Only
id(String) The ID of this resource.readable_value(String) A non-sensitive read-only copy of a variable value. Will be null if the variable is sensitive.updated_at(String) Date/time the variable was updated.updated_by(List of Object) Details of the user that updated the variable last time. (see below for nested schema)updated_by_email(String) Email of the user who updated the variable last time.
Nested Schema for updated_by
updated_byRead-Only:
email(String)full_name(String)username(String)
Import
Import is supported using the following syntax:
terraform import scalr_variable.example var-xxxxxxxxxx
Updated 6 days ago
