Terraform: Try to init before destroy

This commit is contained in:
Nils Hanke 2022-11-15 12:50:17 +01:00 committed by Nils Hanke
parent f27af5b588
commit b9b618a1f0

View File

@ -96,6 +96,9 @@ func (c *Client) CreateCluster(
// DestroyCluster destroys a Constellation cluster using Terraform.
func (c *Client) DestroyCluster(ctx context.Context) error {
if err := c.tf.Init(ctx); err != nil {
return err
}
return c.tf.Destroy(ctx)
}