afa53a3362
Align the provider with unkin/terraform-provider-vault-secrets-netbox: the Go module becomes terraform-provider-vault-secrets-ghp, the provider source address vault-secrets-ghp, and the resources ghp_secret_backend / ghp_secret_role (TypeName ghp). - main.go: module import, providerserver Address, package doc comment. - provider.go: TypeName ghp (resources ghp_secret_backend, ghp_secret_role). - Makefile: BINARY + INSTALL_DIR under vault-secrets-ghp; drop the e2e target (netbox has none). - .woodpecker/release: PUT the zip to the artifactapi vault-secrets-ghp path. - Restructure examples to netbox's layout (combined examples/main.tf + per resource) and rewrite README for the new names; drop the Docker e2e harness to mirror netbox exactly. Engine schema mapping is unchanged. gofmt, go vet, go build ./... and go test -race ./... all pass.
15 lines
516 B
Terraform
15 lines
516 B
Terraform
# A role that mints short-lived agent tokens bound to a ghp App installation,
|
|
# scoped to contents and pull requests. Reading ghp/creds/ci returns a
|
|
# lease-bound token that ghp revokes when the lease ends.
|
|
resource "ghp_secret_role" "ci" {
|
|
backend = ghp_secret_backend.ghp.path
|
|
name = "ci"
|
|
token_type = "agent"
|
|
installation_id = 12345
|
|
repositories = ["unkin/prodenv"]
|
|
scopes = ["contents:read", "pull_requests:write"]
|
|
|
|
ttl = 3600 # 1h
|
|
max_ttl = 28800 # 8h
|
|
}
|