Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for forwarding rules with nil network and update README. #93

Merged
merged 1 commit into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ The following resources are available in the InSpec GCP Profile
- [google_compute_address](docs/resources/google_compute_address.md)
- [google_compute_firewall](docs/resources/google_compute_firewall.md)
- [google_compute_firewalls](docs/resources/google_compute_firewalls.md)
- [google_compute_forwarding_rule](docs/resources/google_compute_forwarding_rule.md)
- [google_compute_forwarding_rules](docs/resources/google_compute_forwarding_rules.md)
- [google_compute_image](docs/resources/google_compute_image.md)
- [google_compute_instance](docs/resources/google_compute_instance.md)
- [google_compute_instance_group](docs/resources/google_compute_instance_group.md)
Expand Down
3 changes: 2 additions & 1 deletion libraries/google_compute_forwarding_rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ def fetch_data
end
return [] if !@forwarding_rules || !@forwarding_rules.items
@forwarding_rules.items.map do |forwarding_rule|
forwarding_rule_network = forwarding_rule.network.split('/').last if !forwarding_rule.network.nil?
forwarding_rule_rows+=[{ forwarding_rule_id: forwarding_rule.id,
forwarding_rule_name: forwarding_rule.name,
forwarding_rule_network: forwarding_rule.network.split('/').last,
forwarding_rule_network: forwarding_rule_network,
forwarding_rule_load_balancing_scheme: forwarding_rule.load_balancing_scheme }]
end
next_page = @forwarding_rules.next_page_token
Expand Down