Ask Your Question
0

Problem with Security Groups JSON - Is this a bug?

asked 2015-05-08 08:42:15 -0500

MrTurvey gravatar image

Hiya, So I have this code. The two security groups App1 and Shared-Zones1 initialized fine but then when it comes to app2 trying to spawn, it will throw an error saying that Shared-Zones1 doesn't exist. I can see that it does and its initialized? I've trolled through Google and I can't find anything I need, the documentation doesn't really help me out either. Help please it is driving me mad!

{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Description": "HEAT that creates a subnetwork, 2 instances and a router",
  "Resources": {

    "Shared-Zones1": {
      "Type": "OS::Neutron::SecurityGroup",
      "Properties": {
        "description": "Security template",
        "name": "Shared-Zones-Default-Security",
        "rules": [  
        {"remote_ip_prefix":"0.0.0.0/0", 
        "direction": "ingress",   
        "ethertype": "IPv4",  
        "protocol": "icmp"},

        {"direction": "ingress",
        "remote_mode": "remote_group_id", 
        "ethertype": "IPv4"},

        {"remote_ip_prefix":"0.0.0.0/0", 
        "direction": "ingress",
        "port_range_min":"22",
        "port_range_max":"22",   
        "ethertype": "IPv4",  
        "protocol": "tcp"}        
        ]
        }},

       "App1": {
      "Type": "OS::Neutron::SecurityGroup",
      "Properties": {
        "description": "Security template",
        "name": "shared-zones-App1-security",
        "rules": [
        {"direction": "ingress",
        "remote_mode": "remote_group_id", 
        "ethertype": "IPv4", 
        "protocol": "icmp"}
        ]
        }},

        "App2": {
      "Type": "OS::Neutron::SecurityGroup",
      "Properties": {
        "description": "Security template",
        "name": "shared-zones-App2-security",
        "rules": [
        {"direction": "ingress",
        "remote_mode": "remote_group_id", 
        "ethertype": "IPv4", 
        "protocol": "icmp"},

        {"remote_group_id": "Shared-Zones1",
        "direction": "ingress",
        "remote_mode": "remote_group_id", 
        "ethertype": "IPv4", 
        "protocol": "icmp"},

         {"remote_group_id": "Shared-Zones1",
        "direction": "ingress",
        "remote_mode": "remote_group_id", 
        "port_range_min":"22",
        "port_range_max":"22",
        "ethertype": "IPv4", 
        "protocol": "tcp"}
        ]
  }}
  }
}
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-05-09 17:12:24 -0500

I'm not an Heat expert... is it possible that you should reference the Security group name (not the Heat resource node)?

 "App2": {
      "Type": "OS::Neutron::SecurityGroup",
      "Properties": {
        "description": "Security template",
        "name": "shared-zones-App2-security",
        "rules": [
        {"direction": "ingress",
        "remote_mode": "remote_group_id", 
        "ethertype": "IPv4", 
        "protocol": "icmp"},

        {"remote_group_id": "Shared-Zones-Default-Security",
        "direction": "ingress",
        "remote_mode": "remote_group_id", 
        "ethertype": "IPv4", 
        "protocol": "icmp"},

         {"remote_group_id": "Shared-Zones-Default-Security",
        "direction": "ingress",
        "remote_mode": "remote_group_id", 
        "port_range_min":"22",
        "port_range_max":"22",
        "ethertype": "IPv4", 
        "protocol": "tcp"}
        ]
  }}
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-05-08 08:42:15 -0500

Seen: 239 times

Last updated: May 09 '15