1.4 KiB
1.4 KiB
page_title, subcategory, description
| page_title | subcategory | description |
|---|---|---|
| encapi_node Resource - encapi | Assigns a Puppet node (by certname) to a role and environment, with optional per-node parameter overrides. |
encapi_node (Resource)
Assigns a Puppet node (by certname) to a role and environment, with optional per-node parameter overrides.
Example Usage
resource "encapi_node" "example" {
certname = "node01.example.com"
role = "roles::infra::storage::vault"
environment = "testing"
# Optional per-node overrides (win over the role's default_params).
params = jsonencode({
vault_role = "leader"
})
}
Schema
Required
certname(String) Puppet certname (fqdn) of the host.environment(String) Environment/status. Must reference an existing encapi_status.role(String) Role/class to assign. Must reference an existing encapi_role.
Optional
params(String) Per-node parameter overrides as a JSON object. Use jsonencode({...}) to preserve value types. These override the role's default_params.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Import by certname.
terraform import encapi_node.example node01.example.com