mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Merge pull request #908 from Hestia-Homes/main
Deploy fastapi with terraform: save CDN terraform state so it isn't recreated every deploy
This commit is contained in:
commit
eba0024f64
2 changed files with 25 additions and 0 deletions
14
infrastructure/terraform/cdn/provider.tf
Normal file
14
infrastructure/terraform/cdn/provider.tf
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -574,3 +574,14 @@ output "cdn_certificate_state_bucket" {
|
||||||
value = module.cdn_certificate_state_bucket.bucket_name
|
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
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue