Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Add secrets ls, add, view, rm commands #81

Merged
merged 2 commits into from
Jul 30, 2020
Merged

Add secrets ls, add, view, rm commands #81

merged 2 commits into from
Jul 30, 2020

Conversation

cmoog
Copy link
Contributor

@cmoog cmoog commented Jul 30, 2020

Usage: coder secrets [subcommand]

interact with secrets

Commands:
        ls      list all secrets
        view    view a secret
        create  insert a new secret
        rm      remove a secret
bash-3.2$ coder secrets create --name mysql-password --value 123

bash-3.2$ coder secrets ls
ID                                  Name             Value    Description   CreatedAt                              UpdatedAt                              
5f22365f-d7fd0f424e93930a9f8b9df1   mysql-password   ******                 2020-07-30 02:54:23.424945 +0000 UTC   2020-07-30 02:54:23.424945 +0000 UTC   

bash-3.2$ coder secrets view mysql-password
123

bash-3.2$ coder secrets rm mysql-password
2020-07-29 21:54:43 INFO        Successfully deleted secret "mysql-password"

bash-3.2$ coder secrets ls
2020-07-29 21:54:47 INFO        No secrets found

cc @wbobeirne @exvuma

@cmoog cmoog force-pushed the secrets branch 5 times, most recently from 9e655eb to b7741f1 Compare July 30, 2020 13:22
@cmoog cmoog requested a review from scsmithr July 30, 2020 13:25
Copy link
Contributor

@scsmithr scsmithr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works great for me. And I really like the direction the integration tests are going.

@@ -0,0 +1,34 @@
package xtabwriter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great addition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wait till we get a struct tag in there

type User struct {
  ID string `human:"hide"`
}

@cmoog cmoog merged commit 3d90829 into master Jul 30, 2020
@cmoog cmoog deleted the secrets branch July 30, 2020 17:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants