templates/clickhouse-arm-entrypoint-existing-vpc.template.yaml [566:727]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      GenerateSecretString:
        SecretStringTemplate: '{}'
        GenerateStringKey: "password"
        PasswordLength: 20
        ExcludeCharacters: '"@/\|.,;!#$%^&*()_`[]{}<>=-+?~:'
        ExcludePunctuation: true
      Tags:
        -
          Key: AppName
          Value: !Join ['-',['ClickHouseSecret',!GetAtt BastionStack.Outputs.BastionSecurityGroupID]]
  ZookeeperClusterStack: 
    Type: AWS::CloudFormation::Stack
    Properties: 
      TemplateURL:
        Fn::Sub: 
          - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/zookeeper.template.yaml
          - S3Region: !If 
              - UsingDefaultBucket
              - !Ref 'AWS::Region'
              - !Ref QSS3BucketRegion
            S3Bucket: !If 
              - UsingDefaultBucket
              - !Sub '${QSS3BucketName}-${AWS::Region}'
              - !Ref QSS3BucketName
      Parameters: 
        RootStackName: !GetAtt BastionStack.Outputs.BastionSecurityGroupID
        PrivateSubnetID1: !Ref PrivateSubnet1AID
        PrivateSubnetID2: !Ref PrivateSubnet2AID
        KeyPairName: !Ref KeyPairName
        ZookeeperInstanceType: !Ref ZookeeperInstanceType
        ZookeeperVersion: !Ref ZookeeperVersion
        ZookeeperServerSecurityGroupID: !GetAtt SecurityGroupStack.Outputs.ClickHouseServerSecurityGroup
        ZookeeperNodeName1: ZookeeperNode1
        ZookeeperNodeName2: ZookeeperNode2
        ZookeeperNodeName3: ZookeeperNode3
        ZookeeperNodeCount: !Ref ZookeeperNodeCount
        DeviceName: !Ref ZookeeperDeviceName
        VolumeType: !Ref ZookeeperVolumeType
        VolumeSize: !Ref ZookeeperVolumeSize
        Iops: !Ref ZookeeperIops
        CloudWatchAgentURL: !If [IsChinaRegion, 'https://s3.cn-north-1.amazonaws.com.cn/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm', 'https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm']
        InstanceRoleArn: !If [IsChinaRegion, 'aws-cn', 'aws']
        QSS3BucketName: !Ref QSS3BucketName
        QSS3KeyPrefix: !Ref QSS3KeyPrefix
  ClickHouseBucket:
    Type: AWS::S3::Bucket
    DeletionPolicy: Retain
    UpdateReplacePolicy: Retain
    Properties:
      BucketName: 
        !Join 
          - '-' 
          - ['clickhouse-data',!Ref VPCID]
      VersioningConfiguration:
        Status: Enabled
      IntelligentTieringConfigurations:
        - Id: clickhouse-data-tier1
          Status: Enabled
          Tierings:
            - AccessTier: ARCHIVE_ACCESS
              Days: 180
  ClickHouseClusterStack: 
    Condition: IsX86
    Type: AWS::CloudFormation::Stack
    Properties: 
      TemplateURL:
        Fn::Sub: 
          - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/clickhouse.template.yaml
          - S3Region: !If 
              - UsingDefaultBucket
              - !Ref 'AWS::Region'
              - !Ref QSS3BucketRegion
            S3Bucket: !If 
              - UsingDefaultBucket
              - !Sub '${QSS3BucketName}-${AWS::Region}'
              - !Ref QSS3BucketName
      Parameters: 
        RootStackName: !GetAtt BastionStack.Outputs.BastionSecurityGroupID
        PrivateSubnetID1: !Ref PrivateSubnet1AID
        PrivateSubnetID2: !If
          - UsingSingleAZ 
          - !Ref PrivateSubnet1AID
          - !Ref PrivateSubnet2AID
        ClickHouseServerSecurityGroup: !GetAtt SecurityGroupStack.Outputs.ClickHouseServerSecurityGroup
        AdminServerSecurityGroup: !GetAtt SecurityGroupStack.Outputs.AdminServerSecurityGroup
        KeyPairName: !Ref KeyPairName
        ClickHouseInstanceType: !Ref ClickHouseInstanceType
        ClickHouseVersion: !Ref ClickHouseVersion
        ClickHouseTimezone: !Ref ClickHouseTimezone
        ClickHouseNodeCount: !Ref ClickHouseNodeCount
        ClickHouseBucketName: !Ref ClickHouseBucket
        DeviceName: !Ref ClickHouseDeviceName
        VolumeType: !Ref ClickHouseVolumeType
        VolumeSize: !Ref ClickHouseVolumeSize
        Iops: !Ref ClickHouseIops
        MaxThreads: !Ref MaxThreads
        MaxMemoryUsage: !Ref MaxMemoryUsage
        MaxInsertThreads: !Ref MaxInsertThreads
        DistributedProductMode: !Ref DistributedProductMode
        LoadBalancing: !Ref LoadBalancing
        MaxDataPartSize: !Ref MaxDataPartSize
        MoveFactor: !Ref MoveFactor
        GrafanaVersion: !Ref GrafanaVersion
        DemoDataSize: !Ref DemoDataSize
        ZookeeperPrivateIp1: !GetAtt ZookeeperClusterStack.Outputs.ZookeeperPrivateIp1
        ZookeeperPrivateIp2: !GetAtt ZookeeperClusterStack.Outputs.ZookeeperPrivateIp2
        ZookeeperPrivateIp3: !GetAtt ZookeeperClusterStack.Outputs.ZookeeperPrivateIp3
        CloudWatchAgentURL: !If [IsChinaRegion, 'https://s3.cn-north-1.amazonaws.com.cn/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm', 'https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm']
        InstanceRoleArn: !If [IsChinaRegion, 'aws-cn', 'aws']
        QSS3BucketName: !Ref QSS3BucketName
        QSS3KeyPrefix: !Ref QSS3KeyPrefix
        SecretId: !Ref ClickHouseSecret
  ClickHouseClusterArmStack: 
    Condition: IsArm
    Type: AWS::CloudFormation::Stack
    Properties: 
      TemplateURL:
        Fn::Sub: 
          - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/clickhouse.arm.template.yaml
          - S3Region: !If 
              - UsingDefaultBucket
              - !Ref 'AWS::Region'
              - !Ref QSS3BucketRegion
            S3Bucket: !If 
              - UsingDefaultBucket
              - !Sub '${QSS3BucketName}-${AWS::Region}'
              - !Ref QSS3BucketName
      Parameters: 
        RootStackName: !GetAtt BastionStack.Outputs.BastionSecurityGroupID
        PrivateSubnetID1: !Ref PrivateSubnet1AID
        PrivateSubnetID2: !If
          - UsingSingleAZ 
          - !Ref PrivateSubnet1AID
          - !Ref PrivateSubnet2AID
        ClickHouseServerSecurityGroup: !GetAtt SecurityGroupStack.Outputs.ClickHouseServerSecurityGroup
        AdminServerSecurityGroup: !GetAtt SecurityGroupStack.Outputs.AdminServerSecurityGroup
        KeyPairName: !Ref KeyPairName
        ClickHouseInstanceType: !Ref ClickHouseInstanceType
        ClickHouseVersion: !Ref ClickHouseVersion
        ClickHouseTimezone: !Ref ClickHouseTimezone
        ClickHouseNodeCount: !Ref ClickHouseNodeCount
        ClickHouseBucketName: !Ref ClickHouseBucket
        DeviceName: !Ref ClickHouseDeviceName
        VolumeType: !Ref ClickHouseVolumeType
        VolumeSize: !Ref ClickHouseVolumeSize
        Iops: !Ref ClickHouseIops
        MaxThreads: !Ref MaxThreads
        MaxMemoryUsage: !Ref MaxMemoryUsage
        MaxInsertThreads: !Ref MaxInsertThreads
        DistributedProductMode: !Ref DistributedProductMode
        LoadBalancing: !Ref LoadBalancing
        MaxDataPartSize: !Ref MaxDataPartSize
        MoveFactor: !Ref MoveFactor
        GrafanaVersion: !Ref GrafanaVersion
        DemoDataSize: !Ref DemoDataSize
        ZookeeperPrivateIp1: !GetAtt ZookeeperClusterStack.Outputs.ZookeeperPrivateIp1
        ZookeeperPrivateIp2: !GetAtt ZookeeperClusterStack.Outputs.ZookeeperPrivateIp2
        ZookeeperPrivateIp3: !GetAtt ZookeeperClusterStack.Outputs.ZookeeperPrivateIp3
        CloudWatchAgentURL: !If [IsChinaRegion, 'https://s3.cn-north-1.amazonaws.com.cn/amazoncloudwatch-agent/ubuntu/arm64/latest/amazon-cloudwatch-agent.deb', 'https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/arm64/latest/amazon-cloudwatch-agent.deb']
        InstanceRoleArn: !If [IsChinaRegion, 'aws-cn', 'aws']
        QSS3BucketName: !Ref QSS3BucketName
        QSS3KeyPrefix: !Ref QSS3KeyPrefix
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/clickhouse-entrypoint-existing-vpc.template.yaml [590:751]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      GenerateSecretString:
        SecretStringTemplate: '{}'
        GenerateStringKey: "password"
        PasswordLength: 20
        ExcludeCharacters: '"@/\|.,;!#$%^&*()_`[]{}<>=-+?~:'
        ExcludePunctuation: true
      Tags:
        -
          Key: AppName
          Value: !Join ['-',['ClickHouseSecret',!GetAtt BastionStack.Outputs.BastionSecurityGroupID]]
  ZookeeperClusterStack: 
    Type: AWS::CloudFormation::Stack
    Properties: 
      TemplateURL:
        Fn::Sub: 
          - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/zookeeper.template.yaml
          - S3Region: !If 
              - UsingDefaultBucket
              - !Ref 'AWS::Region'
              - !Ref QSS3BucketRegion
            S3Bucket: !If 
              - UsingDefaultBucket
              - !Sub '${QSS3BucketName}-${AWS::Region}'
              - !Ref QSS3BucketName
      Parameters: 
        RootStackName: !GetAtt BastionStack.Outputs.BastionSecurityGroupID
        PrivateSubnetID1: !Ref PrivateSubnet1AID
        PrivateSubnetID2: !Ref PrivateSubnet2AID
        KeyPairName: !Ref KeyPairName
        ZookeeperInstanceType: !Ref ZookeeperInstanceType
        ZookeeperVersion: !Ref ZookeeperVersion
        ZookeeperServerSecurityGroupID: !GetAtt SecurityGroupStack.Outputs.ClickHouseServerSecurityGroup
        ZookeeperNodeName1: ZookeeperNode1
        ZookeeperNodeName2: ZookeeperNode2
        ZookeeperNodeName3: ZookeeperNode3
        ZookeeperNodeCount: !Ref ZookeeperNodeCount
        DeviceName: !Ref ZookeeperDeviceName
        VolumeType: !Ref ZookeeperVolumeType
        VolumeSize: !Ref ZookeeperVolumeSize
        Iops: !Ref ZookeeperIops
        CloudWatchAgentURL: !If [IsChinaRegion, 'https://s3.cn-north-1.amazonaws.com.cn/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm', 'https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm']
        InstanceRoleArn: !If [IsChinaRegion, 'aws-cn', 'aws']
        QSS3BucketName: !Ref QSS3BucketName
        QSS3KeyPrefix: !Ref QSS3KeyPrefix
  ClickHouseBucket:
    Type: AWS::S3::Bucket
    DeletionPolicy: Retain
    UpdateReplacePolicy: Retain
    Properties:
      BucketName: 
        !Join 
          - '-' 
          - ['clickhouse-data',!Ref VPCID]
      VersioningConfiguration:
        Status: Enabled
      IntelligentTieringConfigurations:
        - Id: clickhouse-data-tier1
          Status: Enabled
          Tierings:
            - AccessTier: ARCHIVE_ACCESS
              Days: 180
  ClickHouseClusterStack: 
    Condition: IsX86
    Type: AWS::CloudFormation::Stack
    Properties: 
      TemplateURL:
        Fn::Sub: 
          - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/clickhouse.template.yaml
          - S3Region: !If 
              - UsingDefaultBucket
              - !Ref 'AWS::Region'
              - !Ref QSS3BucketRegion
            S3Bucket: !If 
              - UsingDefaultBucket
              - !Sub '${QSS3BucketName}-${AWS::Region}'
              - !Ref QSS3BucketName
      Parameters: 
        RootStackName: !GetAtt BastionStack.Outputs.BastionSecurityGroupID
        PrivateSubnetID1: !Ref PrivateSubnet1AID
        PrivateSubnetID2: !If
          - UsingSingleAZ 
          - !Ref PrivateSubnet1AID
          - !Ref PrivateSubnet2AID
        ClickHouseServerSecurityGroup: !GetAtt SecurityGroupStack.Outputs.ClickHouseServerSecurityGroup
        AdminServerSecurityGroup: !GetAtt SecurityGroupStack.Outputs.AdminServerSecurityGroup
        KeyPairName: !Ref KeyPairName
        ClickHouseInstanceType: !Ref ClickHouseInstanceType
        ClickHouseVersion: !Ref ClickHouseVersion
        ClickHouseTimezone: !Ref ClickHouseTimezone
        ClickHouseNodeCount: !Ref ClickHouseNodeCount
        ClickHouseBucketName: !Ref ClickHouseBucket
        DeviceName: !Ref ClickHouseDeviceName
        VolumeType: !Ref ClickHouseVolumeType
        VolumeSize: !Ref ClickHouseVolumeSize
        Iops: !Ref ClickHouseIops
        MaxThreads: !Ref MaxThreads
        MaxMemoryUsage: !Ref MaxMemoryUsage
        MaxInsertThreads: !Ref MaxInsertThreads
        DistributedProductMode: !Ref DistributedProductMode
        LoadBalancing: !Ref LoadBalancing
        MaxDataPartSize: !Ref MaxDataPartSize
        MoveFactor: !Ref MoveFactor
        GrafanaVersion: !Ref GrafanaVersion
        DemoDataSize: !Ref DemoDataSize
        ZookeeperPrivateIp1: !GetAtt ZookeeperClusterStack.Outputs.ZookeeperPrivateIp1
        ZookeeperPrivateIp2: !GetAtt ZookeeperClusterStack.Outputs.ZookeeperPrivateIp2
        ZookeeperPrivateIp3: !GetAtt ZookeeperClusterStack.Outputs.ZookeeperPrivateIp3
        CloudWatchAgentURL: !If [IsChinaRegion, 'https://s3.cn-north-1.amazonaws.com.cn/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm', 'https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm']
        InstanceRoleArn: !If [IsChinaRegion, 'aws-cn', 'aws']
        QSS3BucketName: !Ref QSS3BucketName
        QSS3KeyPrefix: !Ref QSS3KeyPrefix
        SecretId: !Ref ClickHouseSecret
  ClickHouseClusterArmStack: 
    Condition: IsArm
    Type: AWS::CloudFormation::Stack
    Properties: 
      TemplateURL:
        Fn::Sub: 
          - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/clickhouse.arm.template.yaml
          - S3Region: !If 
              - UsingDefaultBucket
              - !Ref 'AWS::Region'
              - !Ref QSS3BucketRegion
            S3Bucket: !If 
              - UsingDefaultBucket
              - !Sub '${QSS3BucketName}-${AWS::Region}'
              - !Ref QSS3BucketName
      Parameters: 
        RootStackName: !GetAtt BastionStack.Outputs.BastionSecurityGroupID
        PrivateSubnetID1: !Ref PrivateSubnet1AID
        PrivateSubnetID2: !If
          - UsingSingleAZ 
          - !Ref PrivateSubnet1AID
          - !Ref PrivateSubnet2AID
        ClickHouseServerSecurityGroup: !GetAtt SecurityGroupStack.Outputs.ClickHouseServerSecurityGroup
        AdminServerSecurityGroup: !GetAtt SecurityGroupStack.Outputs.AdminServerSecurityGroup
        KeyPairName: !Ref KeyPairName
        ClickHouseInstanceType: !Ref ClickHouseInstanceType
        ClickHouseVersion: !Ref ClickHouseVersion
        ClickHouseTimezone: !Ref ClickHouseTimezone
        ClickHouseNodeCount: !Ref ClickHouseNodeCount
        ClickHouseBucketName: !Ref ClickHouseBucket
        DeviceName: !Ref ClickHouseDeviceName
        VolumeType: !Ref ClickHouseVolumeType
        VolumeSize: !Ref ClickHouseVolumeSize
        Iops: !Ref ClickHouseIops
        MaxThreads: !Ref MaxThreads
        MaxMemoryUsage: !Ref MaxMemoryUsage
        MaxInsertThreads: !Ref MaxInsertThreads
        DistributedProductMode: !Ref DistributedProductMode
        LoadBalancing: !Ref LoadBalancing
        MaxDataPartSize: !Ref MaxDataPartSize
        MoveFactor: !Ref MoveFactor
        GrafanaVersion: !Ref GrafanaVersion
        DemoDataSize: !Ref DemoDataSize
        ZookeeperPrivateIp1: !GetAtt ZookeeperClusterStack.Outputs.ZookeeperPrivateIp1
        ZookeeperPrivateIp2: !GetAtt ZookeeperClusterStack.Outputs.ZookeeperPrivateIp2
        ZookeeperPrivateIp3: !GetAtt ZookeeperClusterStack.Outputs.ZookeeperPrivateIp3
        CloudWatchAgentURL: !If [IsChinaRegion, 'https://s3.cn-north-1.amazonaws.com.cn/amazoncloudwatch-agent/ubuntu/arm64/latest/amazon-cloudwatch-agent.deb', 'https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/arm64/latest/amazon-cloudwatch-agent.deb']
        InstanceRoleArn: !If [IsChinaRegion, 'aws-cn', 'aws']
        QSS3BucketName: !Ref QSS3BucketName
        QSS3KeyPrefix: !Ref QSS3KeyPrefix
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



