Capture tokens and secret id from Hashicorp Vault and assign it to Windows Env Variables: Combining regex and Select-String cmdlet
The concern is documenting capturing the token from hashicorp vault and passing it to the Windows Environment Variables
that I need to re-issue every 12 hours in order to work with the stack.
The aim is to get both consul and nomad CLI to work properly and to use the same keys for the WEBUI
▶ vault read consul/creds/support Key Value --- ----- lease_id consul/creds/support/1111111111 lease_duration 12h lease_renewable true accessor 1111-1111-1111-1111-1111 local false token 1111-1111-1111-1111-1111 <--- NEED TO ASSIGN THIS TO THE ENV VAR FOR CLI TO WORK