Control: Compute Instance template IP forwarding should be disabled
Description
Compute Engine instance template cannot forward a packet unless the source IP address of the packet matches the IP address of the instance. Similarly, GCP won't deliver a packet whose destination IP address is different than the IP address of the instance receiving the packet. However, both capabilities are required if you want to use instances to help route packets.
Usage
Run the control in your terminal:
powerpipe control run gcp_compliance.control.compute_instance_template_ip_forwarding_disabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run gcp_compliance.control.compute_instance_template_ip_forwarding_disabled --share
SQL
This control uses a named query:
select self_link resource, case when instance_can_ip_forward then 'alarm' else 'ok' end as status, case when instance_can_ip_forward then title || ' IP forwarding enabled.' else title || ' IP forwarding disabled.' end as reason , location as location, project as projectfrom gcp_compute_instance_template;