最优架构大致的代码

最优架构大致的代码

{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Description": "Reference Architecture to host WordPress on AWS - Creates New VPC",
  "Metadata": {
        "Authors": {
            "Description": "Darryl Osborne (darrylo@amazon.com)"
        },
        "License": {
            "Description": "Copyright 2018 Amazon.com, Inc. and its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0"
        },
        "AWS::CloudFormation::Interface": {
            "ParameterGroups": [
                {
                    "Label": {
                        "default": "Cache Parameters"
                    },
                    "Parameters": [
                        "ElastiCacheNodeType",
                        "ElastiCacheSecurityGroup"
                    ]
                },
				{
                    "Label": {
                        "default": "Amazon RDS MySQL Database Network Configuration"
                    },
                    "Parameters": [
                        "DBVPC",

                        "DBSubnets",
                        "DBSubnetGroupName",
                        "DBInputCIDR"
                    ]
                },
                {
                    "Label": {
                        "default": "Amazon RDS MySQL Database Configuration"
                    },
                    "Parameters": [
                        "DBName",
                        "DBEngine",
                        "DBEngineVersion",
                        "DBInstanceClass",
                        "DBAllocatedStorage",
                        "DBBackupRetentionPeriod"
                    ]
                },
                {
                    "Label": {
                        "default": "Amazon RDS MySQL Database Access"
                    },
                    "Parameters": [
                        "DBMasterUsername",
                        "DBMasterUserPassword",
                        "DBPortNumber"
                    ]
                },
                {
                    "Label": {
                        "default": "Amazon RDS MySQL Database High Availability"
                    },
                    "Parameters": [
                        "MultiAZ"
                    ]
                },
                {
                    "Label": {
                        "default": "Amazon VPC Parameters"
                    },
                    "Parameters": [


                        "EC2KeyName",
                        "BastionInstanceType",
                        "NumberOfSubnets",
                        "NumberOfAZs",
                        "AvailabilityZones",
                        "VpcCidr",
                        "VpcTenancy",
                        "PublicSubnet0Cidr",
                        "PublicSubnet1Cidr",
                        "PublicSubnet2Cidr",
                        "PublicSubnet3Cidr",
                        "PublicSubnet4Cidr",
                        "PublicSubnet5Cidr",
                        "WebSubnet0Cidr",
                        "WebSubnet1Cidr",
                        "WebSubnet2Cidr",
                        "WebSubnet3Cidr",
                        "WebSubnet4Cidr",
                        "WebSubnet5Cidr",
                        "DataSubnet0Cidr",
                        "DataSubnet1Cidr",
                        "DataSubnet2Cidr",
                        "DataSubnet3Cidr",
                        "DataSubnet4Cidr",
                        "DataSubnet5Cidr"
                    ]
                }
            ],
            "ParameterLabels": {
               "ElastiCacheNodeType": {
                    "default": "Cache Cluster Node Type"
                },
				
               "BastionInstanceType": {
                    "default": "Instance Type"
                },
                "EC2KeyName": {
                    "default": "Existing Key Pair"
                },
                "NumberOfSubnets": {
                    "default": "Number of subnets"
                },
                "AvailabilityZones": {
                    "default": "Availability Zones"
                },
                "NumberOfAZs": {
                    "default": "Number of Availability Zones"
                },
                "VpcCidr": {
                    "default": "VpcCidr"
                },
                "VpcTenancy": {
                    "default": "VpcTenancy"
                },
                "PublicSubnet0Cidr": {
                    "default": "Public Subnet 0"
                },
                "PublicSubnet1Cidr": {
                    "default": "Public Subnet 1"
                },
                "PublicSubnet2Cidr": {
                    "default": "Public Subnet 2"
                },
                "PublicSubnet3Cidr": {
                    "default": "Public Subnet 3"
                },
                "PublicSubnet4Cidr": {
                    "default": "Public Subnet 4"
                },
                "PublicSubnet5Cidr": {
                    "default": "Public Subnet 5"
                },
                "WebSubnet0Cidr": {
                    "default": "Web Subnet 0"
                },
                "WebSubnet1Cidr": {
                    "default": "Web Subnet 1"
                },
                "WebSubnet2Cidr": {
                    "default": "Web Subnet 2"
                },
                "WebSubnet3Cidr": {
                    "default": "Web Subnet 3"
                },
                "WebSubnet4Cidr": {
                    "default": "Web Subnet 4"
                },
                "WebSubnet5Cidr": {
                    "default": "Web Subnet 5"
                },
                "DataSubnet0Cidr": {
                    "default": "Data Subnet 0"
                },
                "DataSubnet1Cidr": {
                    "default": "Data Subnet 1"
                },
                "DataSubnet2Cidr": {
                    "default": "Data Subnet 2"
                },
                "DataSubnet3Cidr": {
                    "default": "Data Subnet 3"
                },
                "DataSubnet4Cidr": {
                    "default": "Data Subnet 4"
                },
                "DataSubnet5Cidr": {
                    "default": "Data Subnet 5"
                }
            }
        }
	},
  "Parameters": {
    "ElastiCacheNodeType": {
            "AllowedValues": [
                "cache.t2.micro",
                "cache.t2.small",
                "cache.t2.medium",
                "cache.m3.medium",
                "cache.m3.large",
                "cache.m3.xlarge",
                "cache.m3.2xlarge",
                "cache.m4.large",
                "cache.m4.xlarge",
                "cache.m4.2xlarge",
                "cache.m4.4xlarge",
                "cache.m4.10xlarge",
                "cache.r3.large",
                "cache.r3.xlarge",
                "cache.r3.2xlarge",
                "cache.r3.4xlarge",
                "cache.r3.8xlarge",
                "cache.r4.large",
                "cache.r4.xlarge",
                "cache.r4.2xlarge",
                "cache.r4.4xlarge",
                "cache.r4.8xlarge",
                "cache.r4.16xlarge"
            ],
            "ConstraintDescription": "Must be a valid Amazon ElastiCache node type.",
            "Default": "cache.t2.medium",
            "Description": "The Amazon ElastiCache cluster node type.",
            "Type": "String"
        },
		
    "DBName": {
            "Default": "mysqldb",
            "Description": "The name of the database to create when the DB instance is created. If this parameter is not specified, the default \"mysql\" database is created in the DB instance.",
            "Type": "String",
            "MinLength": "5",
            "MaxLength": "63",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },

    "DBSubnetGroupName": {
            "Description": "The name of the subnet group to be created for RDS MySQL",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "256",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a character"
        },
    "DBPortNumber": {
            "Description": "The port number on which the database accepts connections.",
            "Type": "Number",
            "Default": "3306",
            "MinValue": "1150",
            "MaxValue": "65535",
            "ConstraintDescription": "Valid values range from 1150-65535"
        },
    "DBMasterUsername": {
            "Description": "The database admin account username",
            "Type": "String",
            "MinLength": "5",
            "MaxLength": "16",
            "AllowedPattern": "^[\\w]+$",
            "ConstraintDescription": "Minimum 5 characters must begin with a letter and contain only alphanumeric and underscore characters."
        },
    "DBMasterUserPassword": {
            "Description": "The password for the master user. The password can include any printable ASCII character except \"/\", \"\"\", or \"@\".",
            "NoEcho": true,
            "Type": "String",
            "MinLength": "6",
            "MaxLength": "41",
            "ConstraintDescription": "Minimum 12 characters, at least one of each of the following: uppercase, lowercase, number, and symbol character such as !@#$%^&*()<>[]{}|_+-=."
        },
    "DBBackupRetentionPeriod": {
            "Description": "The number of days for which automated backups are retained. Allowed values 0-10. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.",
            "Default": "1",
            "Type": "Number",
            "MinValue": "0",
            "MaxValue": "10",
            "ConstraintDescription": "must be a number between 0 and 10."
        },
    "DBAllocatedStorage": {
            "Default": "20",
            "Description": "General Purpose (SSD) storage (gp2). Must be an integer from 20 to 16384.",
            "Type": "Number",
            "MinValue": "20",
            "MaxValue": "16384",
            "ConstraintDescription": "Must be an integer from 20 to 16384."
        },
    "DBEngineVersion": {
            "Description": "The database engine version",
            "Type": "String",
            "Default": "8.0.15",
            "AllowedValues": [
                "8.0.15",
                "8.0.13",
                "8.0.11",
                "5.7.25",
                "5.6.41",
                "5.5.61"
            ]
        },
    "DBInstanceClass": {
            "Description": "The database instance type",
            "Type": "String",
            "Default": "db.t2.small",
            "AllowedValues": [
                "db.t1.micro",
                "db.m1.small",
                "db.m1.medium",
                "db.m1.large",
                "db.m1.xlarge",
                "db.m2.xlarge",
                "db.m2.2xlarge",
                "db.m2.4xlarge",
                "db.m3.medium",
                "db.m3.large",
                "db.m3.xlarge",
                "db.m3.2xlarge",
                "db.m4.large",
                "db.m4.xlarge",
                "db.m4.2xlarge",
                "db.m4.4xlarge",
                "db.m4.10xlarge",
                "db.m5.24xlarge",
                "db.m5.12xlarge",
                "db.m5.4xlarge",
                "db.m5.2xlarge",
                "db.m5.xlarge",
                "db.m5.large",
                "db.r3.large",
                "db.r3.xlarge",
                "db.r3.2xlarge",
                "db.r3.4xlarge",
                "db.r3.8xlarge",
                "db.m2.xlarge",
                "db.m2.2xlarge",
                "db.m2.4xlarge",
                "db.cr1.8xlarge",
                "db.t2.micro",
                "db.t2.small",
                "db.t2.medium",
                "db.t2.large"
            ],
            "ConstraintDescription": "must select a valid database instance type."
        },
    "MultiAZ": {
            "Description": "Multi-AZ master database",
            "Type": "String",
            "Default": "false",
            "AllowedValues": [
                "true",
                "false"
            ],
            "ConstraintDescription": "must be true or false."
        },

    "BastionInstanceType": {
            "AllowedValues": [
                "t2.nano",
                "t2.micro",
                "t2.small",
                "t2.medium",
                "t2.large",
                "t2.xlarge",
                "t2.2xlarge",
                "m3.medium",
                "m3.large",
                "m3.xlarge",
                "m3.2xlarge",
                "m4.large",
                "m4.xlarge",
                "m4.2xlarge",
                "m4.4xlarge",
                "m4.10xlarge",
                "m4.16xlarge",
                "m5.large",
                "m5.xlarge",
                "m5.2xlarge",
                "m5.4xlarge",
                "m5.12xlarge",
                "m5.24xlarge",
                "c3.large",
                "c3.xlarge",
                "c3.2xlarge",
                "c3.4xlarge",
                "c3.8xlarge",
                "c4.large",
                "c4.xlarge",
                "c4.2xlarge",
                "c4.4xlarge",
                "c4.8xlarge",
                "c5.large",
                "c5.xlarge",
                "c5.2xlarge",
                "c5.4xlarge",
                "c5.9xlarge",
                "c5.18xlarge",
                "r3.large",
                "r3.xlarge",
                "r3.2xlarge",
                "r3.4xlarge",
                "r3.8xlarge",
                "r4.large",
                "r4.xlarge",
                "r4.2xlarge",
                "r4.4xlarge",
                "r4.8xlarge",
                "r4.16xlarge",
                "x1.16xlarge",
                "x1.32xlarge",
                "x1e.xlarge",
                "x1e.2xlarge",
                "x1e.4xlarge",
                "x1e.8xlarge",
                "x1e.16xlarge",
                "x1e.32xlarge",
                "d2.xlarge",
                "d2.2xlarge",
                "d2.4xlarge",
                "d2.8xlarge",
                "h1.2xlarge",
                "h1.4xlarge",
                "h1.8xlarge",
                "h1.16xlarge",
                "i2.xlarge",
                "i2.2xlarge",
                "i2.4xlarge",
                "i2.8xlarge",
                "i3.large",
                "i3.xlarge",
                "i3.2xlarge",
                "i3.4xlarge",
                "i3.8xlarge",
                "i3.16xlarge",
                "f1.2xlarge",
                "f1.16xlarge",
                "g2.2xlarge",
                "g2.8xlarge",
                "g3.4xlarge",
                "g3.8xlarge",
                "g3.16xlarge",
                "p2.xlarge",
                "p2.8xlarge",
                "p2.16xlarge",
                "p3.2xlarge",
                "p3.8xlarge",
                "p3.16xlarge"
            ],
            "ConstraintDescription": "Must be a valid Amazon EC2 instance type.",
            "Default": "t2.nano",
            "Description": "Bastion EC2 instance type.",
            "Type": "String"
        },
    "EC2KeyName": {
            "Description": "Name of an EC2 KeyPair. Your bastion instances will launch with this KeyPair.",
            "Type": "AWS::EC2::KeyPair::KeyName"
        },
    "NumberOfSubnets": {
            "AllowedValues": [
                2,
                3,
                4,
                5,
                6
            ],
            "Default": 3,
            "Description": "Number of subnets. This must match your selections in the list of subnets below.",
            "Type": "String"
        },
    "SshAccessCidr": {
      "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]))$",
      "Description": "The CIDR IP range that is permitted to SSH to bastion instance. Note - a value of 0.0.0.0/0 will allow access from ANY IP address.",
      "Type": "String",
      "Default": "0.0.0.0/0"
    },
    "AvailabilityZones": {
      "Description": "List of Availability Zones to use for the subnets in the VPC. Note: The logical order is preserved.",
      "Type": "List<AWS::EC2::AvailabilityZone::Name>"
    },
    "NumberOfAZs": {
      "AllowedValues": [
        2,
        3,
        4,
        5,
        6
      ],
      "Default": 3,
      "Description": "Number of Availability Zones to use in the VPC. This must match your selections in the list of Availability Zones parameter.",
      "Type": "Number"
    },
    "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.0.0/16",
      "Description": "CIDR block for the VPC",
      "Type": "String"
    },
    "VpcTenancy": {
      "AllowedValues": [
        "default",
        "dedicated"
      ],
      "Default": "default",
      "Description": "The allowed tenancy of instances launched into the VPC",
      "Type": "String"
    },
    "DataSubnet0Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.1.0/24",
      "Description": "CIDR block for data subnet 0 located in Availability Zone 0",
      "Type": "String"
    },
    "DataSubnet1Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.2.0/24",
      "Description": "CIDR block for data subnet 1 located in Availability Zone 1",
      "Type": "String"
    },
    "DataSubnet2Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.3.0/24",
      "Description": "CIDR block for data subnet 2 located in Availability Zone 2",
      "Type": "String"
    },
    "DataSubnet3Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.4.0/24",
      "Description": "CIDR block for data subnet 3 located in Availability Zone 3",
      "Type": "String"
    },
    "DataSubnet4Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.5.0/24",
      "Description": "CIDR block for data subnet 4 located in Availability Zone 4",
      "Type": "String"
    },
    "DataSubnet5Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.6.0/24",
      "Description": "CIDR block for data subnet 5 located in Availability Zone 5",
      "Type": "String"
    },
    "PublicSubnet0Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.7.0/24",
      "Description": "CIDR block for Public subnet 0 located in Availability Zone 0",
      "Type": "String"
    },
    "PublicSubnet1Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.8.0/24",
      "Description": "CIDR block for Public subnet 1 located in Availability Zone 1",
      "Type": "String"
    },
    "PublicSubnet2Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.9.0/24",
      "Description": "CIDR block for Public subnet 2 located in Availability Zone 2",
      "Type": "String"
    },
    "PublicSubnet3Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.10.0/24",
      "Description": "CIDR block for Public subnet 3 located in Availability Zone 3",
      "Type": "String"
    },
    "PublicSubnet4Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.11.0/24",
      "Description": "CIDR block for Public subnet 4 located in Availability Zone 4",
      "Type": "String"
    },
    "PublicSubnet5Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.12.0/24",
      "Description": "CIDR block for Public subnet 5 located in Availability Zone 5",
      "Type": "String"
    },
    "WebSubnet0Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.13.0/24",
      "Description": "CIDR block for Web subnet 0 located in Availability Zone 0",
      "Type": "String"
    },
    "WebSubnet1Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.14.0/24",
      "Description": "CIDR block for Web subnet 1 located in Availability Zone 1",
      "Type": "String"
    },
    "WebSubnet2Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.15.0/24",
      "Description": "CIDR block for Web subnet 2 located in Availability Zone 2",
      "Type": "String"
    },
    "WebSubnet3Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.16.0/24",
      "Description": "CIDR block for Web subnet 3 located in Availability Zone 3",
      "Type": "String"
    },
    "WebSubnet4Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.17.0/24",
      "Description": "CIDR block for Web subnet 4 located in Availability Zone 4",
      "Type": "String"
    },
    "WebSubnet5Cidr": {
      "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])(\\/(1[6-9]|2[0-8]))$",
      "ConstraintDescription": "CIDR block parameter must be in the form x.x.x.x/16-28",
      "Default": "10.0.18.0/24",
      "Description": "CIDR block for Web subnet 5 located in Availability Zone 5",
      "Type": "String"
    }
  },
  "Conditions": {

      "Subnet0": {
            "Fn::Or": [
                {
                    "Condition": "NumberOfSubnets1"
                },
                {
                    "Condition": "NumberOfSubnets2"
                },
                {
                    "Condition": "NumberOfSubnets3"
                },
                {
                    "Condition": "NumberOfSubnets4"
                },
                {
                    "Condition": "NumberOfSubnets5"
                },
                {
                    "Condition": "NumberOfSubnets6"
                }
            ]
        },
      "Subnet1": {
            "Fn::Or": [
                {
                    "Condition": "NumberOfSubnets2"
                },
                {
                    "Condition": "NumberOfSubnets3"
                },
                {
                    "Condition": "NumberOfSubnets4"
                },
                {
                    "Condition": "NumberOfSubnets5"
                },
                {
                    "Condition": "NumberOfSubnets6"
                }
            ]
        },
      "Subnet2": {
            "Fn::Or": [
                {
                    "Condition": "NumberOfSubnets3"
                },
                {
                    "Condition": "NumberOfSubnets4"
      
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值