How do I set up ACM certificates for two domains in ap-southeast-1?
In this guide, we will set up AWS ACM certificates for two domains in the ap-southeast-1
region using Pulumi. We will create two ACM certificates, each for a different domain, and validate them using DNS validation.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Define the first domain
const domain1 = "example1.com";
// Create an ACM certificate for the first domain
const certificate1 = new aws.acm.Certificate("certificate1", {
domainName: domain1,
validationMethod: "DNS",
tags: {
Name: "example1-cert",
},
});
// Define the second domain
const domain2 = "example2.com";
// Create an ACM certificate for the second domain
const certificate2 = new aws.acm.Certificate("certificate2", {
domainName: domain2,
validationMethod: "DNS",
tags: {
Name: "example2-cert",
},
});
// Export the ARNs of the certificates
export const certificate1Arn = certificate1.arn;
export const certificate2Arn = certificate2.arn;
Key Points
- We defined two domains:
example1.com
andexample2.com
. - We created two ACM certificates, each for one of the domains.
- We used DNS validation for both certificates.
- The ARNs of the certificates are exported for further use.
Summary
We successfully set up AWS ACM certificates for two domains in the ap-southeast-1
region using Pulumi. We created two ACM certificates with DNS validation and exported their ARNs for further use. This setup ensures secure communication for the specified domains.
Deploy this code
Want to deploy this code? Sign up for a free Pulumi account to deploy in a few clicks.
Sign upNew to Pulumi?
Want to deploy this code? Sign up with Pulumi to deploy in a few clicks.
Sign upThank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.