Skip to content

Commit

Permalink
Allows provisioners to return an empty string as the physical resourc…
Browse files Browse the repository at this point in the history
…e id, when it doesn't change.
  • Loading branch information
ejholmes committed Jul 16, 2016
1 parent 03f17d5 commit 8d27585
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/cloudformation/cloudformation.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ func (c *CustomResourceProvisioner) Handle(ctx context.Context, message *sqs.Mes
resp.PhysicalResourceId, resp.Data, err = c.provision(ctx, m, req)
}

// Allow provisioners to just return "" to indicate that the physical
// resource id did not change.
if resp.PhysicalResourceId == "" && req.PhysicalResourceId != "" {
resp.PhysicalResourceId = req.PhysicalResourceId
}

switch err {
case nil:
resp.Status = customresources.StatusSuccess
Expand Down

0 comments on commit 8d27585

Please sign in to comment.