Skip to content

Commit

Permalink
Merge pull request #582 from alpineriveredge/eni_name
Browse files Browse the repository at this point in the history
Make network_interface searchable by name
  • Loading branch information
k1LoW authored Mar 21, 2023
2 parents ae1286b + ea8652e commit 390b124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/awspec/helper/finder/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def find_network_interface(interface_id)
})
resource = res.network_interfaces.single_resource(interface_id)
return resource if resource

rescue Aws::EC2::Errors::InvalidNetworkInterfaceIdMalformed => e
res = ec2_client.describe_network_interfaces({
filters: [{ name: 'tag:Name', values: [interface_id] }]
})
Expand Down

0 comments on commit 390b124

Please sign in to comment.