pulumiverse / pulumi-acme

Pulumi provider for ACME
Apache License 2.0
4 stars 2 forks source link

rpc error: code = Unknown desc = route53: not found, ResolveEndpointV2 #79

Open wanjohiryan opened 2 months ago

wanjohiryan commented 2 months ago

Hey there :)

I am getting an error, while trying to request a certificate on a domain hosted on AWS route53.

The error:

 2024/09/10 14:32:38 [WARN] [domain.com] acme: cleaning up failed: 2 errors occurred:
        * rpc error: code = Unknown desc = route53: not found, ResolveEndpointV2
        * error encountered while cleaning token for DNS challenge: rpc error: code = Unknown desc = route53: not found, ResolveEndpointV2
    2024/09/10 14:32:38 [INFO] Deactivating auth: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/13948784253
    2024-09-10T14:32:38.757+0300 [DEBUG] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
    2024-09-10T14:32:38.761+0300 [INFO]  plugin: plugin process exited: plugin=/home/wanjohi/.pulumi/plugins/resource-acme-v0.3.1/pulumi-resource-acme id=39019

The code:

const provider = new acme.Provider("provider", {
    //when i try the prod url, it will still fail
    serverUrl: "https://acme-staging-v02.api.letsencrypt.org/directory",
});

export const reg = new acme.Registration("reg", {
    accountKeyPem: privateKey.privateKeyPem,
    emailAddress: "xxxxxxxx@nestri.io",
}, { provider });

export const certificate = new acme.Certificate("certificate", {
    accountKeyPem: reg.accountKeyPem,
    commonName: "fst.so",
    subjectAlternativeNames: ["fst.so"],
    // keyType: "P256",
    recursiveNameservers: ["8.8.8.8:53"],
    dnsChallenges: [{
        provider: "route53",
        config: {
            AWS_HOSTED_ZONE_ID: "xxxxxxxx",
            AWS_MAX_RETRIES: "10",
        }
    }],
}, { provider });

Any help is very appreciated. Tbh, i dunno what the problem is, and why route53 is not getting called.

Oh, I have everything set up correctly, (I have even tried passing in the AWS_* credentials) but i am still getting the error :(

wanjohiryan commented 2 months ago

Apparently this is not an issue with the terraform provider, as stated here

Hey @wanjohiryan, I'm unable to reproduce it on this end using the latest version of the provider in a TF config.

He suggested checking that there might "possible version compatibility issues between the Route53 API and SDK version in use".

What do you think the issue is?