title: CloudFormation error: "only 1 subschema matches out of 2"
body: <p>I want to update the stack, get this error message:</p>
  <blockquote>
  <p>Properties validation failed for resource RDSDBinstance with message:
  #: #: only 1 subschema matches out of 2 #/DBSubnetGroupName: failed validation constraint for keyword [pattern]</p>
  </blockquote>
  <p>I'm very confused with <code>#: #</code> part of the message, google shows there's usually a kind of path pointing to the place with error. No errors in CloudTrail. More confusing, I have 5 environments already which already got this update successfully.</p>
  <p>The new code:</p>
  <pre><code>  subnetDatabase0:   # similar for the second subnet, just 
                       # another AZ and third octet of the CidrBlock
      Type: AWS::EC2::Subnet
      Properties:
        VpcId: !Ref VPC
        CidrBlock: !Sub &quot;${Cidr}.14.0/24&quot;
        AvailabilityZone: !Select [ &quot;0&quot;, !GetAZs &quot;&quot; ]
  
    RDSSubnetGroup:
      Type: AWS::RDS::DBSubnetGroup
      Properties:
        DBSubnetGroupName: !Sub &quot;${ProjName}-db-subnetgroup&quot;
        DBSubnetGroupDescription: !Sub &quot;${ProjName} DB subnet group&quot;
        SubnetIds:
          - !Ref subnetDatabase0
          - !Ref subnetDatabase1
  
    sgDBInternalAccess:
      Type: AWS::EC2::SecurityGroup
      Properties:
        GroupName: !Sub &quot;${ProjName}-db-internal&quot;
        GroupDescription: Enable internal access to DB
        VpcId: !Ref VPC
        SecurityGroupIngress:
        - IpProtocol: tcp
          FromPort: 5432
          ToPort: 5432
          CidrIp: !Sub &quot;${Cidr}.4.0/24&quot;
  
    RDSDBinstance:
      Type: AWS::RDS::DBInstance
      DependsOn:
        - DbUser
        - DbPwd
      Properties:
        DBInstanceIdentifier: !Ref SanitizedDomain
        DBSubnetGroupName: !Ref RDSSubnetGroup
        DBName: classerium_backend
        DBInstanceClass: !Ref PgInstType
        AllocatedStorage: &quot;20&quot;
        Engine: postgres
        EngineVersion: !Ref PgVersion
        MasterUsername: !GetAtt DbUser.response
        MasterUserPassword: !GetAtt DbPwd.passw
        StorageType: gp2
        BackupRetentionPeriod: 30
        CopyTagsToSnapshot: True
        DeleteAutomatedBackups: False
        VPCSecurityGroups:
          - !Ref sgDBInternalAccess
  </code></pre>
  <p>The only difference with the old code is this part was added</p>
  <pre><code>  StorageType: gp2
    BackupRetentionPeriod: 30
    CopyTagsToSnapshot: True
    DeleteAutomatedBackups: False
  </code></pre>
  <p>What am I doing wrong?</p>