https://pulumi.com logo
#general
Title
# general
r

red-football-97286

10/18/2021, 9:03 AM
Hi, I'm trying to return the arn of a certificate in AWS ACM, but I don't a return..
Copy code
pulumi.Run(func(ctx *pulumi.Context) error {

		_, err := acm.LookupCertificate(ctx, &acm.LookupCertificateArgs{
			Domain: "mft-dev.cloud.internal",
			Statuses: []string{
				"ISSUED",
			},
		})
		if err != nil {
			return err
		}

		return nil
	})
Any ideas?
b

brave-planet-10645

10/18/2021, 9:27 AM
I think it's something like this
Copy code
pulumi.Run(func(ctx *pulumi.Context) error {

		certificate, err := acm.LookupCertificate(ctx, &acm.LookupCertificateArgs{
			Domain: "mft-dev.cloud.internal",
			Statuses: []string{
				"ISSUED",
			},
		})

        ctx.Export("certificate", certificate.Arn)        

		if err != nil {
			return err
		}

		return nil
	})
That might not be exactly the right syntax
r

red-football-97286

10/18/2021, 9:35 AM
Great, thanks Piers.
2 Views