I simply want to create an inbound security rule in my Cloudformation template that looks like this:

Everything I try - several suggestions from here, in fact - all give me this result:

What am I missing? This is my current attempt:
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
CodePudding user response:
It should be:
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
