0

私は雲の情報を使ってecsのコンテナを作成し、この新しいコンテナをroute53のhostzoneに追加しています。 しかし、ときに私は - 私はここでHostedZoneタグに問題HoztedZoneの曇りのエラー

ここでエラー

A client error (ValidationError) occurred when calling the CreateStack operation: Invalid template parameter property 'Properties' 

HostedZoneResourcesセクション内にある必要があり、JSON

"Parameters" : { 

"InstanceType" : { 
    "Description" : "Container Instance type", 
    "Type" : "String", 
    "Default" : "t2.medium", 
    "AllowedValues" : [ "t2.micro", "t2.small", "t2.medium", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge" ], 
    "ConstraintDescription" : "must be a valid EC2 instance type." 
}, 

"HostedZone" : { 
    "Type": "AWS::Route53::HostedZone", 
    "Properties": { 
    "HostedZoneConfig": { 
     "Comment": "My hosted zone for example.com" 
    }, 
    "Name": "***.couchbase.com", 
    "VPCs": [ 
     { 
     "VPCId": "*********", 
     "VPCRegion": "eu-west-1" 
     } 
    ], 
    "HostedZoneTags": [ 
     { 
     "Key": "Name", 
     "Value": "Couchbase DNS" 
     } 
    ] 
    } 
    } 
    }, 
     "Resources" : { 
"ContainerInstance" : { 
    "Type": "AWS::EC2::Instance", 
    "Properties": { 
    "Tags": [{ 
     "Key" : "Name", 
     "Value" : "Couchbase-1" 
     }, 
     { 
     "Key" : "Type", 
     "Value" : "ECS-Couchbase" 
     }], 
    "IamInstanceProfile" : { "Ref" : "ECSIamInstanceProfile" }, 
    "ImageId" : { "Fn::FindInMap" : [ "AWSRegionArch2AMI", { "Ref" : "AWS::Region" }, 
     { "Fn::FindInMap" : [ "AWSInstanceType2Arch", { "Ref" : "InstanceType" }, "Arch" ] } ] }, 
    "InstanceType" : { "Ref" : "InstanceType" }, 
    "SecurityGroups" : [ "ssh","default", "couchbase" ], 
    "KeyName"  : { "Ref" : "KeyName" }, 
    "UserData"  : { "Fn::Base64" : { "Fn::Join" : ["", [ 
     "#!/bin/bash -xe\n", 
     "echo ECS_CLUSTER=", { "Ref" : "ClusterName" }, 
     " >> /etc/ecs/ecs.config\n" 
    ]]}} 
    } 
}, 

"CouchbaseDNSRecord" : { 
    "Type" : "AWS::Route53::RecordSet", 
    "Properties" : { 
    "HostedZoneName" : { 
     "Fn::Join" : [ "", [ 
     { "Ref" : "HostedZone" }, "." 
     ] ] 
    }, 
    "Comment" : "DNS name for my instance.", 
    "Name" : { 
     "Fn::Join" : [ "", [ 
     {"Ref" : "ContainerInstance"}, ".", 
     {"Ref" : "AWS::Region"}, ".", 
     {"Ref" : "HostedZone"} ,"." 
     ] ] 
    }, 
    "Type" : "A", 
    "TTL" : "900", 
    "ResourceRecords" : [ 
     { "Fn::GetAtt" : [ "ContainerInstance", "PublicIp" ] } 
    ] 
    } 
}, 

答えて

3

を持つこのスクリプトを実行します。

"Parameters" : { 

    "InstanceType" : { 
    ... 
    } 

}, 

"Resources" : { 

    "HostedZone" : { 
    ... 
    }, 

    "ContainerInstance" : { 
    ... 
    }, 

    ... 
} 
関連する問題