Home

Awesome

rds-postgres CfHighlander component

Parameters

NameUseDefaultGlobalTypeAllowed Values
EnvironmentNameTaggingdevtruestring
EnvironmentTypeTaggingdevelopmenttruestring['development','production']
SubnetIdsList of subnetsNonefalseCommaDelimitedList
RDSInstanceTypeRDS Instance Type to useNonefalsestring
RDSAllocatedStorageAmount of storage in GB to assignNonefalsestring
DnsDomainDNS domain to useNonetruestring
MultiAZSpecifies whether the database instance is a multiple Availability Zone deploymentfalsefalse['true','false']
RDSSnapshotIDThe name or Amazon Resource Name (ARN) of the DB snapshot that's used to restore the DB instancefalsefalsestring

Outputs/Exports

NameValueExported
SecurityGroupSecurity Group Nametrue
DBEndpointRDS Endpoint.Address valuetrue
DBPortRDS Endpoint.Porttrue

Included Components

lib-ec2

Example Configuration

Highlander

  Component name:'database', template: 'rds-postgres' do
    parameter name: 'DnsDomain', value: root_domain
    parameter name: 'DnsFormat', value: FnSub("${EnvironmentName}.#{root_domain}")
    parameter name: 'SubnetIds', value: cfout('vpcv2', 'PersistenceSubnets')
    parameter name: 'RDSInstanceType', value: 'db.m5.large'
    parameter name: 'MultiAZ', value: 'false'
    parameter name: 'StackOctet', value: '120'
    parameter name: 'RDSAllocatedStorage', value: '100'
  end

RDS-POSTGRES Configuration

db_name: myappdb
engine: postgres
engine_version: '13.4'
family: 'postgres13'
dns_record: db
deletion_policy: Snapshot

parameters:
  authentication_timeout: '60'

storage_encrypted: true
maintenance_window: sat:18:00-sat:18:30

security_group:
  -
    rules:
      -
        IpProtocol: tcp
        FromPort: 5432
        ToPort: 5432
    ips:
      - stack

master_login:
  username_ssm_param: /project/rds/RDS_MASTER_USERNAME
  password_ssm_param: /project/rds/RDS_MASTER_PASSWORD

Cfhighlander Setup

install cfhighlander gem

gem install cfhighlander

or via docker

docker pull theonestack/cfhighlander

Testing Components

Running the tests

cfhighlander cftest rds-postgres