---
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'
  Database:
    Type: 'AWS::CloudFormation::Stack'
    Properties:
      Parameters:
        VpcModule: !GetAtt 'Vpc.Outputs.StackName'
        ClientSgModule: !GetAtt 'ClientSg.Outputs.StackName'
        DBMasterUserPassword: 'test1234'
        EngineVersion: '14.12'
      TemplateURL: './node_modules/@cfn-modules/rds-postgres/module.yml'
