Skip to content

Commit

Permalink
Recreate Rancher stack if it was removed (#11539)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphink authored and stack72 committed Jan 31, 2017
1 parent 28cee57 commit 2914a38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builtin/providers/rancher/resource_rancher_stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ func resourceRancherStackRead(d *schema.ResourceData, meta interface{}) error {
return err
}

if stack.State == "removed" {
log.Printf("[INFO] Stack %s was removed on %v", d.Id(), stack.Removed)
d.SetId("")
return nil
}

config, err := client.Environment.ActionExportconfig(stack, &rancherClient.ComposeConfigInput{})
if err != nil {
return err
Expand Down

0 comments on commit 2914a38

Please sign in to comment.