سؤال

I can't find any examples on creating a SQL Server RDS instance in CloudFormation, so I took an educated guess using an example for MySQL. Here's what I came up with:

{
    "AWSTemplateFormatVersion" : "2010-09-09",

    "Resources" : {
        "DBInstance" : {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "DBInstanceIdentifier"  : "test-db",
                "Engine"                : "sqlserver-ex",
                "Port"                  : "1433",
                "DBInstanceClass"       : "db.t1.micro",
                "AllocatedStorage"      : "30",
                "MasterUsername"        : "sa",
                "MasterUserPassword"    : "password"
            }
        }
    }
}

Unfortunately this doesn't work (CREATE_FAILED). Can anyone tell me why?

هل كانت مفيدة؟

المحلول

In addition to Peter H's response... DBInstanceIdentifier is not a supported property. I would consult the cloudformation docs for which properties are and are not supported as well as the required properties. http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html

Also... CloudFormation will tell you the reason it fails in the "Events" tab. One thing CloudFormation is really good at is telling you exactly why it failed.

نصائح أخرى

You are missing EngineVersion - "EngineVersion" : "11.00.2100.60.v1",

Also - you'll need DBSecurityGRoups to be added.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top