Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'ap-southeast-2': {
Region: 'us-west-2'
},
'us-east-2': {
Region: 'us-east-1'
},
'cn-north-1': {
Region: 'cn-north-1'
},
'cn-northwest-1': {
Region: 'cn-northwest-1'
}
}
},
Conditions: {
'NotInChina': cf.notEquals(cf.select(0, cf.split('-', cf.region)), 'cn')
},
ref: ref,
Outputs: outputs
};
};
Description: 'Database size in GB',
Type: 'String',
Default: '100'
},
ELBSubnets: {
Description: 'ELB subnets',
Type: 'String'
},
SSLCertificateIdentifier: {
Type: 'String',
Description: 'SSL certificate for HTTPS protocol'
}
};
const Conditions = {
UseASnapshot: cf.notEquals(cf.ref('DBSnapshot'), ''),
UsePostgresEndpoint: cf.notEquals(cf.ref('PostgresEndpoint'), ''),
DatabaseDumpFileGiven: cf.notEquals(cf.ref('DatabaseDump'), '')
};
const Resources = {
TaskingManagerASG: {
DependsOn: 'TaskingManagerLaunchConfiguration',
Type: 'AWS::AutoScaling::AutoScalingGroup',
Properties: {
AutoScalingGroupName: cf.stackName,
Cooldown: 300,
MinSize: 1,
DesiredCapacity: 1,
MaxSize: 1,
HealthCheckGracePeriod: 300,
LaunchConfigurationName: cf.ref('TaskingManagerLaunchConfiguration'),
Type: 'String',
Description: 'Instagram URL'
},
OrgYoutube: {
Type: 'String',
Description: 'Youtube Url'
},
OrgGitHub: {
Type: 'String',
Description: 'Github URL'
}
};
const Conditions = {
UseASnapshot: cf.notEquals(cf.ref('DBSnapshot'), ''),
DatabaseDumpFileGiven: cf.notEquals(cf.ref('DatabaseDump'), ''),
IsTaskingManagerProduction: cf.equals(cf.ref('AutoscalingPolicy'), 'Production (max 12)'),
IsTaskingManagerDemo: cf.equals(cf.ref('AutoscalingPolicy'), 'Demo (max 3)')
};
const Resources = {
TaskingManagerASG: {
DependsOn: 'TaskingManagerLaunchConfiguration',
Type: 'AWS::AutoScaling::AutoScalingGroup',
Properties: {
AutoScalingGroupName: cf.stackName,
Cooldown: 600,
MinSize: cf.if('IsTaskingManagerProduction', 3, 1),
DesiredCapacity: cf.if('IsTaskingManagerProduction', 3, 1),
MaxSize: cf.if('IsTaskingManagerProduction', 12, cf.if('IsTaskingManagerDemo', 3, 1)),
HealthCheckGracePeriod: 600,
LaunchConfigurationName: cf.ref('TaskingManagerLaunchConfiguration'),
OrgInstagram: {
Type: 'String',
Description: 'Instagram URL'
},
OrgYoutube: {
Type: 'String',
Description: 'Youtube Url'
},
OrgGitHub: {
Type: 'String',
Description: 'Github URL'
}
};
const Conditions = {
UseASnapshot: cf.notEquals(cf.ref('DBSnapshot'), ''),
DatabaseDumpFileGiven: cf.notEquals(cf.ref('DatabaseDump'), ''),
IsTaskingManagerProduction: cf.equals(cf.ref('AutoscalingPolicy'), 'Production (max 12)'),
IsTaskingManagerDemo: cf.equals(cf.ref('AutoscalingPolicy'), 'Demo (max 3)')
};
const Resources = {
TaskingManagerASG: {
DependsOn: 'TaskingManagerLaunchConfiguration',
Type: 'AWS::AutoScaling::AutoScalingGroup',
Properties: {
AutoScalingGroupName: cf.stackName,
Cooldown: 600,
MinSize: cf.if('IsTaskingManagerProduction', 3, 1),
DesiredCapacity: cf.if('IsTaskingManagerProduction', 3, 1),
MaxSize: cf.if('IsTaskingManagerProduction', 12, cf.if('IsTaskingManagerDemo', 3, 1)),
HealthCheckGracePeriod: 600,
Default: '100'
},
ELBSubnets: {
Description: 'ELB subnets',
Type: 'String'
},
SSLCertificateIdentifier: {
Type: 'String',
Description: 'SSL certificate for HTTPS protocol'
}
};
const Conditions = {
UseASnapshot: cf.notEquals(cf.ref('DBSnapshot'), ''),
UsePostgresEndpoint: cf.notEquals(cf.ref('PostgresEndpoint'), ''),
DatabaseDumpFileGiven: cf.notEquals(cf.ref('DatabaseDump'), '')
};
const Resources = {
TaskingManagerASG: {
DependsOn: 'TaskingManagerLaunchConfiguration',
Type: 'AWS::AutoScaling::AutoScalingGroup',
Properties: {
AutoScalingGroupName: cf.stackName,
Cooldown: 300,
MinSize: 1,
DesiredCapacity: 1,
MaxSize: 1,
HealthCheckGracePeriod: 300,
LaunchConfigurationName: cf.ref('TaskingManagerLaunchConfiguration'),
TargetGroupARNs: [ cf.ref('TaskingManagerTargetGroup') ],
HealthCheckType: 'EC2',
Type: 'String',
Default: '100'
},
ELBSubnets: {
Description: 'ELB subnets',
Type: 'String'
},
SSLCertificateIdentifier: {
Type: 'String',
Description: 'SSL certificate for HTTPS protocol'
}
};
const Conditions = {
UseASnapshot: cf.notEquals(cf.ref('DBSnapshot'), ''),
UsePostgresEndpoint: cf.notEquals(cf.ref('PostgresEndpoint'), ''),
DatabaseDumpFileGiven: cf.notEquals(cf.ref('DatabaseDump'), '')
};
const Resources = {
TaskingManagerASG: {
DependsOn: 'TaskingManagerLaunchConfiguration',
Type: 'AWS::AutoScaling::AutoScalingGroup',
Properties: {
AutoScalingGroupName: cf.stackName,
Cooldown: 300,
MinSize: 1,
DesiredCapacity: 1,
MaxSize: 1,
HealthCheckGracePeriod: 300,
LaunchConfigurationName: cf.ref('TaskingManagerLaunchConfiguration'),
TargetGroupARNs: [ cf.ref('TaskingManagerTargetGroup') ],