From c68508b276be09f720c9b32a5dad1d530449eb4b Mon Sep 17 00:00:00 2001 From: Aliaksandr Kazlou Date: Tue, 2 Mar 2021 11:08:14 +0300 Subject: [PATCH] #9 Improve logging --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 0116036..b19b88c 100644 --- a/main.go +++ b/main.go @@ -121,6 +121,8 @@ func syncSecurityGroupInboundRule( } for _, entry := range inbound.IpRanges { if aws.StringValue(entry.Description) == descriptionId { + fmt.Printf(":: found existing inbound rule: port %d-%d, ip %s\n", + aws.Int64Value(inbound.FromPort), aws.Int64Value(inbound.ToPort), aws.StringValue(entry.CidrIp)) err := revokeSecurityGroupIngress(svc, groupName, port, aws.StringValue(entry.CidrIp), username, location) if err != nil { return err @@ -204,6 +206,7 @@ func authorizeSecurityGroupIngress( return err } fmt.Println("done") + fmt.Printf(":: set new inbound rule: port %d-%d, ip %s\n", port, port, ipAddress) return nil }