Description
I tried to move projects from one folder to another and then delete the old folder afterwards (because it was empty). When running everything in one apply terraform will first try to delete the old folder and fail, because it's not empty.
Steps to reproduce
- Create a Folder with at least one project in it
resource "stackit_resourcemanager_folder" "folder_1" {
name = "folder_1"
owner_email = "foo.bar@stackit.cloud"
parent_container_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
resource "stackit_resourcemanager_folder" "folder_2" {
name = "folder_2"
owner_email = "foo.bar@stackit.cloud"
parent_container_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
resource "stackit_resourcemanager_project" "example_project" {
name = "example-project"
owner_email = "foo.bar@stackit.cloud"
parent_container_id = stackit_resourcemanager_folder.folder_1.container_id
}
- Move the project to a different folder and delete the old folder at the same time.
resource "stackit_resourcemanager_folder" "folder_2" {
name = "folder_2"
owner_email = "foo.bar@stackit.cloud"
parent_container_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
resource "stackit_resourcemanager_project" "example_project" {
name = "example-project"
owner_email = "foo.bar@stackit.cloud"
parent_container_id = stackit_resourcemanager_folder.folder_2.container_id
}
- Run
terraform apply:
│ {"timeStamp":"2026-08-04T14:55:02.907949687Z","path":"/resource-management/v2/folders/folder_1"status":409,"error":"Conflict","message":"[FOLDER]
│ has children of type project. Forced deletion not permitted for
│ containerId[xxxxxxx]"}
Actual behavior
Terraform tries to delete the folder first before moving the project within to the new folder
Expected behavior
I would expect terraform to figure out the correct execution order and move projects first before attempting to delete the old folder.
Environment
- Terraform version (see
terraform --version): v1.13.5
- Version of the STACKIT Terraform provider:
0.106.0
Description
I tried to move projects from one folder to another and then delete the old folder afterwards (because it was empty). When running everything in one apply terraform will first try to delete the old folder and fail, because it's not empty.
Steps to reproduce
terraform apply:Actual behavior
Terraform tries to delete the folder first before moving the project within to the new folder
Expected behavior
I would expect terraform to figure out the correct execution order and move projects first before attempting to delete the old folder.
Environment
terraform --version):v1.13.50.106.0