Merge pull request #440 from pulumi/TickDeleteInPreview

Set `old.Delete` when previewing a `CreateReplace` step.
This commit is contained in:
Pat Gavlin 2017-10-19 13:34:55 -07:00 committed by GitHub
commit bc4f0b1935

View file

@ -172,6 +172,11 @@ func (s *CreateStep) Apply() (resource.Status, error) {
}
func (s *CreateStep) Skip() error {
// Mark the old resource as pending deletion if necessary.
if s.replacing {
s.old.Delete = true
}
// In the case of a create, we don't know the ID or output properties. But we do know the defaults and URN.
s.goal.Done(s.new, false, nil)
return nil