I discovered recently that Oracle Cloud has 4-core arm64 instances in their free tier. So I signed up for an account and set out to get an instance for myself. However, the instance creation failed stating that my chosen region did not have any capacity left for additional instances. A little bit of googling turned up this: https://www.reddit.com/r/oraclecloud/comments/on2e25/resolving_oracle_cloud_out_of_capacity_issue_and/. I didn’t read the linked article (which is apparently paywalled) but the poster had apparently posted a script that would attempt to acquire an instance in a loop until the attempt succeeded.

When creating the instance via Oracle’s web interface, I saw that I could get a terraform configuration for my chosen specs. I downloaded the terraform configuration, configured the provider using the official documentation, and asked Claude to generate a shell script that keeps attempting to apply the configuration until it succeeds. The script runs terraform apply -auto-approve in an infinite loop, exiting out with a code of 0 if the terraform command exits with 0.

And now I have for myself a 4-core arm64 instance.