title | platform |
---|---|
About the google_compute_forwarding_rules resource |
gcp |
A google_compute_forwarding_rules
is used to test a Google ForwardingRule resource
This resource has beta fields available. To retrieve these fields, include beta: true
in the constructor for the resource
describe google_compute_forwarding_rules(project: 'chef-gcp-inspec', region: 'europe-west2') do
its('forwarding_rule_names') { should include 'udp-forwarding-rule' }
end
Test that there are no more than a specified number of forwarding_rules available for the project and region
describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('count') { should be <= 100}
end
describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('forwarding_rule_ids') { should include 12345678975432 }
end
describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('forwarding_rule_names') { should include "forwarding_rule-name" }
end
describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west2') do
its('forwarding_rule_networks') { should not include "network-name" }
end
Properties that can be accessed from the google_compute_forwarding_rules
resource:
See google_compute_forwarding_rule.md for more detailed information
creation_timestamps
: an array ofgoogle_compute_forwarding_rule
creation_timestampis_mirroring_collectors
: (Beta only) an array ofgoogle_compute_forwarding_rule
is_mirroring_collectordescriptions
: an array ofgoogle_compute_forwarding_rule
descriptionforwarding_rule_ids
: an array ofgoogle_compute_forwarding_rule
idip_addresses
: an array ofgoogle_compute_forwarding_rule
ip_addressip_protocols
: an array ofgoogle_compute_forwarding_rule
ip_protocolbackend_services
: an array ofgoogle_compute_forwarding_rule
backend_serviceforwarding_rule_load_balancing_schemes
: an array ofgoogle_compute_forwarding_rule
load_balancing_schemeforwarding_rule_names
: an array ofgoogle_compute_forwarding_rule
nameforwarding_rule_networks
: an array ofgoogle_compute_forwarding_rule
networkport_ranges
: an array ofgoogle_compute_forwarding_rule
port_rangeports
: an array ofgoogle_compute_forwarding_rule
portssubnetworks
: an array ofgoogle_compute_forwarding_rule
subnetworktargets
: an array ofgoogle_compute_forwarding_rule
targetallow_global_accesses
: an array ofgoogle_compute_forwarding_rule
allow_global_accesslabels
: (Beta only) an array ofgoogle_compute_forwarding_rule
labelslabel_fingerprints
: (Beta only) an array ofgoogle_compute_forwarding_rule
label_fingerprintall_ports
: an array ofgoogle_compute_forwarding_rule
all_portsnetwork_tiers
: an array ofgoogle_compute_forwarding_rule
network_tierservice_labels
: an array ofgoogle_compute_forwarding_rule
service_labelservice_names
: an array ofgoogle_compute_forwarding_rule
service_nameregions
: an array ofgoogle_compute_forwarding_rule
region
This resource supports all of the above properties as filter criteria, which can be used
with where
as a block or a method.
Ensure the Compute Engine API is enabled for the current project.