{
    "Resources": {
        "$instanceName": {
            "Properties": {
                "SecurityGroups": [
                    {
                        "Ref": "ApacheSecurityGroup"
                    }
                ]
            }
        },
        "ApacheSecurityGroup": {
            "Type": "AWS::EC2::SecurityGroup",
            "Properties": {
                "SecurityGroupIngress": [
                    {
                        "ToPort": "80",
                        "IpProtocol": "tcp",
                        "FromPort": "80",
                        "CidrIp": "0.0.0.0/0"
                    },
                    {
                        "ToPort": "433",
                        "IpProtocol": "tcp",
                        "FromPort": "433",
                        "CidrIp": "0.0.0.0/0"
                    }
                ],
                "GroupDescription": "Enable access to HTTP and HTTPS protocols"
            }
        }
    }
}
