Recreate Rancher stack if it was removed (#11539)
This commit is contained in:
parent
28cee57ef5
commit
2914a38202
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue