51 lines
1.4 KiB
Markdown
51 lines
1.4 KiB
Markdown
---
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
|
page_title: "encapi_node Resource - encapi"
|
|
subcategory: ""
|
|
description: |-
|
|
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
|
|
|
|
```terraform
|
|
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 generated by tfplugindocs -->
|
|
## 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](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
|
|
|
```shell
|
|
# Import by certname.
|
|
terraform import encapi_node.example node01.example.com
|
|
```
|