nmdp-bioinformatics / gfe-db

Graph database representing IPD-IMGT/HLA sequence data as GFE
https://gfe-db.readthedocs.io
GNU General Public License v3.0
9 stars 15 forks source link

Parameterize VPC, Subnet & DNS record #86

Closed chrisammon3000 closed 6 months ago

chrisammon3000 commented 1 year ago

Description

The current networking configuration deploys a new VPC, public subnet and creates a new A record for an existing hosted zone (identified by the domain name).

This will make the following changes:

Note: It will be possible to change the subnet from public to private at a later point once these changes are tested

Environment Variables

These environment variables are added:

VPC_ID=vpc-8a3d74f0
PUBLIC_SUBNET_ID=subnet-5c44793b

These environment variables already existing but are being handled by different logic (Makefile targets)

HOST_DOMAIN=cloudftl.com
SUBDOMAIN=dev-gfe-db

References

AWS::Route53::RecordSet resource (link)

Current configuration:

# ./gfe-db/database/template.yaml
  Neo4jDNSRecord:
    Type: AWS::Route53::RecordSet
    Properties:
      HostedZoneName: !Sub "${HostDomain}." 
      Comment: !Sub 'DNS name for ${Stage}-${AppName} server'
      Name: !Sub ${Subdomain}.${HostDomain}. # HostDomain and Subdomain are passed as env vars at deploy time
      Type: A
      TTL: 300
      ResourceRecords:
      - !Sub '{{resolve:ssm:/${AppName}/${Stage}/${AWS::Region}/Neo4jDatabaseEndpoint}}' # This value is available once Neo4j is running