48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
import * as pulumi from "@pulumi/pulumi";
|
|
import * as aws from "@pulumi/aws";
|
|
import * as tailscale from "@pulumi/tailscale";
|
|
|
|
const r53_domains: { [key: string]: any } = {"gmem.ca": "", "gabrielsimmer.com": ""};
|
|
|
|
export = async () => {
|
|
for (const domain in r53_domains) {
|
|
r53_domains[domain] = new aws.route53.Zone(domain, {
|
|
comment: "Managed by Pulumi",
|
|
name: domain,
|
|
}, {
|
|
protect: true,
|
|
}).id;
|
|
}
|
|
|
|
const vancouver_ts = await tailscale.getDevice({ name: "vancouver.scorpion-ghost.ts.net" });
|
|
new aws.route53.Record("vancouver", {
|
|
zoneId: r53_domains["gmem.ca"],
|
|
name: "vancouver.gmem.ca",
|
|
type: "A",
|
|
ttl: 300,
|
|
records: [vancouver_ts.addresses[0]]
|
|
});
|
|
new aws.route53.Record("galleon", {
|
|
zoneId: r53_domains["gmem.ca"],
|
|
name: "galleon.gmem.ca",
|
|
type: "A",
|
|
ttl: 300,
|
|
records: [vancouver_ts.addresses[0]]
|
|
});
|
|
new aws.route53.Record("gabrielsimmercom", {
|
|
zoneId: r53_domains["gabrielsimmer.com"],
|
|
name: "gabrielsimmer.com",
|
|
type: "A",
|
|
ttl: 3600,
|
|
records: ["66.241.124.117"]
|
|
});
|
|
new aws.route53.Record("gabrielsimmercom-aaaa", {
|
|
zoneId: r53_domains["gabrielsimmer.com"],
|
|
name: "gabrielsimmer.com",
|
|
type: "AAAA",
|
|
ttl: 3600,
|
|
records: ["2a09:8280:1::4e:42fd"]
|
|
});
|
|
return { "vancouver ts ip": vancouver_ts.addresses[0] };
|
|
}
|