cli
cli copied to clipboard
Missing support for TLS certificates
Hi,
Are there any plans to add support for TLS certificates?
The only option currently is to use curl which is non-trivial, especially crafting the json body, e.g.
#! https://developer.fastly.com/reference/api/tls/custom-certs/private-keys/
cat > /tmp/key.json <<EOF
{
"data": {
"type": "tls_private_key",
"attributes": {
"key": "$(echo "$TLS_KEY" | awk '{ printf "%s\\n", $0 }')",
"name": "changelog.com"
}
}
}
EOF
curl --verbose \
--header "Accept: application/vnd.api+json" \
--header "Content-Type: application/vnd.api+json" \
--header "Fastly-Key: $FASTLY_API_TOKEN" \
--request POST \
--data @/tmp/key.json \
https://api.fastly.com/tls/private_keys
#! https://developer.fastly.com/reference/api/tls/custom-certs/certificates/
cat > /tmp/crt.json <<EOF
{
"data": {
"type": "tls_certificate",
"attributes": {
"cert_blob": "$(echo "$TLS_CRT" | awk '{ printf "%s\\n", $0 }')",
"name": "changelog.com"
}
}
}
EOF
curl --verbose \
--header "Accept: application/vnd.api+json" \
--header "Content-Type: application/vnd.api+json" \
--header "Fastly-Key: $FASTLY_API_TOKEN" \
--request POST \
--data @/tmp/crt.json \
https://api.fastly.com/tls/certificates
Thank you, Carmina.
Any updates on this, folks?
TLS support was added in v3.3.0 https://github.com/fastly/cli/releases/tag/v3.3.0
https://github.com/fastly/cli/pull/630