Pulumi program for delegating subdomains for a hosted zone in Route 53:
subdomain-account
contains the code to be run in AWS accounts that wish to have a delegated subdomain, e.g.foo.example.com
:domain-account-add-attendee
contains a simple S3 static site configured to be at thewww.
sub-subdomain of the delegated subdomain, e.g.www.foo.example.com
:- This stack is presumed to execute in the same Pulumi order as
subdomain-account
.
- This stack is presumed to execute in the same Pulumi order as
In the subdomain-account
directory:
-
Set the FQDN of the subdomain, e.g.:
# First name, handle, username, etc. pulumi config set subdomainFqdn yourname.pulumi-workshops.com
-
Set the assumable role ARN (get this from the instructors), e.g.
pulumi config set parentZoneRoleArn arn:aws:iam::123456789012:role/role-name
-
Run the Pulumi program:
pulumi up
-
Optionally if your org allows publicly readable S3 sites, you can verify the configuration of your subdomain by deploying a simple S3 site:
cd ../subdomain-account-workload pulumi up -y
Test by running the following command:
curl $(pulumi stack output url)
You should see the following response:
<html> <head> <meta charset="UTF-8"> <title>It works!</title> </head> <body> <h1>It works!</h1> </body> </html>