Resource Blocks #
Resource blocks have the following format. The resource_name is often used to identify the resource. If it is overridden using the name attribute, it will be used for error messages.
resource "resource_type" "resource_name" {
ensure = "present"
... other key value entries ...
}
This is an example Resource Block that creates a SQL Server agent operator:
resource "agent_operator" "june" {
ensure = "present"
name = "june"
email_address = "june@test.com"
}
A fake sample showing all the data types:
resource "fake_resource" "fake" {
ensure = "present"
string_val = "value"
int_val = 37
bool_val = true
}