Control: Ensure 'Enable connecting to serial ports' is not enabled for VM Instance
Description
Interacting with a serial port is often referred to as the serial console, which is similar to using a terminal window, in that input and output is entirely in text mode and there is no graphical interface or mouse support.
Usage
Run the control in your terminal:
powerpipe control run gcp_compliance.control.compute_instance_serial_port_connection_disabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run gcp_compliance.control.compute_instance_serial_port_connection_disabled --share
SQL
This control uses a named query:
select self_link resource, case when metadata -> 'items' @> '[{"key": "serial-port-enable", "value": "true"}]' then 'alarm' else 'ok' end as status, case when metadata -> 'items' @> '[{"key": "serial-port-enable", "value": "true"}]' then title || ' serial port connections enabled.' else title || ' serial port connections disabled.' end as reason , location as location, project as projectfrom gcp_compute_instance;