我正在尝试根据环境创建ACL,并且具有以下条件。
Global:
Env: stage
Region: us-west -1
Conditions:
IsStage: Fn::Equals [!Ref "Env", "stage"]
Resources:
publicIngressVpc:
Type: AWS::EC2::NetworkAclEntry
Condition: IsStage
Properties:
NetworkAclId:
Fn::ImportValue:
!Sub ${VpcStack}-publicNetworkAclId
RuleNumber: 150
Protocol: -1 # tcp
RuleAction: allow
CidrBlock: Some VPC
PortRange:
From: 1024
To: 65535
我遇到以下错误:
Template format error: Conditions can only be boolean operations on parameters and other conditions
答案 0 :(得分:0)
尝试以下方法:
Conditions:
IsStage:
!Equals [ !Ref Env, 'stage' ]