scalr_variable
Data Source scalr_variable
scalr_variable
Retrieves the details of a variable.
Example Usage
data "scalr_variable" "test_var" {
id = "var-xxxxxxx"
account_id = "acc-xxxxxxx"
}
data "scalr_variable" "test_var" {
key = "key"
category = "terraform"
account_id = "acc-xxxxxxx"
environment_id = "env-xxxxxxx"
workspace_id = "ws-xxxxxxx"
}
Argument Reference
id
- (Optional) ID of a Scalr variable.key
- (Optional) The name of a Scalr variable.category
- (Optional) The category of a Scalr variable.account_id
- (Optional) ID of the account, in the formatacc-<RANDOM STRING>
environment_id
- (Optional) The identifier of the Scalr environment, in the formatenv-<RANDOM STRING>
. Used to shrink the scope of the variable in case the variable name exists in multiple environments.workspace_id
- (Optional) The identifier of the Scalr workspace, in the formatws-<RANDOM STRING>
. Used to shrink the scope of the variable in case the variable name exists on multiple workspaces.
Arguments id
and key
are both optional, specify at least one of them to obtain scalr_variable
.
Attribute Reference
All arguments plus:
value
- Variable value.description
- Variable verbose description, defaults to empty string.hcl
- If the variable is configured as a string of HCL code.sensitive
- If the variable is configured as sensitive.final
- If the variable is configured as final. Indicates whether the variable can be overridden on a lower scope down the Scalr organizational model.
Updated about 1 month ago