Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features: #7

Merged
merged 3 commits into from
May 30, 2024
Merged

Features: #7

merged 3 commits into from
May 30, 2024

Conversation

sharathrnair87
Copy link
Collaborator

@sharathrnair87 sharathrnair87 commented May 19, 2024

██╗   ██╗ █████╗ ██╗   ██╗██╗  ████████╗██╗███████╗██╗   ██╗
██║   ██║██╔══██╗██║   ██║██║  ╚══██╔══╝██║██╔════╝╚██╗ ██╔╝
██║   ██║███████║██║   ██║██║     ██║   ██║█████╗   ╚████╔╝ 
╚██╗ ██╔╝██╔══██║██║   ██║██║     ██║   ██║██╔══╝    ╚██╔╝  
 ╚████╔╝ ██║  ██║╚██████╔╝███████╗██║   ██║██║        ██║   
  ╚═══╝  ╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝   ╚═╝╚═╝        ╚═╝   
                                                            

Description

  1. Use github/hashicorp/vault/api instead of curl exec
  2. Support KV v1 and v2 Secrets Engines
  3. Fix formatting
  4. Tidy up

Using curl to perform the Vault operations is not ideal especially when the Vault SDK for Go exists https://pkg.go.dev/github.com/hashicorp/vault/api, this PR is simply to migrate off the use of Curl


Tests

  • Running off local build
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build --ldflags '-s -w -extldflags "-static"' -o vaultify-neo
./vaultify-neo wrap
✅ terraform.tfstate wrapped successfully.
⚠️  Please run 'vaultify push' to store your encoded state into your Hashicorp Vault.
./vaultify-neo push
✅ Writing to path vaultify
✅ Secret written to HashiCorp Vault under: vaultify/vaultify/default_terraform.tfstate
💠 The file size uploaded to Hashicorp Vault: 0.55 KB
./vaultify-neo delete
Are you sure you want to delete the secret at 'vaultify/vaultify/default_terraform.tfstate'? [y/N]: y
✅ Secret successfully deleted from Vault.
./vaultify-neo permissions

Token Permissions:
-----------------------------
Policies: [root]
✅ Token has permission to create secrets in kv engine.
✅ clean up of test secrets complete.

1. Use github/hashicorp/vault/api instead of curl exec
2. Fix formatting
3. Tidy up
@DFW1N DFW1N merged commit 8978da9 into DFW1N:main May 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants