mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
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
|
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{})
|
config, err := client.Environment.ActionExportconfig(stack, &rancherClient.ComposeConfigInput{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user