入站 ICMP Cloudformation 安全组规则问题

Inbound ICMP Cloudformation Security Group Rule Issue

我只想在我的 Cloudformation 模板中创建一个入站安全规则,如下所示:

我尝试的一切 - 实际上来自这里的一些建议 - 都给我这个结果:

我错过了什么?这是我目前的尝试:

PrivateSecurityGroupIngressA:
  Type: AWS::EC2::SecurityGroupIngress
  Properties:
    GroupId: !Ref PrivateSecurityGroup
    IpProtocol: icmp
    FromPort: 8
    ToPort: -1
    Description: Allow Inbound ICMP
    CidrIp: 0.0.0.0/0

应该是:

    PrivateSecurityGroupIngressA:
        Type: AWS::EC2::SecurityGroupIngress
        Properties:
            GroupId: !GetAtt PrivateSecurityGroup.GroupId
            IpProtocol: icmp
            FromPort: -1
            ToPort: -1
            Description: Allow Inbound ICMP
            CidrIp: 0.0.0.0/0