Reputation: 91
I am trying to create an RDS server running MySQL database and receiving the following error:
1 validation error detected: Value '[AWS:RDS::DBInstance]' at 'typeNameList' failed to satisfy constraint: Member must satisfy constraint: [Member must have length less than or equal to 204, Member must have length greater than or equal to 10, Member must satisfy regular expression pattern: [A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}(::MODULE){0,1}]
AWSTemplateFormatVersion: 2010-09-09
Parameters:
DBName:
Type: String
AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
MUser:
Type: String
AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
MPass:
Type: String
AllowedPattern: '[a-zA-Z0-9]*'
Description: "It shouldn't be less than 8 characters"
Resources:
MyDBInstance:
Type: AWS:RDS::DBInstance
Properties:
DBName: !Ref DBName
MasterUserPassword: !Ref MUser
MasterUserPassword: !Ref MPass
Engine: MySQL
DBInstanceClass: db.t2.micro
StorageType: gp2
PubliclyAccessible: True
AllocatedStorage: "20"
DBInstanceIdentifier: !Join ["-", [ "MyDBInstance", !Ref "AWS::Region" ]]
AvailabilityZone: !Select [1, !GetAZs ""]
Upvotes: 8
Views: 10307
Reputation: 4638
Missing a colon in AWS::RDS::DBInstance
Recommend CloudFormation Linter in VSCode to see errors inline while authoring templates along with autocompletion and documentation links:
Upvotes: 33