Skip to content

Latest commit

 

History

History

dns

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

DNS

This module reserves a static IP for your appliance by using AWS Elastic IP and then assigns that IP to a DNS record using AWS Route 53. Reserving a static IP allows us to restart the appliance as needed without having to update DNS each time.

    ┌────────────────────────────────────────────────────┐       
    │                    EC2 Instance                    │       
    │    ┌─────────────────────────────────────────┐     │       
    │    │                  nginx                  │     │──┐    
    │    └─────────────────────────────────────────┘     │  │    
    │                         │                          │  │    
    └─────────────────────────┼──────────────────────────┘  │    
                              │                             │    
                           Serves                           │    
                         Traffic as                         │    
                              │                             │    
                              │                             │    
                              │                             │    
                              │                             │    
                              ▼                             │    
                  ┌──────────────────────┐                  │    
                  │ lettuce.example.org  │                  │    
            ┌─────│     ("A" Record)     │──┐               │    
            │     └──────────────────────┘  │               │    
            │                               │           Binds to 
            │                               │               │    
          Is a                              │               │    
       Member of                        Resolves            │    
            │                              to               │    
            │                               │               │    
            │                               ▼               │    
            │                     ┌───────────────────┐     │    
            │                     │Elastic IP Address │◀────┘    
            │                     └───────────────────┘          
            │                                                    
            ▼                                                    
  ┌──────────────────┐                                           
  │   example.org    │                                           
  │      (Zone)      │                                           
  └──────────────────┘                                           

By tagging the Elastic IP with the Name "lettuce", we make it discoverable by the parent module as a terraform data object. In practice, this is a more forgiving interface than working with terraform output / tfvars files.