Loading controls...
Control: EC2 network load balancers should have mandatory tags
Description
Check if EC2 network load balancers have mandatory tags.
Usage
Run the control in your terminal:
steampipe check aws_tags.control.ec2_network_load_balancer_mandatory
Snapshot and share results via Steampipe Cloud:
steampipe loginsteampipe check --share aws_tags.control.ec2_network_load_balancer_mandatory
Plugins & Tables
Params
Args | Name | Default | Description | Variable |
---|---|---|---|---|
$1 | mandatory_tags |
|
SQL
with analysis as ( select arn, title, tags ? & $1 as has_mandatory_tags, to_jsonb($1) - array( select jsonb_object_keys(tags) ) as missing_tags, region, account_id, tags, _ctx from aws_ec2_network_load_balancer)select arn as resource, case when has_mandatory_tags then 'ok' else 'alarm' end as status, case when has_mandatory_tags then title || ' has all mandatory tags.' else title || ' is missing tags: ' || array_to_string( array( select jsonb_array_elements_text(missing_tags) ), ', ' ) || '.' end as reason, region, account_idfrom analysis