File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -36,20 +36,22 @@ export default ({
3636 data : { [ property : string ] : RawAwsSubnet [ ] }
3737 } = data . find ( ( { name } ) => name === services . subnet )
3838 if ( subnets ?. data ?. [ region ] ) {
39- const subnet : RawAwsSubnet = subnets . data [ region ] . find (
39+ const dataAtRegion : RawAwsSubnet [ ] = subnets . data [ region ] . filter (
4040 ( { SubnetId } : RawAwsSubnet ) =>
4141 ! isEmpty ( subnetIds ) &&
4242 subnetIds . filter ( str =>
4343 str . toLowerCase ( ) . includes ( SubnetId . toLowerCase ( ) )
4444 ) . length > 0
4545 )
46- if ( ! isEmpty ( subnet ) ) {
47- connections . push ( {
48- id : subnet . SubnetId ,
49- resourceType : services . subnet ,
50- relation : 'child' ,
51- field : 'subnets' ,
52- } )
46+ if ( ! isEmpty ( dataAtRegion ) ) {
47+ for ( const subnet of dataAtRegion ) {
48+ connections . push ( {
49+ id : subnet . SubnetId ,
50+ resourceType : services . subnet ,
51+ relation : 'child' ,
52+ field : 'subnets' ,
53+ } )
54+ }
5355 }
5456 }
5557
You can’t perform that action at this time.
0 commit comments