c69b27826d
Terraform provider (plugin-framework) for the vault-plugin-secrets-rancher secrets engine, modeled on terraform-provider-litellmvaultsecret. Resources: - rancher_secret_backend: mount the engine + write config (rancher_url, ca_cert, tls_skip_verify, request_timeout_seconds). - rancher_secret_backend_service_account: seed an auto-rotated Rancher token (write-only token; token_ttl / rotation_period; computed token_name, last_rotated). - rancher_secret_backend_role: minting role (service_account, cluster_name, ttl, max_ttl, description). Source address git.unkin.net/unkin/ranchervaultsecret, resources prefixed rancher_. Ports the litellm Woodpecker terraform-registry release + nfpm-less zip packaging, examples, and a provider e2e (Vault + mock Rancher from the sibling plugin repo). Unit tests cover the coercion/import-ID helpers.
29 lines
555 B
Go
29 lines
555 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"flag"
|
|
"log"
|
|
|
|
"github.com/hashicorp/terraform-plugin-framework/providerserver"
|
|
|
|
"git.unkin.net/unkin/terraform-provider-ranchervaultsecret/internal/provider"
|
|
)
|
|
|
|
var version = "0.0.1"
|
|
|
|
func main() {
|
|
var debug bool
|
|
flag.BoolVar(&debug, "debug", false, "enable debug mode")
|
|
flag.Parse()
|
|
|
|
opts := providerserver.ServeOpts{
|
|
Address: "git.unkin.net/unkin/ranchervaultsecret",
|
|
Debug: debug,
|
|
}
|
|
|
|
if err := providerserver.Serve(context.Background(), provider.New(version), opts); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|