Upload S3 Secrets to Vault
Create or update the secret in Vault.
You need to be logged in to Vault for the commands to work. |
# Adjust to your environment
instance=#INSTANCE_NAME
access_key=#S3_ACCESS_KEY
secret_key=#S3_SECRET_KEY
key="clusters/kv/${TENANT_ID}/${CLUSTER_ID}/openshift4-s3-forwarder/${instance}/s3"
# Query for existing secrets first
vault kv get "${key}"
# If there are existing secrets, add your instance secrets:
vault kv patch "${key}" accesskey=${access_key}
vault kv patch "${key}" secretkey=${secret_key}
# If there is no pre-existing secret, create new:
vault kv put "${key}" accesskey=${access_key}
vault kv put "${key}" secretkey=${secret_key}