Add S3 Certificate via CLI

Hi - Does anyone know the correct command to upload S3 server.crt and server.key via cli?

Hi @billhill,

What command are you trying?

Hi Ram - I wanted to verify:

cluster modify --s3-certificate “-----BEGIN CERTIFICATE----- MIIF…[Your full certificate string here]… -----END CERTIFICATE-----” --s3-private-key “-----BEGIN PRIVATE KEY----- MIIE…[Your full private key string here]… -----END PRIVATE KEY-----”

Is this the correct syntax?

Seems on the right path, is that the entire code snippet? Are you receiving an error?

Here are two alternatives approaches:

curl -k -u admin:123456 -X PATCH -i -F "s3_certificate=`cat cert.pem`" -F "s3_private_key=`cat key.pem`" https://vms-hostname/api/v1/clusters/1

or

vastpy-cli patch clusters/1 s3_certificate="$(cat cert.pem)" s3_private_key="$(cat key.pem)"