考虑云形成模板的这一部分:
# VPC
myVPC:
Type: "AWS::EC2::VPC"
Properties:
CidrBlock: 10.99.99.0/24
# Security group
http_sec_group:
Type: "AWS::EC2::SecurityGroup"
Properties:
GroupName: http_in
GroupDescription: "Allow http traffic inbound"
VpcId: !Ref myVPC
SecurityGroupIngress:
- ToPort: 80
IpProtocol: tcp
验证它会返回以下错误:
调用ValidateTemplate操作时发生错误(ValidationError):无效的模板资源属性'myVPC'
语法看起来正确,但为什么引用会返回错误?