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

[HCP Vault Secrets] Print out Gateway Pool Resource ID for gateway commands #195

Merged
merged 6 commits into from
Nov 19, 2024

Conversation

averche
Copy link
Contributor

@averche averche commented Nov 19, 2024

🛠️ Description

Gateway Pool Resource ID is needed when creating new gateway integrations. This PR exposes the ID on create / read /list as well as writes it into the creds.json file.

🔗 Additional Link

🏗️ Local Testing

Create

> ./bin/hcp vs gateway-pools create foo --output-dir=gw                                      
Gateway Pool Name:          foo
Gateway Pool Resource Name: secrets/project/ad203a6b-b390-46a5-b9b7-98d192be2159/gateway-pool/foo
Gateway Pool Resource ID:   774e045f-60f7-4cd9-b550-470c41498553
Description:

> cat gw/creds.json
{
  "project_id": "ad203a6b-b390-46a5-b9b7-98d192be2159",
  "scheme": "service_principal_creds",
  "oauth": {
    "client_id": "...",
    "client_secret": "..."
  }
}

Read

> ./bin/hcp vs gateway-pools read foo
Gateway Pool Name   Gateway Pool Resource Name                                              Gateway Pool Resource ID               Integrations   Description
foo                 secrets/project/ad203a6b-b390-46a5-b9b7-98d192be2159/gateway-pool/foo   774e045f-60f7-4cd9-b550-470c41498553   []
                                                                                            

List

> ./bin/hcp vs gateway-pools list
Gateway Pool Name   Gateway Pool Resource Name                                              Gateway Pool Resource ID               Description
foo                 secrets/project/ad203a6b-b390-46a5-b9b7-98d192be2159/gateway-pool/foo   774e045f-60f7-4cd9-b550-470c41498553

👍 Checklist

  • The PR has a descriptive title.
  • Input validation updated
  • Unit tests updated
  • Documentation updated
  • Major architecture changes have a corresponding RFC
  • Tests added if applicable
  • CHANGELOG entry added or label 'pr/no-changelog' added to PR

    Run CHANGELOG_PR=<PR number> make changelog/new-entry for guidance
    in authoring a changelog entry, and commit the resulting file, which should
    have a name matching your PR number. Entries should use imperative present
    tense (e.g. Add support for...)

@averche averche changed the title [HCP Vault Secrets] Print out Gateway Pool Resource ID for gateway co… [HCP Vault Secrets] Print out Gateway Pool Resource ID for gateway commands Nov 19, 2024
@averche averche marked this pull request as ready for review November 19, 2024 17:51
@averche averche requested a review from a team as a code owner November 19, 2024 17:51
@averche averche requested a review from ncabatoff November 19, 2024 18:48
@averche averche merged commit 4377279 into main Nov 19, 2024
6 checks passed
@averche averche deleted the gateway-pool-resource-id branch November 19, 2024 22:38
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.

3 participants