r2 remote state
All checks were successful
Build, Test & Publish / Build and Publish Container Image (push) Successful in 2m45s
Build, Test & Publish / Build (push) Successful in 1m37s
Build, Test & Publish / Deploy to Infrastructure (push) Successful in 30s

This commit is contained in:
2026-03-26 17:38:11 +11:00
parent 07d9dd6657
commit 30ffa17752
3 changed files with 27 additions and 1 deletions

View File

@@ -183,6 +183,7 @@ export default defineConfig({
collapsed: true,
items: [
{ text: 'Ansible Inventory Generation', link: '/terraform/ansible-inventory-generation' },
{ text: 'Remote State with Cloudflare R2', link: '/terraform/remote-state-cloudflare-r2' },
]
},
{

View File

@@ -1,3 +1,4 @@
# Terraform Snippets and Musings
#### [Generating a Ansible Inventory File from Terraform](./ansible-inventory-generation.md)
#### [Generating a Ansible Inventory File from Terraform](./ansible-inventory-generation.md)
#### [Remote State with Clouflare R2](./remote-state-cloudflare-r2.md)

View File

@@ -0,0 +1,24 @@
# Remote State with Cloudflare R2
The following is an example of how to use Cloudflare R2 as a remote state backend for Terraform. This allows you to store your Terraform state files in Cloudflare's object storage service, providing durability and accessibility.
```hcl
terraform {
backend "s3" {
bucket = "<BUCKET_NAME>"
key = "<UNIQUE_APP>/terraform.tfstate"
endpoints = {
s3 = "https://<BUCKET_ID>.r2.cloudflarestorage.com"
}
region = "auto"
skip_credentials_validation = true
skip_metadata_api_check = true
skip_region_validation = true
skip_requesting_account_id = true
skip_s3_checksum = true
use_path_style = true
}
}
```