https://pulumi.com logo
#typescript
Title
# typescript
m

miniature-arm-21874

03/07/2024, 8:31 PM
Is it possible to use acm.getCertificate() from another region? I have an application being deployed in eu-west-1 but it's deploying a cloudfront distribution which is global obviously. The cloudfront distribution requires the arn of a certificate in us-east-1. getCertificate() defaults to the region the stack is running in and doesn't take a provider arg. the certificate in us-east-1 is owned by something else so i can't import it into this stack (as far as my understanding goes) all i need is the arn for it. any thoughts on how might i go about this?
f

fast-vase-27755

03/07/2024, 8:42 PM
try to create region provider
Copy code
// ACM certificates MUST be created in the us-east-1 region
const usEastProvider = new aws.Provider("us-east-provider", {
    region: "us-east-1",
});
and pass it to all cert-related operations like
Copy code
{ provider: usEastProvider }
should work in
getCertificate
,
certificateValidation
.. at least worked for me
m

miniature-arm-21874

03/07/2024, 8:43 PM
getCertificate doesn't take a provider arg
ah it does it just isn't documented
yeah that worked, cheers it's buried away in the docs on the method prototype in this code clip. I was looking in the tables of arguments
f

fast-vase-27755

03/07/2024, 9:01 PM
right, documentation is poor in ACM glad that worked