我尝试使用以下作为资源的模板,在本例中为自动缩放组。
"Outputs": {
"TemplateGroupSettings": {
"Properties": {
"AvailabilityZones" : { "Fn::GetAZs" : "" },
"LaunchConfigurationName": { "Ref": "LaunchConfig" },
"MaxSize": "3",
"MinSize": "1",
"Tags": [
{ "Key": "swarm:master", "Value": {"Ref": "JenkinsURL"}, "PropagateAtLaunch": "true" },
{ "Key": "swarm:username", "Value": {"Ref": "JenkinsUsername"}, "PropagateAtLaunch": "true" },
{ "Key": "swarm:executors", "Value": {"Ref": "JenkinsExecutors"}, "PropagateAtLaunch": "true" },
{ "Key": "ci:username", "Value": {"Ref": "CIUsername"}, "PropagateAtLaunch": "true" }]
},
"Type": "AWS::AutoScaling::AutoScalingGroup",
"UpdatePolicy": {
"AutoScalingRollingUpdate": {
"MaxBatchSize": "1",
"MinInstancesInService": "1",
"WaitOnResourceSignals": "true",
"PauseTime": "PT1M5S"
}
}
}
},
但是这个选项不起作用
"Resources": {
....
"TemplateGroup": { "Ref": "TemplateGroupSettings" },
还有其他方法吗?因为这个不起作用
$ euform-create-stack --region eucalyptus -p InstanceType=t1.micro -p EnvironmentType=production --template-file ~cftemplate.json --capabilities CAPABILITY_IAM teststack
euform-create-stack: error (ValidationError): Type is a required property of Resource