title: How to add multiple security groups and group names in cloudformation using template?
body: <pre><code> &quot;dbxSG&quot;: 
      {
        &quot;Type&quot;: &quot;AWS::EC2::SecurityGroup&quot;,
        &quot;Properties&quot;: 
        {
          &quot;GroupDescription&quot;: &quot;Enable dbX Access&quot;,
          &quot;SecurityGroupIngress&quot;: [
            {
              &quot;IpProtocol&quot;: &quot;tcp&quot;,
              &quot;FromPort&quot;: &quot;22&quot;,
              &quot;ToPort&quot;: &quot;22&quot;,
              &quot;CidrIp&quot;: &quot;0.0.0.0/0&quot;
            }
          ]
        }
      },
      &quot;dbxSGIngress&quot; : 
      {
        &quot;Type&quot;: &quot;AWS::EC2::SecurityGroupIngress&quot;,
        &quot;Properties&quot;: 
        {
          &quot;GroupName&quot;: { &quot;Ref&quot;: &quot;dbxSG&quot; },
          &quot;IpProtocol&quot;: &quot;tcp&quot;,
          &quot;FromPort&quot;: &quot;0&quot;,
          &quot;ToPort&quot;: &quot;65535&quot;,
          &quot;SourceSecurityGroupName&quot;: { &quot;Ref&quot;: &quot;dbxSG&quot; }
        }
      },
  </code></pre>
  <p>How do I add multiple security group names in above json file? &quot;dbxSG&quot; name is referring in many times. I want to add one more security group with a new name. How do I add it?</p>