Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get ID of created security group #155

Open
hamsterksu opened this issue Apr 14, 2017 · 3 comments
Open

how to get ID of created security group #155

hamsterksu opened this issue Apr 14, 2017 · 3 comments

Comments

@hamsterksu
Copy link

Hi everybody,

i want to link my security groups with remote_group_id

 - direction: ingress
    ethertype: IPv4
    port_range_min: 1
    port_range_max: 65535
    protocol: tcp
    remote_group_id: { get_attribute: [origin_security_group, id ] }

but it does not work just throws internal error

i tried to use remote_group_node: origin_security_group but it does not work too.

So how to use any group in security group rule?

@idanmo
Copy link
Contributor

idanmo commented Apr 16, 2017

Hi,

Every OpenStack node template implementation exposes an "external_id" run-time property containing the UUID assigned by the OpenStack environment.

By looking at the code, it doesn't seem like the "get_attribute" function gets resolved when used in properties.
If you're going to try this, please update whether it works or not so it can be prioritized for future versions of the plugin.

Thanks!

@hamsterksu
Copy link
Author

hi @idanmo

Thank you for feedback.
get_attribute works in output and it can resolve SG id - { get_attribute: [dataplane_security_group, external_id ] }

but it does not work for property scope

@idanmo
Copy link
Contributor

idanmo commented Apr 23, 2017

Hi,

Yes, unfortunately it doesn't work.

Two workarounds (not ideal):

  1. Create the first security group using a different blueprint and inject its Id to the 2nd blueprint.
  2. Use CIDR based security group rules.

Since get_attribute can be used for operation inputs, the create security group operation should probably be enhanced and allow passing rules as operation inputs. Then, it should be possible to do this kind of reference between the nodes.

I'm not sure when we will be able to solve this, but we are accepting pull requests :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants