turbot/docker_compliance

Query: docker_info_swarm_minimum_required_manager_nodes

Usage

powerpipe query docker_compliance.query.docker_info_swarm_minimum_required_manager_nodes

Steampipe Tables

SQL

select
id as resource,
case
when (swarm ->> 'Managers') :: int > 0 then 'ok'
else 'alarm'
end as status,
case
when (swarm ->> 'Managers') :: int > 0 then name || ' minimum number of manager nodes have not been created.'
else name || ' minimum number of manager nodes have been created.'
end as reason,
_ctx ->> 'connection_name' as connection_name
from
docker_info;

Controls

The query is being used by the following controls: