Skip to content

Demo using Pulumi to delegate subdomains to separate AWS accounts.

License

Notifications You must be signed in to change notification settings

jkodroff/aws-dns-subdomain-delegation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-dns-subdomain-delegation

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 the www. 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.

Instructions for Delegating a Subdomain

In the subdomain-account directory:

  1. Set the FQDN of the subdomain, e.g.:

    # First name, handle, username, etc.
    pulumi config set subdomainFqdn yourname.pulumi-workshops.com
  2. Set the assumable role ARN (get this from the instructors), e.g.

    pulumi config set parentZoneRoleArn arn:aws:iam::123456789012:role/role-name
  3. Run the Pulumi program:

    pulumi up
  4. 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>
    

About

Demo using Pulumi to delegate subdomains to separate AWS accounts.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published