dns: use linode object storage for tfstate
ci/woodpecker/push/dns Pipeline was successful Details
ci/woodpecker/pr/dns Pipeline was successful Details

pull/1/head
Ariadne Conill 2022-06-09 03:23:53 +00:00
parent 0090f4312f
commit 1b83228447
2 changed files with 11 additions and 8 deletions

View File

@ -4,10 +4,6 @@ pipeline:
when:
path: "dns/**"
event: pull_request
secrets:
- linode_token
- aws_access_key_id
- aws_secret_access_key
commands:
- apk add --no-cache terraform
- terraform version
@ -15,6 +11,7 @@ pipeline:
- terraform init
- terraform validate
- terraform plan -var "token=$LINODE_TOKEN"
secrets: [linode_token, aws_access_key_id, aws_secret_access_key]
deploy:
image: alpine:3.16
@ -22,10 +19,6 @@ pipeline:
path: "dns/**"
branch: main
event: push
secrets:
- linode_token
- aws_access_key_id
- aws_secret_access_key
commands:
- apk add --no-cache terraform
- terraform version
@ -34,3 +27,4 @@ pipeline:
- terraform validate
- terraform plan -out deploy.plan -var "token=$LINODE_TOKEN"
- terraform apply deploy.plan -var "token=$LINODE_TOKEN"
secrets: [linode_token, aws_access_key_id, aws_secret_access_key]

View File

@ -5,6 +5,15 @@ terraform {
version = "1.26.0"
}
}
backend "s3" {
bucket = "treehouse-state"
key = "tfstate"
region = "us-southeast-1"
endpoint = "us-southeast-1.linodeobjects.com"
skip_credentials_validation = true
skip_region_validation = true
}
}
provider "linode" {