--- AWSTemplateFormatVersion: 2010-09-09 Description: >- Main stack - Deploys two vMX instances in different Availability Zones in an existing VPC along with an AWS Cloud WAN core network. **WARNING** You will be billed for the AWS resources used if you create a stack from this template.(qs-1srtkbc43) Metadata: QuickStartDocumentation: EntrypointName: "Launch into an existing VPC" Order: "2" AWS::CloudFormation::Interface: ParameterGroups: - Label: default: Meraki configuration Parameters: - MerakiOrgID - MerakiAPIKey - NumberOfvMXs - vMX1Token - vMX2Token - vMX1MerakiNetworkTag - vMX2MerakiNetworkTag - Label: default: Network configuration Parameters: - VPCID - AZ1PublicSubnetID - AZ2PublicSubnetID - VPCRouteTableID - AmazonASNRange - GlobalNetworkName - MerakiEventBusName - Label: default: EC2 configuration Parameters: - InstanceType - Label: default: AWS Lambda configuration Parameters: - LambdaRate - Label: default: AWS Quick Start configuration Parameters: - QSS3BucketName - QSS3KeyPrefix - QSS3BucketRegion - KeyPairName ParameterLabels: KeyPairName: default: Key pair name MerakiOrgID: default: Meraki organization ID MerakiAPIKey: default: Meraki organization API key InstanceType: default: Amazon EC2 instance type NumberOfvMXs: default: Number of vMX instances vMX1MerakiNetworkTag: default: Meraki network tag for first vMX instance vMX2MerakiNetworkTag: default: Meraki network tag for second vMX instance vMX1Token: default: Authentication token for first vMX instance vMX2Token: default: Authentication token for second vMX instance VPCID: default: VPC ID AvailabilityZone1CIDR: default: CIDR block for public subnet 1 AvailabilityZone2CIDR: default: CIDR block for public subnet 2 VPCRouteTableID: default: Existing VPC route table ID QSS3BucketName: default: Quick Start S3 bucket name QSS3BucketRegion: default: Quick Start S3 bucket Region QSS3KeyPrefix: default: Quick Start S3 key prefix LambdaRate: default: CloudWatch Events rule rate AmazonASNRange: default: Cloud WAN Autonomous System Number (ASN) range GlobalNetworkName: default: Cloud WAN global network name MerakiEventBusName: default: "MerakiEventBus" Parameters: MerakiOrgID: Description: Meraki organization ID. Type: String MerakiAPIKey: Description: Meraki organization API key. Type: String NoEcho: 'true' InstanceType: Description: Amazon EC2 instance type for the vMX instances. For recommended and supported instance types, see https://documentation.meraki.com/MX/MX_Installation_Guides/vMX_Setup_Guide_for_Amazon_Web_Services_(AWS). Type: String Default: c5.large AllowedValues: - c5.large - c5.xlarge - m4.large ConstraintDescription: Must be a valid EC2 instance type. NumberOfvMXs: Description: Number of vMX instances to deploy. Type: String AllowedValues: - '1' - '2' Default: '2' vMX1MerakiNetworkTag: Description: On the Meraki dashboard, the vMX network tag for the first vMX instance. Type: String Default: vMX1 vMX2MerakiNetworkTag: Description: On the Meraki dashboard, the vMX network tag for the second vMX instance. Type: String Default: vMX2 vMX1Token: Description: Onboarding token for the first vMX instance. You can obtain the token from the Meraki dashboard. See https://account.meraki.com/login/dashboard_login?go=%2F. Type: String Default: change_to_match_the_token_from_meraki_dashboard vMX2Token: Description: Onboarding token for the second vMX instance. You can obtain the token from the Meraki dashboard. See https://account.meraki.com/login/dashboard_login?go=%2F. Type: String Default: change_to_match_the_token_from_meraki_dashboard AZ1PublicSubnetID: Description: ID of the public subnet in Availability Zone 1 of the existing VPC (e.g., `subnet-z0376dab`). Type: "AWS::EC2::Subnet::Id" AZ2PublicSubnetID: Description: ID of the public subnet in Availability Zone 2 of the existing VPC (e.g., `subnet-a29c3d84`). Type: "AWS::EC2::Subnet::Id" VPCID: Description: ID of the existing VPC for deployment (e.g., `vpc-0343606e`). Type: AWS::EC2::VPC::Id VPCRouteTableID: Description: ID of the existing VPC main route table (e.g., `rt-0343606e`). Type: String QSS3BucketName: AllowedPattern: '^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$' ConstraintDescription: The 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: Name of the S3 bucket for your copy of the Quick Start assets. Keep the default name unless you are customizing the template. Changing the name updates code references to point to a new Quick Start location. This name can include numbers, lowercase letters, uppercase letters, and hyphens, but do not start or end with a hyphen (-). See https://aws-quickstart.github.io/option1.html. Type: String QSS3BucketRegion: Default: 'us-east-1' Description: 'AWS Region where the Quick Start S3 bucket (QSS3BucketName) is hosted. Keep the default Region unless you are customizing the template. Changing this Region updates code references to point to a new Quick Start location. When using your own bucket, specify the Region. See https://aws-quickstart.github.io/option1.html.' Type: String QSS3KeyPrefix: AllowedPattern: '^[0-9a-zA-Z-/]*$' ConstraintDescription: The Quick Start S3 key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slashes (/). The prefix should end with a forward slash (/). Default: quickstart-cisco-meraki-vmx-cloudwan/ Description: S3 key prefix used to simulate a directory for your copy of the Quick Start assets. Keep the default prefix unless you're customizing the template. Changing this prefix updates code references to point to a new Quick Start location. This prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slashes (/). End with a forward slash. See https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html and https://aws-quickstart.github.io/option1.html. Type: String KeyPairName: Description: EC2 key pair name. ConstraintDescription: Must be the name of an existing EC2 key pair. vMX instances launch with this key pair. Type: "AWS::EC2::KeyPair::KeyName" LambdaRate: Description: How often the CloudWatch Events rule runs. The rule invokes AWS Lambda to update the VPC and transit gateway route tables. Default: rate(10 minutes) AllowedValues: - rate(1 minute) - rate(10 minutes) - rate(60 minutes) Type: String GlobalNetworkName: Description: AWS Cloud WAN global network name. Default: "meraki-gn" Type: String AmazonASNRange: Description: Autonomous System Number (ASN) for Cloud WAN network. Default: "65000-65500" Type: String MerakiEventBusName: Description: Name of CustomEventBus for EventBridge. Default: "MerakiEventBus" Type: String Conditions: UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart'] 1vMXCondition: !Or - !Equals - !Ref 'NumberOfvMXs' - '1' - !Condition 2vMXCondition 2vMXCondition: !Equals - !Ref 'NumberOfvMXs' - '2' Resources: VMX1Stack: Condition: 1vMXCondition Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}submodules/quickstart-cisco-meraki-sd-wan-vmx/templates/quickstart-cisco-meraki-sdwan-vmx-instance.yaml - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: InstanceType: Ref: InstanceType KeyPairName: Ref: KeyPairName SubnetID: Ref: AZ1PublicSubnetID vMXToken: Ref: vMX1Token vMXMerakiNetworkTag: Ref: vMX1MerakiNetworkTag VMX2Stack: Condition: 2vMXCondition Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}submodules/quickstart-cisco-meraki-sd-wan-vmx/templates/quickstart-cisco-meraki-sdwan-vmx-instance.yaml - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: InstanceType: Ref: InstanceType KeyPairName: Ref: KeyPairName SubnetID: Ref: AZ2PublicSubnetID vMXToken: Ref: vMX2Token vMXMerakiNetworkTag: Ref: vMX2MerakiNetworkTag DeleteStack: Type: AWS::CloudFormation::Stack DeletionPolicy: Retain UpdateReplacePolicy: Retain Properties: TemplateURL: !Sub - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/quickstart-cisco-meraki-sdwan-vmx-delete.template.yaml - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: MerakiEventBusName: Ref: MerakiEventBusName #Need to add either global network property or a tag to pass along to delete step function StepFunctionStack: Type: AWS::CloudFormation::Stack DependsOn: DeleteStack Properties: TemplateURL: !Sub - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/quickstart-cisco-meraki-sdwan-vmx-cw-stepfunction.template.yaml - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: QSS3BucketName: Ref: QSS3BucketName QSS3KeyPrefix: Ref: QSS3KeyPrefix QSS3BucketRegion: Ref: QSS3BucketRegion GlobalNetworkName: !Sub ['${GlobalNetworkName}-${id}', {id: !Select [2, !Split ['/', !Ref AWS::StackId]]}] MerakiEventBusName: Ref: MerakiEventBusName AvailabilityZone1SubnetID: Ref: AZ1PublicSubnetID AvailabilityZone2SubnetID: Ref: AZ2PublicSubnetID VPCID: Ref: VPCID AmazonASNRange: Ref: AmazonASNRange CustomResourceStack: Type: AWS::CloudFormation::Stack DependsOn: StepFunctionStack Properties: TemplateURL: !Sub - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/quickstart-cisco-meraki-sdwan-vmx-cw-vpc-attachment-custom-resource.template.yaml - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: AvailabilityZone1SubnetID: Ref: AZ1PublicSubnetID AvailabilityZone2SubnetID: Ref: AZ2PublicSubnetID VPCID: Ref: VPCID # AmazonASNRange: # Ref: AmazonASNRange MerakiEventBusName: Ref: MerakiEventBusName GlobalNetworkName: !Sub ['${GlobalNetworkName}-${id}', {id: !Select [2, !Split ['/', !Ref AWS::StackId]]}] BaseRegionName: Ref: AWS::Region MerakiLambdaStack: DependsOn: - StepFunctionStack - CustomResourceStack Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/quickstart-cisco-meraki-sdwan-vmx-cw-lambda.template.yaml - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: AvailabilityZone1SubnetID: Ref: AZ1PublicSubnetID AvailabilityZone2SubnetID: Ref: AZ2PublicSubnetID VPCID: Ref: VPCID QSS3BucketName: Ref: QSS3BucketName QSS3KeyPrefix: Ref: QSS3KeyPrefix QSS3BucketRegion: Ref: QSS3BucketRegion SDWANVPCRTID: Ref: VPCRouteTableID MerakiAPIKey: Ref: MerakiAPIKey MerakiOrgID: Ref: MerakiOrgID vMX1MerakiNetworkTag: Ref: vMX1MerakiNetworkTag vMX2MerakiNetworkTag: Ref: vMX2MerakiNetworkTag LambdaRate: Ref: LambdaRate MerakiEventBusName: Ref: MerakiEventBusName BaseRegionName: Ref: AWS::Region GlobalNetworkName: !Sub ['${GlobalNetworkName}-${id}', {id: !Select [2, !Split ['/', !Ref AWS::StackId]]}] Outputs: VPCID: Description: ID of the deployed SD-WAN VPC. Value: !Ref VPCID vMX1InstanceID: Description: First vMX instance ID. Value: Fn::GetAtt: - VMX1Stack - Outputs.vMXInstanceID vMX2InstanceID: Description: Second vMX instance ID. Value: Fn::GetAtt: - VMX2Stack - Outputs.vMXInstanceID MerakiEventBusName: Description: The Meraki event bus name. Value: !Ref MerakiEventBusName GlobalNetworkName: Description: The Meraki Cloud WAN global network name. Value: !Sub ['${GlobalNetworkName}-${id}', {id: !Select [2, !Split ['/', !Ref AWS::StackId]]}] BaseRegionName: Description: The base Region name for the Meraki Cloud WAN Quick Start. Value: !Ref AWS::Region Postdeployment: Description: See the deployment guide for postdeployment steps. Value: https://aws-quickstart.github.io/quickstart-cisco-meraki-vmx-cloudwan/