internal/pkg/template/templates/addons/aurora/cf.yml [97:156]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  {{- if .ParameterGroup}}
  # {{logicalIDSafe .ClusterName}}DBClusterParameterGroup:
  #   Type: 'AWS::RDS::DBClusterParameterGroup'
  #   Properties:
  #     Description: !Ref 'AWS::StackName'
  #     Family: 'aurora-mysql5.7'
  #     Parameters:
  #       character_set_client: 'utf8'
  {{- else}}
  {{logicalIDSafe .ClusterName}}DBClusterParameterGroup:
    Metadata:
      'aws:copilot:description': 'A DB parameter group for engine configuration values'
    Type: 'AWS::RDS::DBClusterParameterGroup'
    Properties:
      Description: !Ref 'AWS::StackName'
      {{- if eq .Engine "MySQL"}}
      Family: 'aurora-mysql5.7'
      Parameters:
        character_set_client: 'utf8'
      {{- else}}
      Family: 'aurora-postgresql10'
      Parameters:
        client_encoding: 'UTF8'
      {{- end}}
  {{- end}}
  {{logicalIDSafe .ClusterName}}DBCluster:
    Metadata:
      'aws:copilot:description': 'The {{logicalIDSafe .ClusterName}} Aurora Serverless database cluster'
    Type: 'AWS::RDS::DBCluster'
    Properties:
      MasterUsername:
        !Join [ "",  [ {{`'{{resolve:secretsmanager:'`}}, !Ref {{logicalIDSafe .ClusterName}}AuroraSecret, ":SecretString:username}}" ]]
      MasterUserPassword:
        !Join [ "",  [ {{`'{{resolve:secretsmanager:'`}}, !Ref {{logicalIDSafe .ClusterName}}AuroraSecret, ":SecretString:password}}" ]]
      DatabaseName: !Ref {{logicalIDSafe .ClusterName}}DBName
      {{- if eq .Engine "MySQL"}}
      Engine: 'aurora-mysql'
      EngineVersion: '5.7.mysql_aurora.2.07.1'
      {{- else}}
      Engine: 'aurora-postgresql'
      EngineVersion: '10.12'
      {{- end}}
      EngineMode: serverless
      DBClusterParameterGroupName: {{- if .ParameterGroup}} {{.ParameterGroup}} {{- else}} !Ref {{logicalIDSafe .ClusterName}}DBClusterParameterGroup {{- end}}
      DBSubnetGroupName: !Ref {{logicalIDSafe .ClusterName}}DBSubnetGroup
      VpcSecurityGroupIds:
        - !Ref {{logicalIDSafe .ClusterName}}DBClusterSecurityGroup
      ScalingConfiguration:
        AutoPause: true
        # Replace "All" below with "!Ref Env" to set different autoscaling limits per environment.
        MinCapacity: !FindInMap [{{logicalIDSafe .ClusterName}}EnvScalingConfigurationMap, All, DBMinCapacity]
        MaxCapacity: !FindInMap [{{logicalIDSafe .ClusterName}}EnvScalingConfigurationMap, All, DBMaxCapacity]
        SecondsUntilAutoPause: !Ref {{logicalIDSafe .ClusterName}}DBAutoPauseSeconds
  {{logicalIDSafe .ClusterName}}SecretAuroraClusterAttachment:
    Type: AWS::SecretsManager::SecretTargetAttachment
    Properties:
      SecretId: !Ref {{logicalIDSafe .ClusterName}}AuroraSecret
      TargetId: !Ref {{logicalIDSafe .ClusterName}}DBCluster
      TargetType: AWS::RDS::DBCluster
Outputs:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



internal/pkg/template/templates/addons/aurora/rdws/cf.yml [108:167]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  {{- if .ParameterGroup}}
  # {{logicalIDSafe .ClusterName}}DBClusterParameterGroup:
  #   Type: 'AWS::RDS::DBClusterParameterGroup'
  #   Properties:
  #     Description: !Ref 'AWS::StackName'
  #     Family: 'aurora-mysql5.7'
  #     Parameters:
  #       character_set_client: 'utf8'
  {{- else}}
  {{logicalIDSafe .ClusterName}}DBClusterParameterGroup:
    Metadata:
      'aws:copilot:description': 'A DB parameter group for engine configuration values'
    Type: 'AWS::RDS::DBClusterParameterGroup'
    Properties:
      Description: !Ref 'AWS::StackName'
      {{- if eq .Engine "MySQL"}}
      Family: 'aurora-mysql5.7'
      Parameters:
        character_set_client: 'utf8'
      {{- else}}
      Family: 'aurora-postgresql10'
      Parameters:
        client_encoding: 'UTF8'
      {{- end}}
  {{- end}}
  {{logicalIDSafe .ClusterName}}DBCluster:
    Metadata:
      'aws:copilot:description': 'The {{logicalIDSafe .ClusterName}} Aurora Serverless database cluster'
    Type: 'AWS::RDS::DBCluster'
    Properties:
      MasterUsername:
        !Join [ "",  [ {{`'{{resolve:secretsmanager:'`}}, !Ref {{logicalIDSafe .ClusterName}}AuroraSecret, ":SecretString:username}}" ]]
      MasterUserPassword:
        !Join [ "",  [ {{`'{{resolve:secretsmanager:'`}}, !Ref {{logicalIDSafe .ClusterName}}AuroraSecret, ":SecretString:password}}" ]]
      DatabaseName: !Ref {{logicalIDSafe .ClusterName}}DBName
      {{- if eq .Engine "MySQL"}}
      Engine: 'aurora-mysql'
      EngineVersion: '5.7.mysql_aurora.2.07.1'
      {{- else}}
      Engine: 'aurora-postgresql'
      EngineVersion: '10.12'
      {{- end}}
      EngineMode: serverless
      DBClusterParameterGroupName: {{- if .ParameterGroup}} {{.ParameterGroup}} {{- else}} !Ref {{logicalIDSafe .ClusterName}}DBClusterParameterGroup {{- end}}
      DBSubnetGroupName: !Ref {{logicalIDSafe .ClusterName}}DBSubnetGroup
      VpcSecurityGroupIds:
        - !Ref {{logicalIDSafe .ClusterName}}DBClusterSecurityGroup
      ScalingConfiguration:
        AutoPause: true
        # Replace "All" below with "!Ref Env" to set different autoscaling limits per environment.
        MinCapacity: !FindInMap [{{logicalIDSafe .ClusterName}}EnvScalingConfigurationMap, All, DBMinCapacity]
        MaxCapacity: !FindInMap [{{logicalIDSafe .ClusterName}}EnvScalingConfigurationMap, All, DBMaxCapacity]
        SecondsUntilAutoPause: !Ref {{logicalIDSafe .ClusterName}}DBAutoPauseSeconds
  {{logicalIDSafe .ClusterName}}SecretAuroraClusterAttachment:
    Type: AWS::SecretsManager::SecretTargetAttachment
    Properties:
      SecretId: !Ref {{logicalIDSafe .ClusterName}}AuroraSecret
      TargetId: !Ref {{logicalIDSafe .ClusterName}}DBCluster
      TargetType: AWS::RDS::DBCluster
Outputs:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



