---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'cfn-modules test'
Resources:
  Vpc:
    Type: 'AWS::CloudFormation::Stack'
    Properties:
      Parameters:
        S3Endpoint: 'false' # speed up the test
        DynamoDBEndpoint: 'false' # speed up the test
        FlowLog: 'false' # speed up the test
        NatGateways: 'false' # speed up the test
      TemplateURL: './node_modules/@cfn-modules/vpc/module.yml'
  ClientSg:
    Type: 'AWS::CloudFormation::Stack'
    Properties:
      Parameters:
        VpcModule: !GetAtt 'Vpc.Outputs.StackName'
      TemplateURL: './node_modules/@cfn-modules/client-sg/module.yml'
  Secret:
    Type: 'AWS::CloudFormation::Stack'
    Properties:
      Parameters:
        CharactersToExclude: '"@/\'
        PasswordLength: 30
      TemplateURL: './node_modules/@cfn-modules/secret/module.yml'
  Database:
    Type: 'AWS::CloudFormation::Stack'
    Properties:
      Parameters:
        VpcModule: !GetAtt 'Vpc.Outputs.StackName'
        ClientSgModule: !GetAtt 'ClientSg.Outputs.StackName'
        SecretModule: !GetAtt 'Secret.Outputs.StackName'
        DBBackupRetentionPeriod: '0'
        DBMultiAZ: 'false'
        EngineVersion: '14.12'
      TemplateURL: './node_modules/@cfn-modules/rds-postgres/module.yml'
