diff --git a/api/orchestration_sgs.go b/api/orchestration_sgs.go index d7cb71f..04eb33a 100644 --- a/api/orchestration_sgs.go +++ b/api/orchestration_sgs.go @@ -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" ) @@ -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() { @@ -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 {