mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
address PR
This commit is contained in:
parent
33406ff678
commit
ddcfa75a03
7 changed files with 11 additions and 23 deletions
1
.github/workflows/deploy_terraform.yml
vendored
1
.github/workflows/deploy_terraform.yml
vendored
|
|
@ -361,5 +361,4 @@ jobs:
|
|||
AWS_ACCESS_KEY_ID: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: ${{ secrets.DEV_AWS_REGION }}
|
||||
TF_VAR_domain_name: ${{ secrets.ARA_DEV_DOMAIN_NAME }}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ data "terraform_remote_state" "fast_api" {
|
|||
module "cdn" {
|
||||
source = "../modules/cloudfront"
|
||||
|
||||
aliases = ["domna.homes", "api.dev.domna.homes"]
|
||||
# Comment out temporarily just to see what happens
|
||||
# aliases = [data.terraform_remote_state.fast_api.outputs.domain_name]
|
||||
|
||||
origins = [
|
||||
# ---- S3 ----
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
variable "stage" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "domain_name" {
|
||||
type = string
|
||||
}
|
||||
|
|
@ -39,14 +39,6 @@ locals {
|
|||
db_credentials = jsondecode(data.aws_secretsmanager_secret_version.db_credentials.secret_string)
|
||||
}
|
||||
|
||||
# data "aws_ssm_parameter" "certificate_arn" {
|
||||
# name = "/ssl_certificate_arn"
|
||||
# }
|
||||
|
||||
# data "aws_route53_zone" "this" {
|
||||
# name = var.domain_name
|
||||
# }
|
||||
|
||||
############################################
|
||||
# FastAPI Lambda + API Gateway
|
||||
############################################
|
||||
|
|
|
|||
7
infrastructure/terraform/lambda/fast-api/outputs.tf
Normal file
7
infrastructure/terraform/lambda/fast-api/outputs.tf
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
output "domain_name" {
|
||||
value = module.fastapi.domain_name
|
||||
}
|
||||
|
||||
output "api_endpoint" {
|
||||
value = module.fastapi.api_endpoint
|
||||
}
|
||||
|
|
@ -98,9 +98,7 @@ resource "aws_cloudfront_distribution" "this" {
|
|||
##########################################
|
||||
|
||||
viewer_certificate {
|
||||
acm_certificate_arn = var.acm_certificate_arn
|
||||
ssl_support_method = "sni-only"
|
||||
cloudfront_default_certificate = var.acm_certificate_arn == null
|
||||
cloudfront_default_certificate = true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ variable "origins" {
|
|||
origin_type = string # "s3" or "api"
|
||||
origin_domain_name = string
|
||||
origin_id = string
|
||||
|
||||
|
||||
bucket_id = optional(string)
|
||||
bucket_arn = optional(string)
|
||||
}))
|
||||
|
|
@ -11,9 +11,4 @@ variable "origins" {
|
|||
|
||||
variable "aliases" {
|
||||
type = list(string)
|
||||
}
|
||||
|
||||
variable "acm_certificate_arn" {
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue