AWSTemplateFormatVersion: '2010-09-09' Description: '(qs-1nae5pfk9) GitHub Enterprise+VPC Quickstart License: Apache 2.0 (Please do not remove) May,08,2018' Conditions: GovCloudCondition: !Equals - !Ref 'AWS::Region' - us-gov-west-1 UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart'] Metadata: QuickStartDocumentation: EntrypointName: "Launch into a new VPC" Order: "1" AWS::CloudFormation::Interface: ParameterGroups: - Label: default: ' VPC Network Configuration' Parameters: - VPCCIDR - AccessCIDR - Label: default: GitHubEnterprise License Parameters: - LicenseLocation - GHELicense - Label: default: GitHub Enterprise Organization and Repository Parameters: - InitialOrganization - InitialRepository - Label: default: Site Admin User Information Parameters: - ManagementPassword - SiteAdminUsername - SiteAdminUserEmail - SiteAdminUserPassword - Label: default: Server Configuration Parameters: - InstanceType - KeyPairName - VolumeType - ProvisionedIops - VolumeSize - Label: default: AWS Quick Start Configuration Parameters: - QSS3BucketName - QSS3BucketRegion - QSS3KeyPrefix ParameterLabels: AccessCIDR: default: Permitted IP range GHELicense: default: GitHub License Filename InitialOrganization: default: Initial Organization InitialRepository: default: Initial Repository InstanceType: default: Instance Type KeyPairName: default: Key Pair Name LicenseLocation: default: GitHub License Location ManagementPassword: default: Management Password ProvisionedIops: default: Provisioned IOPS QSS3BucketName: default: Quick Start S3 Bucket Name QSS3BucketRegion: default: Quick Start S3 bucket region QSS3KeyPrefix: default: Quick Start S3 Key Prefix SiteAdminUserEmail: default: Site Admin User Email SiteAdminUserPassword: default: Site Admin User Password SiteAdminUsername: default: Site Admin Username SubnetCIDR: default: Subnet CIDR VPCCIDR: default: VPC CIDR VolumeSize: default: Volume Size VolumeType: default: Volume Type Parameters: AccessCIDR: 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. Description: The IP address range that can be used to access to the EC2 instance MaxLength: '18' MinLength: '9' Type: String GHELicense: Description: 'GitHub Enterprise License file that is uploaded to the License S3 bucket. Sign up for a trial license here: https://enterprise.github.com/trial' Type: String InitialOrganization: Description: The initial organization to hold the GitHub Enterprise repository Default: initial-organization Type: String InitialRepository: Description: The initial repository to create Default: initial-repository Type: String InstanceType: AllowedValues: - m3.xlarge - m3.2xlarge - m4.xlarge - m4.2xlarge - c3.2xlarge - c3.4xlarge - c3.8xlarge - c4.2xlarge - c4.4xlarge - c4.8xlarge - r3.large - r3.xlarge - r3.2xlarge - r3.4xlarge - r3.8xlarge ConstraintDescription: >- must be a valid EC2 instance type for GitHub Enterprise: m3.xlarge, m3.2xlarge, m4.xlarge, m4.2xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, c4.2xlarge, c4.4xlarge, c4.8xlarge, r3.large, r3.xlarge, r3.xlarge, r3.2xlarge, r3.4xlarge, or r3.8xlarge. Default: m3.xlarge Description: WebServer EC2 instance type Type: String KeyPairName: Description: Public/private key pairs allow you to securely connect to your instance after it launches Type: AWS::EC2::KeyPair::KeyName LicenseLocation: Description: Name of S3 bucket containing GitHub Enterprise license Type: String ManagementPassword: AllowedPattern: (?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]* ConstraintDescription: Passwords must be at least 7 characters long and include at least one number and one upper case letter. Description: Set the Management password for Github Enterprise (Passwords must be at least 7 characters long and include at least one number and one upper case letter) MinLength: '7' NoEcho: 'True' Type: String ProvisionedIops: ConstraintDescription: Range is 100 to 20000 for Provisioned IOPS SSD volumes Description: Set the provisioned IOPs between 100 and 20000. Only set if you are choosing io1 for your volume type Type: String 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. Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Type: String QSS3BucketRegion: Default: 'us-east-1' Description: 'The AWS Region where the Quick Start S3 bucket (QSS3BucketName) is hosted. When using your own bucket, you must specify this value.' Type: String QSS3KeyPrefix: AllowedPattern: ^[0-9a-zA-Z-]+(/[0-9a-zA-Z-]+)*/ ConstraintDescription: Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/). It cannot start with forward slash (/) because it is automatically added. Default: quickstart-github-enterprise/ Description: >- S3 key prefix for the Quick Start assets. Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/). It cannot start with forward slash (/) because it is automatically added Type: String SiteAdminUserEmail: Description: Site Admin Email address Type: String SiteAdminUserPassword: AllowedPattern: (?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]* ConstraintDescription: Passwords must be at least 7 characters long and include at least one number and one upper case letter. Description: Set the Site Admin password for Github Enterprise (Passwords must be at least 7 characters long and include at least one number and one upper case letter) MinLength: '7' NoEcho: 'True' Type: String SiteAdminUsername: Description: Set the Site Admin Username Type: String VPCCIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$ Default: 10.0.0.0/16 Description: CIDR Block for the VPC Type: String VolumeSize: Default: '100' Description: The size of the EBS attached volume Type: String VolumeType: AllowedValues: - gp2 - io1 Description: Choose either GP2 or IO1. IO1 is recommended for more than 500 users Default: gp2 Type: String Resources: GHEStack: DependsOn: GHEVPCStack Properties: Parameters: AccessCIDR: !Ref 'AccessCIDR' GHELicense: !Ref 'GHELicense' InitialOrganization: !Ref 'InitialOrganization' InitialRepository: !Ref 'InitialRepository' InstanceType: !Ref 'InstanceType' KeyPairName: !Ref 'KeyPairName' LicenseLocation: !Ref 'LicenseLocation' ManagementPassword: !Ref 'ManagementPassword' ProvisionedIops: !Ref 'ProvisionedIops' QSS3BucketName: !Ref 'QSS3BucketName' QSS3BucketRegion: !Ref 'QSS3BucketRegion' QSS3KeyPrefix: !Ref 'QSS3KeyPrefix' SiteAdminUserEmail: !Ref 'SiteAdminUserEmail' SiteAdminUserPassword: !Ref 'SiteAdminUserPassword' SiteAdminUsername: !Ref 'SiteAdminUsername' SubnetId: !GetAtt 'GHEVPCStack.Outputs.SubnetId' VPCID: !GetAtt 'GHEVPCStack.Outputs.VPCID' VolumeSize: !Ref 'VolumeSize' VolumeType: !Ref 'VolumeType' TemplateURL: !Sub - 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/quickstart-github-enterprise.template' - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Type: AWS::CloudFormation::Stack GHEVPCStack: Properties: Parameters: KeyPairName: !Ref 'KeyPairName' VPCCIDR: !Ref 'VPCCIDR' TemplateURL: !Sub - 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/quickstart-github-enterprise-single-az-vpc.template' - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Type: AWS::CloudFormation::Stack