diff --git a/pkg/cfn/manager/api.go b/pkg/cfn/manager/api.go index 11f1a3f25c..cb4eb6308b 100644 --- a/pkg/cfn/manager/api.go +++ b/pkg/cfn/manager/api.go @@ -133,10 +133,10 @@ func (c *StackCollection) UpdateStack(stackName string, changeSetName string, de if err := c.doCreateChangeSetRequest(i, changeSetName, description, template, parameters, true); err != nil { return err } - if err := c.doWaitUntilChangeSetIsCreated(i, &changeSetName); err != nil { + if err := c.doWaitUntilChangeSetIsCreated(i, changeSetName); err != nil { return err } - changeSet, err := c.DescribeStackChangeSet(i, &changeSetName) + changeSet, err := c.DescribeStackChangeSet(i, changeSetName) if err != nil { return err } @@ -391,17 +391,17 @@ func (c *StackCollection) doExecuteChangeSet(stackName string, changeSetName str } // DescribeStackChangeSet gets a cloudformation changeset. -func (c *StackCollection) DescribeStackChangeSet(i *Stack, changeSetName *string) (*ChangeSet, error) { +func (c *StackCollection) DescribeStackChangeSet(i *Stack, changeSetName string) (*ChangeSet, error) { input := &cloudformation.DescribeChangeSetInput{ StackName: i.StackName, - ChangeSetName: changeSetName, + ChangeSetName: &changeSetName, } if i.StackId != nil { input.StackName = i.StackId } resp, err := c.provider.CloudFormation().DescribeChangeSet(input) if err != nil { - return nil, errors.Wrapf(err, "describing CloudFormation ChangeSet %s for stack %s", *changeSetName, *i.StackName) + return nil, errors.Wrapf(err, "describing CloudFormation ChangeSet %s for stack %s", changeSetName, *i.StackName) } return resp, nil } diff --git a/pkg/cfn/manager/waiters.go b/pkg/cfn/manager/waiters.go index 0ffb0762f5..dd3083c821 100644 --- a/pkg/cfn/manager/waiters.go +++ b/pkg/cfn/manager/waiters.go @@ -48,13 +48,13 @@ func (c *StackCollection) waitWithAcceptors(i *Stack, acceptors []request.Waiter return waiters.Wait(*i.StackName, msg, acceptors, newRequest, c.provider.WaitTimeout(), troubleshoot) } -func (c *StackCollection) waitWithAcceptorsChangeSet(i *Stack, changesetName *string, acceptors []request.WaiterAcceptor) error { - msg := fmt.Sprintf("waiting for CloudFormation changeset %q for stack %q", *changesetName, *i.StackName) +func (c *StackCollection) waitWithAcceptorsChangeSet(i *Stack, changesetName string, acceptors []request.WaiterAcceptor) error { + msg := fmt.Sprintf("waiting for CloudFormation changeset %q for stack %q", changesetName, *i.StackName) newRequest := func() *request.Request { input := &cfn.DescribeChangeSetInput{ StackName: i.StackName, - ChangeSetName: changesetName, + ChangeSetName: &changesetName, } req, _ := c.provider.CloudFormation().DescribeChangeSetRequest(input) return req @@ -222,7 +222,7 @@ func (c *StackCollection) doWaitUntilStackIsUpdated(i *Stack) error { ) } -func (c *StackCollection) doWaitUntilChangeSetIsCreated(i *Stack, changesetName *string) error { +func (c *StackCollection) doWaitUntilChangeSetIsCreated(i *Stack, changesetName string) error { return c.waitWithAcceptorsChangeSet(i, changesetName, waiters.MakeAcceptors( changesetStatus,