Skip to content

Troubleshooting

Common problems with the OpenTofu Runner AMI, what causes them and how to fix them.

The demo says first boot did not complete

Cause: sushi-opentofu-firstboot.service has not finished or failed, so the workspace is missing.

Fix: Wait for cloud-init, then check the service and its log:

sudo cloud-init status --wait
systemctl status sushi-opentofu-firstboot.service
sudo journalctl -u sushi-opentofu-firstboot.service --no-pager

If it failed, keep a copy of the log, then run it again:

sudo systemctl restart sushi-opentofu-firstboot.service

init cannot find a provider

Cause: The default CLI configuration only installs hashicorp/aws from the local mirror and blocks registry downloads.

Fix: Point TF_CLI_CONFIG_FILE at your own CLI configuration that allows the providers you need. See Providers.

init fails with a version constraint error

Cause: Your configuration asks for an AWS provider version other than 6.67.0, which is the only version in the local mirror.

Fix: Use = 6.67.0 for hashicorp/aws, or use your own CLI configuration that can download the version you need.

init or plan runs out of memory

Cause: The AWS provider is large. Instances with 2 GiB of RAM are usually too small.

Fix: Use t3.medium (4 GiB) or larger.

Permission denied in the workspace

Cause: The workspace is owned by ubuntu. Running as another user, or running tofu with sudo, can leave files ubuntu cannot change.

Fix: Run tofu as ubuntu, without sudo.

The demo refuses the plan

Cause: You changed the example workspace. The demo only applies the original synthetic example.

Fix: This is expected. Run your own validate and plan directly with tofu -chdir=/var/lib/opentofu/workspace.