Use this data source to get all variables in an Automation Account.
data "azurerm_automation_account" "example" {
name = "example-account"
resource_group_name = "example-resources"
}
data "azurerm_automation_variables" "example" {
automation_account_id = data.azurerm_automation_account.example.id
}
output "string_vars" {
value = data.azurerm_automation_variable_string.example.string
}
The following arguments are supported:
automation_account_id
- The resource ID of the automation account.In addition to the argument listed above, the following attributes are exported:
bool
- One or more variable
blocks as defined below for each boolean variable.
datetime
- One or more variable
blocks as defined below for each datetime variable.
encrypted
- One or more variable
blocks as defined below for each encrypted variable.
int
- One or more variable
blocks as defined below for each int variable.
null
- One or more variable
blocks as defined below for each null variable.
string
- One or more variable
blocks as defined below for each string variable.
A variable
block exports the following attributes:
name
- The name of the Automation Variable.
description
- The description of the Automation Variable.
encrypted
- Specifies if the Automation Variable is encrypted.
value
- The value of the Automation Variable.
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the Automation String Variable.