- Documented Linode Terraform Provider v2 migration in ADR-0002 - Created dedicated backend module for state storage - Updated all modules for v2 patterns (cluster→region, pools→pool, tags) - Added firewall outputs and backend outputs - Updated example tfvars files with v2 configurations - Updated AGENTS.md, README.md, and documentation
1.4 KiB
1.4 KiB
Backend configuration for HAPI Terraform
This module configures the Terraform backend to store state in Linode Object Storage.
Configuration
The backend uses S3-compatible API provided by Linode Object Storage.
terraform {
backend "s3" {
bucket = "hapi-terraform-state-${var.environment}"
key = "hapi/terraform.tfstate"
region = var.linode_object_storage_cluster
endpoint = "${var.linode_object_storage_cluster}.linodeobjects.com"
access_key = var.object_storage_access_key
secret_key = var.object_storage_secret_key
skip_region = true
skip_credentials_validation = true
skip_metadata_api_check = true
}
}
Variables
| Variable | Description | Type | Default |
|---|---|---|---|
environment |
Deployment environment | string | "staging" |
linode_object_storage_cluster |
Object Storage cluster/region | string | "us-east-1" |
object_storage_access_key |
Access key for Object Storage | string | - |
object_storage_secret_key |
Secret key for Object Storage (sensitive) | string | - |
Outputs
| Output | Description |
|---|---|
backend_bucket |
Name of the state bucket |
backend_key |
Path to state file within bucket |
backend_region |
Object Storage cluster/region |
backend_endpoint |
S3-compatible endpoint URL |