Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Atoms committed Aug 21, 2020
1 parent d9f7564 commit e23fa6d
Show file tree
Hide file tree
Showing 5 changed files with 475 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@

# Dependency directories (remove the comment below to include it)
# vendor/

### local development ignore
service-account-credentials.json
26 changes: 26 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Read Google cloud secrets from Secret Manager using service account.

## HOWTO

* Create service account and download json key
* Add in IAM role `Secret Manager Secret Accessor` role
* export env variable `GOOGLE_APPLICATION_CREDENTIALS` with your service account key file

```shell
gcp-secret -p project-id -s secretname
```

## building
```
go build
```

## Currently supported

* Secret value for latest version of secret

## TODO:

* Add versioning support
* Add flag to list all secrets available
* Add possibility to save new version of secret
9 changes: 9 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module github.com/Atoms/gcp-secrets

go 1.14

require (
cloud.google.com/go v0.64.0
github.com/spf13/pflag v1.0.5
google.golang.org/genproto v0.0.0-20200815001618-f69a88009b70
)
Loading

0 comments on commit e23fa6d

Please sign in to comment.