Open ArturDorochowicz opened 1 year ago
A workaround for this in the meantime is possible by setting the create_before_destroy
property to true. This will force TF update the lifecycle before deleting the environment.
resource "octopusdeploy_lifecycle" "test" {
...
lifecycle {
create_before_destroy = true
}
}
Further upgrades are required to upgrade the provider to use the Terraform Provider Framework which will expose some additional hooks to potentially control the lifecycle a little more automatically.
Describe the bug Deleting an Environment which is part of a Lifecycle fails with message
This environment cannot be deleted because it is being used by the following lifecycles: [...]
.The provider attempts to delete the environment before modifying the lifecycle.
Steps to reproduce
Expected behavior The lifecycle should be modified before deleting the environment. Environment should be successfully deleted.
Logs and other supporting information Add the output of running
tf plan
ortf apply
along with any errors in the Octopus Server logs.Environment and versions:
2022.4.8474
1.3.9
0.10.5