AWSTemplateFormatVersion: "2010-09-09" Description: "(SO8018)—Apache Superset on AWS offers the customer a scalable, open-source business intelligence application, v1.0.0 (qs-1s0fbq65f)." Metadata: QuickStartDocumentation: EntrypointName: "Parameters for deploying into a new VPC" Order: "1" AWS::CloudFormation::Interface: ParameterGroups: - Label: default: "AWS account configuration" Parameters: - SuperSetUserName - SuperSetUserPassword - WithExample - InstallProphet - ClusterName - Label: default: "Network configuration" Parameters: - AvailabilityZones - VPCCIDR - PublicSubnet1CIDR - PublicSubnet2CIDR - PrivateSubnet1CIDR - PrivateSubnet2CIDR - Label: default: AWS Quick Start configuration Parameters: - QSS3BucketName - QSS3KeyPrefix - QSS3BucketRegion ParameterLabels: SuperSetUserName: default: "Initial Superset user name" SuperSetUserPassword: default: "Initial Superset password" WithExample: default: "Populate example dashboard" InstallProphet: default: "Install Prophet library" ClusterName: default: "Elastic container cluster name" AvailabilityZones: default: "Availability Zones" VPCCIDR: default: "VPC CIDR blocks" PublicSubnet1CIDR: default: "Public subnet for Availability Zone 1" PublicSubnet2CIDR: default: "Public subnet for Availability Zone 2" PrivateSubnet1CIDR: default: "Private subnet for Availability Zone 1" PrivateSubnet2CIDR: default: "Private subnet for Availability Zone 2" QSS3BucketName: default: Quick Start S3 bucket name QSS3KeyPrefix: default: Quick Start S3 key prefix QSS3BucketRegion: default: Quick Start S3 bucket Region Parameters: SuperSetUserName: Type: String Description: Superset user name. AllowedPattern: "[a-zA-Z][a-zA-Z0-9]*" ConstraintDescription: "Must begin with a letter and contain only alphanumeric characters." Default: 'supersetuser' MaxLength: "16" MinLength: "1" SuperSetUserPassword: Description: Superset password. A strict password policy is recommended. AllowedPattern: "^(?=.*\\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[^\\w\\d\\s:])([^\\s]){8,16}$" ConstraintDescription: "Length 8~16 with space, Must contain 1 uppercase, 1 lowercase, 1 number, 1 non-alpha numeric number, 1 number (0-9)" MaxLength: "16" MinLength: "8" NoEcho: "True" Type: String WithExample: Type: String Default: "no" Description: 'Enables or disables populating the dashboard example. Setting this parameter to "yes" populates the dashboard example.' InstallProphet: Type: String Default: "no" Description: 'Enables or disables Prophet library installation for Forecasting Analytics. Setting this parameter to "yes" installs Prophet to enable Forecasting Analytics.' ClusterName: Type: String Default: 'supersetOnAWS' Description: Name of the Amazon ECS cluster. AvailabilityZones: Description: 'List of Availability Zones to use for the VPC subnets.' Type: List VPCCIDR: Type: String Default: 192.168.0.0/16 Description: Enter the IP range (CIDR notation) for this VPC. AllowedPattern: "(?:^$|(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2}))" ConstraintDescription: "Must be a valid IP CIDR range of the form x.x.x.x/x." MinLength: 9 MaxLength: 18 PublicSubnet1CIDR: Type: String Default: 192.168.10.0/24 Description: 'Enter the IP range (CIDR notation) for the public subnet in Availability Zone 1.' AllowedPattern: "(?:^$|(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2}))" ConstraintDescription: "Must be a valid IP CIDR range of the form x.x.x.x/x." MinLength: 9 MaxLength: 18 PublicSubnet2CIDR: Type: String Default: 192.168.11.0/24 Description: 'Enter the IP range (CIDR notation) for the public subnet in Availability Zone 2.' AllowedPattern: "(?:^$|(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2}))" ConstraintDescription: "Must be a valid IP CIDR range of the form x.x.x.x/x." PrivateSubnet1CIDR: Type: String Default: 192.168.20.0/24 Description: 'Enter the IP range (CIDR notation) for the private subnet in Availability Zone 1.' AllowedPattern: "(?:^$|(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2}))" ConstraintDescription: "Must be a valid IP CIDR range of the form x.x.x.x/x." PrivateSubnet2CIDR: Type: String Default: 192.168.21.0/24 Description: 'Enter the IP range (CIDR notation) for the private subnet in Availability Zone 2.' AllowedPattern: "(?:^$|(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2}))" ConstraintDescription: "Must be a valid IP CIDR range of the form x.x.x.x/x." QSS3BucketName: AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$ ConstraintDescription: Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Default: aws-quickstart Description: S3 bucket name for the Quick Start assets. This string can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Type: String QSS3KeyPrefix: AllowedPattern: ^[0-9a-zA-Z-/.]*$ ConstraintDescription: Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), periods (.) and forward slashes (/). Default: quickstart-apache-superset/ Description: S3 key prefix for the Quick Start assets. Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), periods (.) and forward slashes (/). Type: String QSS3BucketRegion: Default: 'cn-north-1' Description: 'Region where the Quick Start S3 bucket (QSS3BucketName) is hosted. When using your own bucket, you must specify this value.' Type: String Conditions: UsingDefaultBucket: !Equals [ !Ref QSS3BucketName, 'aws-quickstart' ] Resources: Vpc: Type: 'AWS::CloudFormation::Stack' Properties: TemplateURL: !Sub - 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}submodules/quickstart-aws-vpc/templates/aws-vpc.template.yaml' - S3Region: !If [ UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion ] S3Bucket: !If [ UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName ] Parameters: AvailabilityZones: !Join - ',' - !Ref 'AvailabilityZones' PublicSubnet1CIDR: !Ref 'PublicSubnet1CIDR' PublicSubnet2CIDR: !Ref 'PublicSubnet2CIDR' PrivateSubnet1ACIDR: !Ref 'PrivateSubnet1CIDR' PrivateSubnet2ACIDR: !Ref 'PrivateSubnet2CIDR' VPCCIDR: !Ref VPCCIDR Superset: Type: 'AWS::CloudFormation::Stack' Properties: TemplateURL: !Sub - 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/superset-new-vpc-workload.template.yaml' - S3Region: !If [ UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion ] S3Bucket: !If [ UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName ] Parameters: UserName: !Ref 'SuperSetUserName' UserPassword: !Ref 'SuperSetUserPassword' WithExample: !Ref 'WithExample' InstallProphet: !Ref 'InstallProphet' ClusterName: !Ref 'ClusterName' PublicSubnet1ID: Fn::GetAtt: [Vpc, Outputs.PublicSubnet1ID] PublicSubnet2ID: Fn::GetAtt: [Vpc, Outputs.PublicSubnet2ID] PrivateSubnet1AID: Fn::GetAtt: [Vpc, Outputs.PrivateSubnet1AID] PrivateSubnet2AID: Fn::GetAtt: [Vpc, Outputs.PrivateSubnet2AID] VpcID: Fn::GetAtt: [Vpc, Outputs.VPCID] Outputs: SupersetConsole: Description: SupersetConsole URL Value: !GetAtt [Superset, Outputs.SupersetConsole]