flyctl icon indicating copy to clipboard operation
flyctl copied to clipboard

fix: --json should not show human steps

Open matthiaz opened this issue 9 months ago • 0 comments

As a human, yes I want human readable steps. But If I'm asking for --json, I really don't expect those steps to break my json.

Current behaviour

flyctl certs show yourdomain.be --app $NAME --json                            
{
    "ID": "cert_1235ln",
    "AcmeDNSConfigured": false,
    "AcmeALPNConfigured": false,
    "Configured": false,
    "CertificateAuthority": "lets_encrypt",
    "CreatedAt": "2025-03-14T11:11:23Z",
    "DNSProvider": "cloudflare",
...
    "Hostname": "yourdomain.be",
    "Source": "fly",
    "ClientStatus": "Awaiting configuration",
    "IsApex": false,
    "IsWildcard": false,
    "Issued": {
        "Nodes": []
    }
}

You are creating a certificate for yourdomain.be
We are using Let's Encrypt for this certificate.

You can configure your DNS for yourdomain.be by:

1: Adding an CNAME record to your DNS service which reads:

    CNAME test. yourdomain-test.fly.dev

Notice the human readable 'next steps' that should not be there when using --json

after this change

flyctl certs show yourdomain.be --app $NAME --json                            
{
    "ID": "cert_1235ln",
    "AcmeDNSConfigured": false,
    "AcmeALPNConfigured": false,
    "Configured": false,
    "CertificateAuthority": "lets_encrypt",
    "CreatedAt": "2025-03-14T11:11:23Z",
    "DNSProvider": "cloudflare",
...
    "Hostname": "yourdomain.be",
    "Source": "fly",
    "ClientStatus": "Awaiting configuration",
    "IsApex": false,
    "IsWildcard": false,
    "Issued": {
        "Nodes": []
    }
}

matthiaz avatar Mar 14 '25 11:03 matthiaz