New to the provider? Run through the Quickstart and Authentication first — this guide assumes Terraform is installed and
STRETTCH_CLOUD_API_KEY is set.What you’ll build
- A compute instance with a public IP
- SSH access with your own key
- Nginx serving a page over HTTP
1
Set up the project
Create a new directory with three files:
2
Provide your credentials
Set your API key and keep your SSH public key handy:
3
Initialize and apply
Download the provider and create the instance, passing your public key in:Review the plan, type
yes, and Terraform prints the public_ip when the instance is up.4
Connect over SSH
Strettch Cloud exposes SSH on port 222. Connect as
root:5
Install Nginx
On the instance, install and start Nginx:Replace the default page with your own:
6
Verify
Open
http://<your-public-ip> in a browser — you’ll see your page. Your web server is live, defined entirely in Terraform.7
Tear it down
When you’re finished, destroy everything you created:
Make it repeatable
Because the whole server is now described in code, you can:- Version it — commit
main.tf,variables.tf, andoutputs.tfto Git. - Review changes — run
terraform planbefore every change to see exactly what will happen. - Reproduce it — apply the same files to stand up an identical instance any time, or for a second environment.
Next steps
Resources & data sources
The full catalog of what the provider can manage.
Full reference
Every argument and attribute on the Terraform Registry.