77049f4c3d
Terraform/OpenTofu provider for encapi (the Puppet ENC replacing Cobbler). - resources: encapi_role (jsonencode default_params), encapi_status, encapi_node - data sources: encapi_node, encapi_role - client with bearer-token auth; unit tests; examples - Makefile (package->zip), Woodpecker CI publishing to the artifactapi terraform-unkin registry on tag
23 lines
685 B
Go
23 lines
685 B
Go
package provider
|
|
|
|
// API wire types, mirroring git.unkin.net/unkin/encapi/pkg/models. They are
|
|
// duplicated here to keep the provider's dependency surface small.
|
|
|
|
type roleAPI struct {
|
|
Name string `json:"name"`
|
|
Description string `json:"description,omitempty"`
|
|
DefaultParams map[string]any `json:"default_params,omitempty"`
|
|
}
|
|
|
|
type statusAPI struct {
|
|
Name string `json:"name"`
|
|
Description string `json:"description,omitempty"`
|
|
}
|
|
|
|
type nodeAPI struct {
|
|
Certname string `json:"certname"`
|
|
Role string `json:"role"`
|
|
Environment string `json:"environment"`
|
|
Params map[string]any `json:"params,omitempty"`
|
|
}
|