ejjarder's profile - activity

2017-04-21 16:00:05 -0600 asked a question Get one ip address from Autoscaling Group

Hi everyone,

Is there a way to grab the one IP address from an autoscaling group?

I tried to do this...

 { get_attr: [ asg, outputs_list, first_address, 0 ] }

But what happened was that it returned the first character for each ip address in my ASG... Basically a list of '1's

Currently, my workaround is this...

str_split:
    - ','
    - list_join:
        - ','
        - { get_attr: [ asg, outputs_list, first_address ] }
    - 0

Is there an easier way to do this? Like just grabbing the first element from the attribute?

Thanks,
Jar