in SecurityGroups/config/code/index.py [0:0]
def describe_pipeline_managed_security_groups(sg_response):
sg_id = sg_response['SecurityGroups']
sg_id_list = []
vpc_id_list = []
for sg in sg_id:
if 'Tags' in sg.keys():
for tags in sg['Tags']:
if tags['Key'] == 'pipeline-managed':
sg_id_list.append(sg['GroupId'])
if sg['VpcId'] not in vpc_id_list:
vpc_id_list.append(sg['VpcId'])
else:
continue
return sg_id_list, vpc_id_list