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

Add HCP connectivity info to vault server startup logs #18315

Merged
merged 3 commits into from
Dec 12, 2022

Conversation

ccapurso
Copy link
Contributor

@ccapurso ccapurso commented Dec 12, 2022

The properly formatted resource_id found in the cloud config stanza will include the organization, project, and user-provided ID of the resource in HCP. This PR modifies the vault server command to include this information in the startup logs if a valid cloud stanza has been provided.

❯ vault server -dev -config=hcp.hcl
==> Vault server configuration:

        HCP Organization: aa048f12-d735-4fe9-9443-40df11799938
             HCP Project: 03d4f563-c136-49cd-9c57-3923a1ef28e9
         HCP Resource ID: test-linked-cluster
             Api Address: http://127.0.0.1:8200
                     Cgo: disabled
         Cluster Address: https://127.0.0.1:8201
   Environment Variables: <....>
              Go Version: go1.19.3
              Listener 1: tcp (addr: "127.0.0.1:8200", cluster address: "127.0.0.1:8201", max_request_duration: "1m30s", max_request_size: "33554432", tls: "disabled")
               Log Level: info
                   Mlock: supported: false, enabled: false
           Recovery Mode: false
                 Storage: inmem
                 Version: Vault v1.13.0-dev1, built 2022-12-12T09:46:09Z
             Version Sha: 8ea899588ab065a0be2375bb0fb6f6983c27e4dd+CHANGES

@ccapurso ccapurso requested a review from hghaf099 December 12, 2022 18:21
Copy link
Contributor

@hghaf099 hghaf099 left a comment

Choose a reason for hiding this comment

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

Looks great!

@ccapurso ccapurso merged commit 082e04d into main Dec 12, 2022
@ccapurso ccapurso deleted the server-startup-hcp-info branch December 12, 2022 19:01
AnPucel pushed a commit that referenced this pull request Jan 14, 2023
* add HCP org, proj, and resource ID to server startup logs

* add server config test for cloud stanza

* add changelog entry
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