Added remote backend
This commit is contained in:
parent
e099e0a250
commit
bd5ae17f3c
2 changed files with 18 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@ CODE_PATH ?= .
|
||||||
HETZNERKEY ?= .
|
HETZNERKEY ?= .
|
||||||
|
|
||||||
init:
|
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
|
plan: init validate
|
||||||
@cd $(CODE_PATH) && terraform plan -var="hcloud_token=$(HETZNERKEY)"
|
@cd $(CODE_PATH) && terraform plan -var="hcloud_token=$(HETZNERKEY)"
|
||||||
|
|
17
hetzner/Projects/Development/landing-zone/backend.tf
Normal file
17
hetzner/Projects/Development/landing-zone/backend.tf
Normal 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
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue