UPD: Added more services to the review

This commit is contained in:
xpk 2024-08-01 17:33:30 +08:00
parent 4dc3e86bb9
commit 63c883588d
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86

View File

@ -331,6 +331,20 @@ for r in regions:
print(r, aid, "Missing multi region trail", sep=", ")
print("--END OF SECTION--")
printTitle("Vpc review")
printSubTitle("[Reliability] Insufficient VPN tunnels - Consider having 2 tunnels for each site VPN connection")
print("Region", "AccountID", "VpnConnection", "TunnelCount", sep=", ")
for r in regions:
client = boto3.client('ec2', region_name=r)
response = client.describe_vpn_connections()
for i in response.get("VpnConnections"):
if len(jmespath.search("Options.TunnelOptions[*].OutsideIpAddress", i)) < 2:
print(r, aid, i.get("VpnConnectionId"), len(jmespath.search("Options.TunnelOptions[*].OutsideIpAddress", i)), sep=", ")
print("--END OF SECTION--")
# TODO
"""
- SG allowing public access