EC2 instance does not belong to a virtual private cloud (VPC). Ensure Amazon Elastic Compute Cloud (Amazon EC2) instance belong to a virtual private cloud (VPC).
1Resources:
2 ExampleEC2:
3 Type: AWS::EC2::Instance
4 Properties:
5 # Noncompliant: This EC2 instance does not belong to a virtual private cloud (VPC).
6 ImageId: !Ref LatestAmiId
7 InstanceType: !Ref pInstanceType
8 IamInstanceProfile: !Ref rInstanceProfile
1Resources:
2 ExampleEC2:
3 Type: AWS::EC2::Instance
4 Properties:
5 ImageId: !Ref LatestAmiId
6 InstanceType: !Ref pInstanceType
7 IamInstanceProfile: !Ref rInstanceProfile
8 # Compliant: This EC2 instance belongs to a virtual private cloud (VPC).
9 SubnetId: !Ref pSubnetId