0
1
llucycodes42
This code defines a resource named "rundeck_job" and defines properties for that resource. The properties of the resource are:
name - The name of the resource.
description - The description of the resource.
project_name - The name of the project the resource is associated with.
node_filter_query - A query that defines which nodes the job should be run on. This query can be either a string or an Array of strings. If the query is an Array, then it must contain at least one string, which will be the name of a node the job should be run on.
command - The command to be executed on the nodes defined in the node_filter_query.
Shortcut: tf_rundeck_job
resource "rundeck_job" "${myResourceName}" {
name = "my-${myResourceName}"
description = "my-description-${myResourceName}"
project_name = "anvils"
node_filter_query = "tags: web"
command {
shell_command = "sudo service anvils restart"
}
}