dns: use linode object storage for tfstate
parent
0090f4312f
commit
1b83228447
|
@ -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]
|
||||
|
|
|
@ -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" {
|
||||
|
|
Loading…
Reference in New Issue