Using Terraform to Manage On‑Premise Infrastructure
Description and use
Terraform can manage Spinifex on‑prem infrastructure by adjusting provider endpoints, skipping AWS‑specific checks, and using Spinifex placeholders for AMIs.
Problem
Deploying and managing infrastructure on a private Spinifex cloud with Terraform requires provider configuration changes and handling of endpoint, credentials, and state differences from AWS.
Outcome
Terraform can manage Spinifex infrastructure with only provider configuration changes, enabling reuse of existing AWS HCL and workbooks.
Workflow
- 1. Define Spinifex and Predastore endpoints in variables or tfvars. 2. Configure the AWS provider with those endpoints and set skip_* flags to true. 3. For S3 resources, add the Predastore endpoint and enable s3_use_path_style. 4. Adjust AMI data sources to use owner "000000000000". 5. Set AWS credentials via environment or Spinifex instance profile. 6. Run terraform init, plan, and apply. 7. Optionally use Spinifex workbooks for common patterns.
Evidence
The resource definitions, modules, variable files, and state are all completely decoupled from which endpoint the provider talks to.
All four are required. Omitting any one of them causes the provider initialization to fail before it sends a single resource request to Spinifex.
- Record date: 2026-09-06T07:21:55.168Z