Merge pull request #907 from Hestia-Homes/deploy-fastapi-with-terraform

Deploy fastapi with terraform: save CDN terraform state so it isn't recreated every deploy
This commit is contained in:
Daniel Roth 2026-03-19 09:35:27 +00:00 committed by GitHub
commit 14e139150f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,14 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
backend "s3" {
bucket = "cdn-terraform-state"
key = "terraform.tfstate"
region = "eu-west-2"
}
}

View file

@ -574,3 +574,14 @@ output "cdn_certificate_state_bucket" {
value = module.cdn_certificate_state_bucket.bucket_name
}
################################################
# CDN
################################################
module "cdn_state_bucket" {
source = "../modules/tf_state_bucket"
bucket_name = "cdn-terraform-state"
}
output "cdn_state_bucket" {
value = module.cdn_state_bucket.bucket_name
}