Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bendrucker/terraform-credential-helper-sdk
Framework for creating Terraform credentials helpers
https://github.com/bendrucker/terraform-credential-helper-sdk
credentials golang terraform terraform-cloud
Last synced: 22 days ago
JSON representation
Framework for creating Terraform credentials helpers
- Host: GitHub
- URL: https://github.com/bendrucker/terraform-credential-helper-sdk
- Owner: bendrucker
- License: mit
- Created: 2020-05-21T05:35:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-08T00:43:33.000Z (8 months ago)
- Last Synced: 2024-04-13T09:02:41.213Z (7 months ago)
- Topics: credentials, golang, terraform, terraform-cloud
- Language: Go
- Homepage:
- Size: 69.3 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# terraform-credential-helper-sdk
[![tests](https://github.com/bendrucker/terraform-credential-helper-sdk/workflows/tests/badge.svg?branch=master)](https://github.com/bendrucker/terraform-credential-helper-sdk/actions?query=workflow%3Atests)
[![GoDoc](https://godoc.org/github.com/bendrucker/terraform-credential-helper-sdk?status.svg)](https://godoc.org/github.com/bendrucker/terraform-credential-helper-sdk)> Framework for creating [Terraform credentials helpers](https://www.terraform.io/docs/commands/cli-config.html#credentials-helpers)
## Usage
```go
func main () {
cli := New("example", "dev", new(ExampleHelper))
code, err = cli.Run(os.Args[1:])
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}os.Exit(code)
}type Helper struct{
MyFlag string
}func (h *Helper) Flags() *flag.FlagSet {
flags := flag.NewFlagSet("example", flag.ContinueOnError)
flags.StringVar(&h.MyFlag, "my-flag", "default", "usage")
return flags
}func (h *Helper) Get(hostname string) ([]byte, error) {
return nil, nil
}func (h *Helper) Store(hostname string, b []byte) error {
return nil
}func (h *Helper) Forget(hostname string) error {
return nil
}
```## License
MIT © [Ben Drucker](http://bendrucker.me)