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

[BUG] Unable to retrieve result for because it was not found #477

Closed
nariman1987 opened this issue Jul 11, 2023 · 4 comments
Closed

[BUG] Unable to retrieve result for because it was not found #477

nariman1987 opened this issue Jul 11, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@nariman1987
Copy link

Describe the bug
Can not retrieve value

To Reproduce

jobs:
  import-secrets:
    runs-on: ubuntu-latest
    steps:
      - name: Import Secrets
        id: import-secrets
        uses: hashicorp/vault-action@v2
        with:
          tlsSkipVerify: true
          url: https://vault.xxxxxxxxxx
          method: ldap
          username: ${{ secrets.VAULT_USERNAME }}
          password: ${{ secrets.VAULT_PASSWORD }}
          # token: ${{ secrets.VAULT_TOKEN }}
          # caCertificate: ${{ secrets.VAULT_CA_CERT }}
          secrets: |
              sellbery-stage/amazon-service POSTGRES_PORT | POSTGRES_PORT ;

Expected behavior

When I try to get value from console or UI everything is work

/ $ vault kv get -field=POSTGRES_PORT sellbery-stage/amazon-service
5432

Log Output

##[debug]Evaluating condition for step: 'Import Secrets'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Import Secrets
##[debug]Loading inputs
##[debug]Evaluating: secrets.VAULT_USERNAME
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'VAULT_USERNAME'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: secrets.VAULT_PASSWORD
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'VAULT_PASSWORD'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run hashicorp/vault-action@v[2](https://github.com/Sellbery-Inc/amazon-service/actions/runs/5523655392/jobs/10074989418#step:2:2)
::group::Get Vault Secrets
Get Vault Secrets
Token Info
::add-mask::***
::endgroup::

Error: Unable to retrieve result for "sellbery-stage/amazon-service" because it was not found: {"request_id":"f16ea082-8f68-c7e9-7821-d2af4bc608a[3](https://github.com/Sellbery-Inc/amazon-service/actions/runs/5523655392/jobs/10074989418#step:2:3)","lease_id":"","renewable":false,"lease_duration":0,"data":null,"wrap_info":null,"warnings":["Invalid path for a versioned K/V secrets engine. See the API docs for the appropriate API endpoints to use. If using the Vault CLI, use 'vault kv get' for this operation."],"auth":null}
##[debug]Node Action run completed with exit code 1
##[debug]Set output errorMessage = Unable to retrieve result for "sellbery-stage/amazon-service" because it was not found: {"request_id":"f16ea082-8f68-c7e9-7821-d2af[4](https://github.com/Sellbery-Inc/amazon-service/actions/runs/5523655392/jobs/10074989418#step:2:4)bc[6](https://github.com/Sellbery-Inc/amazon-service/actions/runs/5523655392/jobs/10074989418#step:2:6)0[8](https://github.com/Sellbery-Inc/amazon-service/actions/runs/5523655392/jobs/10074989418#step:2:8)a3","lease_id":"","renewable":false,"lease_duration":0,"data":null,"wrap_info":null,"warnings":["Invalid path for a versioned K/V secrets engine. See the API docs for the appropriate API endpoints to use. If using the Vault CLI, use 'vault kv get' for this operation."],"auth":null}
##[debug]Finishing: Import Secrets
@nariman1987 nariman1987 added the bug Something isn't working label Jul 11, 2023
@fairclothjm
Copy link
Contributor

@nariman1987 Hello, did this work previously and then recently start failing? If yes, can you please try with hashicorp/vault-action@v2.7.1 and see if that fixes your issue?

@nariman1987
Copy link
Author

No, I tried do this first time. No help hashicorp/vault-action@v2.7.1

@fairclothjm
Copy link
Contributor

@nariman1987 Thanks, can you try adding data to the path like so:

          secrets: |
              sellbery-stage/data/amazon-service POSTGRES_PORT | POSTGRES_PORT ;

sellbery-stage/amazon-service -> sellbery-stage/data/amazon-service

@nariman1987
Copy link
Author

Thanks, when add data the error is clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants