Added remote backend
Some checks failed
ci/woodpecker/push/deploy Pipeline was successful
ci/woodpecker/manual/deploy Pipeline failed

This commit is contained in:
Oscar Blue 2022-12-03 04:01:17 +00:00
parent e099e0a250
commit bd5ae17f3c
2 changed files with 18 additions and 1 deletions

View file

@ -2,7 +2,7 @@ CODE_PATH ?= .
HETZNERKEY ?= .
init:
@cd $(CODE_PATH) && terraform init -reconfigure -upgrade
@cd $(CODE_PATH) && terraform init -reconfigure -upgrade -backend-config="access_key=$(B2ACCESS)" -backend-config="secret_key=$(B2SECRET)"
plan: init validate
@cd $(CODE_PATH) && terraform plan -var="hcloud_token=$(HETZNERKEY)"

View file

@ -0,0 +1,17 @@
terraform {
backend "s3" {
bucket = "tf-state-oscar"
key = "terraform.tfstate"
region = "us-east-1"
endpoint = "s3.eu-central-003.backblazeb2.com"
access_key = "xxxx"
secret_key = "xxxx"
skip_requesting_account_id = true
skip_credentials_validation = true
skip_get_ec2_platforms = true
skip_metadata_api_check = true
skip_region_validation = true
}
}