File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 envrc_content : |
2929 export TF_VAR_proxmox_endpoint="${{ secrets.TF_VAR_proxmox_endpoint }}"
3030 export TF_VAR_proxmox_api_token="${{ secrets.TF_VAR_proxmox_api_token }}"
31+ export TF_VAR_b2_application_key_id="${{ secrets.TF_VAR_b2_application_key_id }}"
32+ export TF_VAR_b2_application_key="${{ secrets.TF_VAR_b2_application_key }}"
3133 aws_role_arn : ${{ secrets.AWS_ROLE_ARN }}
3234
3335 plan_apply :
4042 envrc_content : |
4143 export TF_VAR_proxmox_endpoint="${{ secrets.TF_VAR_proxmox_endpoint }}"
4244 export TF_VAR_proxmox_api_token="${{ secrets.TF_VAR_proxmox_api_token }}"
45+ export TF_VAR_b2_application_key_id="${{ secrets.TF_VAR_b2_application_key_id }}"
46+ export TF_VAR_b2_application_key="${{ secrets.TF_VAR_b2_application_key }}"
4347 headscale_auth_key : ${{ secrets.HEADSCALE_AUTH_KEY }}
4448 aws_role_arn : ${{ secrets.AWS_ROLE_ARN }}
4549 output_encryption_key : ${{ secrets.OUTPUT_ENCRYPTION_KEY }}
Original file line number Diff line number Diff line change 2020 envrc_content : |
2121 export TF_VAR_proxmox_endpoint="${{ secrets.TF_VAR_proxmox_endpoint }}"
2222 export TF_VAR_proxmox_api_token="${{ secrets.TF_VAR_proxmox_api_token }}"
23+ export TF_VAR_b2_application_key_id="${{ secrets.TF_VAR_b2_application_key_id }}"
24+ export TF_VAR_b2_application_key="${{ secrets.TF_VAR_b2_application_key }}"
2325 aws_role_arn : ${{ secrets.AWS_ROLE_ARN }}
2426
2527 plan :
3234 envrc_content : |
3335 export TF_VAR_proxmox_endpoint="${{ secrets.TF_VAR_proxmox_endpoint }}"
3436 export TF_VAR_proxmox_api_token="${{ secrets.TF_VAR_proxmox_api_token }}"
37+ export TF_VAR_b2_application_key_id="${{ secrets.TF_VAR_b2_application_key_id }}"
38+ export TF_VAR_b2_application_key="${{ secrets.TF_VAR_b2_application_key }}"
3539 headscale_auth_key : ${{ secrets.HEADSCALE_AUTH_KEY }}
3640 aws_role_arn : ${{ secrets.AWS_ROLE_ARN }}
3741 output_encryption_key : ${{ secrets.OUTPUT_ENCRYPTION_KEY }}
Original file line number Diff line number Diff line change 1+ locals {
2+ backup_bucket_name = " sgfdevs-vm-workloads-backups"
3+ }
4+
5+ resource "b2_bucket" "backups" {
6+ bucket_name = local. backup_bucket_name
7+ bucket_type = " allPrivate"
8+ }
Original file line number Diff line number Diff line change @@ -7,3 +7,8 @@ provider "proxmox" {
77provider "aws" {
88 region = var. aws_region
99}
10+
11+ provider "b2" {
12+ application_key_id = var. b2_application_key_id
13+ application_key = var. b2_application_key
14+ }
Original file line number Diff line number Diff line change @@ -14,3 +14,15 @@ variable "aws_region" {
1414 type = string
1515 default = " us-east-2"
1616}
17+
18+ variable "b2_application_key_id" {
19+ description = " Backblaze B2 application key ID for Terraform bucket management"
20+ type = string
21+ sensitive = true
22+ }
23+
24+ variable "b2_application_key" {
25+ description = " Backblaze B2 application key for Terraform bucket management"
26+ type = string
27+ sensitive = true
28+ }
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ terraform {
1010 source = " hashicorp/aws"
1111 version = " ~> 6.33"
1212 }
13+ b2 = {
14+ source = " Backblaze/b2"
15+ version = " ~> 0.12"
16+ }
1317 proxmox = {
1418 source = " bpg/proxmox"
1519 version = " ~> 0.97"
You can’t perform that action at this time.
0 commit comments