r2 remote state
This commit is contained in:
@@ -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' },
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
24
docs/terraform/remote-state-cloudflare-r2.md
Normal file
24
docs/terraform/remote-state-cloudflare-r2.md
Normal 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
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user