Skip to content

Commit

Permalink
#9 Improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
zshamrock committed Mar 2, 2021
1 parent 7914aeb commit c68508b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit c68508b

Please sign in to comment.