Skip to content

Commit

Permalink
Merge pull request #564 from voojoe/destination_port_ranges_bugfix_fo…
Browse files Browse the repository at this point in the history
…r_nsg_resource

Removed broken type conversion in NSG resource
  • Loading branch information
sathish-progress authored Nov 22, 2021
2 parents 75df1f2 + f69a14d commit e06d864
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libraries/azure_network_security_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,9 @@ def specific_port?(properties)
end

def destination_port_ranges(properties)
properties_hash = properties.to_h
return Array(properties.destinationPortRange) unless properties_hash.include?(:destinationPortRanges)
return Array(properties.destinationPortRange) unless properties.include?(:destinationPortRanges)

return properties.destinationPortRanges unless properties_hash.include?(:destinationPortRange)
return properties.destinationPortRanges unless properties.include?(:destinationPortRange)

properties.destinationPortRanges + Array(properties.destinationPortRange)
end
Expand Down

0 comments on commit e06d864

Please sign in to comment.