Skip to content

Commit

Permalink
logging in orchestration
Browse files Browse the repository at this point in the history
  • Loading branch information
fishnix committed Dec 16, 2021
1 parent 5859110 commit ef046ff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/orchestration_sgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/YaleSpinup/apierror"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/service/ec2"
log "github.com/sirupsen/logrus"
)
Expand All @@ -14,6 +15,8 @@ func (o *ec2Orchestrator) createSecurityGroup(ctx context.Context, req *Ec2Secur
return "", apierror.New(apierror.ErrBadRequest, "invalid input", nil)
}

log.Debugf("got request to create security group: %s", awsutil.Prettify(req))

var err error
var rollBackTasks []rollbackFunc
defer func() {
Expand Down Expand Up @@ -83,6 +86,8 @@ func (o *ec2Orchestrator) updateSecurityGroup(ctx context.Context, id string, re
return apierror.New(apierror.ErrBadRequest, "invalid input", nil)
}

log.Debugf("got request to update security group %s: %s", id, awsutil.Prettify(req))

switch *req.Action {
case "add":
if err := o.client.AuthorizeSecurityGroup(ctx, *req.RuleType, id, ipPermissionsFromRequest(req)); err != nil {
Expand Down

0 comments on commit ef046ff

Please sign in to comment.