OpenTofu resources not being created or planned despite correct configuration
Last updated: August 6, 2025
OpenTofu resources not being created or planned despite correct configuration
If you're experiencing issues where OpenTofu resources aren't being created or planned despite having correct configuration files, and you see minimal output during the initialization phase, this is likely due to an incompatible Spacelift provider version.
Symptoms
Resources are deleted unexpectedly and cannot be recreated
OpenTofu plans show "No changes" even when resources should be created
Initialization logs show minimal output without provider installation details
Expected output like "Finding spacelift-io/spacelift versions..." is missing from logs
Root Cause
This issue occurs when using an outdated version of the Spacelift provider that doesn't recognize OpenTofu. The Spacelift provider requires version 1.8.0 or higher to work properly with OpenTofu.
Solution
Update your Spacelift provider version in your terraform or provider.tf file:
terraform {
required_providers {
spacelift = {
source = "spacelift-io/spacelift"
version = "~> 1.8"
}
}
}Make sure you're using version 1.8.0 or higher, as versions below 1.8.0 do not support OpenTofu.
Verification Steps
Update the provider version in your configuration
Commit and push your changes
Run a new stack execution
Check the initialization logs for proper provider installation output
You should now see output similar to:
Initializing provider plugins...
- Finding spacelift-io/spacelift versions matching "~> 1.8"...
- Installing spacelift-io/spacelift v1.8.x...
OpenTofu has been successfully initialized!Additional Troubleshooting
If updating the provider version doesn't resolve the issue, also check:
Ensure your configuration files are present in the correct branch and directory
Verify the stack's working directory is pointing to the correct path
Test
tofu initlocally to confirm the configuration works outside of Spacelift