address PR

This commit is contained in:
Daniel Roth 2026-03-13 11:16:41 +00:00
parent 33406ff678
commit ddcfa75a03
7 changed files with 11 additions and 23 deletions

View file

@ -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 }}

View file

@ -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 ----

View file

@ -1,7 +1,3 @@
variable "stage" {
type = string
}
variable "domain_name" {
type = string
}

View file

@ -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
############################################

View file

@ -0,0 +1,7 @@
output "domain_name" {
value = module.fastapi.domain_name
}
output "api_endpoint" {
value = module.fastapi.api_endpoint
}

View file

@ -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
}
}

View file

@ -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
}