Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Issue 548 ] Production Cert for Simpler Domain #557

Merged
merged 8 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/public/locales/en/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Index": {
"page_title": "beta.grants.gov",
"page_title": "simpler.grants.gov",
"meta_description": "A one‑stop shop for all federal discretionary funding to make it easy for you to discover, understand, and apply for opportunities.",
"alert_title": "Beta.grants.gov is a work in progress.",
"alert": "To search for funding opportunities and apply, go to <LinkToGrants>www.grants.gov</LinkToGrants>.",
Expand Down
1 change: 1 addition & 0 deletions infra/frontend/service/dev.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ environment_name = "dev"
tfstate_bucket = "grants-equity-315341936575-us-east-1-tf"
tfstate_key = "infra/frontend/service/dev.tfstate"
region = "us-east-1"
domain = "beta.grants.gov"
1 change: 1 addition & 0 deletions infra/frontend/service/example.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ environment_name = "<ENVIRONMENT>"
tfstate_bucket = "<TF_STATE_BUCKET_NAME>"
tfstate_key = "<TF_STATE_KEY>"
region = "<REGION>"
domain = "<WEBSITE.DOMAIN.GOV>"
9 changes: 4 additions & 5 deletions infra/frontend/service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ data "aws_ssm_parameter" "incident_management_service_integration_url" {
name = local.incident_management_service_integration_config.integration_url_param_name
}

data "aws_acm_certificate" "frontend_cert" {
domain = "beta.grants.gov"
data "aws_acm_certificate" "cert" {
count = var.domain != null ? 1 : 0
domain = var.domain
}

output "environment_name" {
Expand All @@ -104,9 +105,7 @@ module "service" {
vpc_id = data.aws_vpc.default.id
subnet_ids = data.aws_subnets.default.ids
enable_autoscaling = module.app_config.enable_autoscaling
# TODO: Reroute SSL to production environment
# To temporarily avoid issues in production & Terratest: Check if environment is "dev" and workspace is "default"
cert_arn = var.environment_name == "dev" && terraform.workspace == "default" ? data.aws_acm_certificate.frontend_cert.arn : null
cert_arn = var.domain != null ? data.aws_acm_certificate.cert[0].arn : null

db_vars = module.app_config.has_database ? {
security_group_ids = data.aws_rds_cluster.db_cluster[0].vpc_security_group_ids
Expand Down
1 change: 1 addition & 0 deletions infra/frontend/service/prod.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ environment_name = "prod"
tfstate_bucket = "grants-equity-315341936575-us-east-1-tf"
tfstate_key = "infra/frontend/service/prod.tfstate"
region = "us-east-1"
domain = "simpler.grants.gov"
6 changes: 6 additions & 0 deletions infra/frontend/service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ variable "image_tag" {
description = "image tag to deploy to the environment"
default = null
}

variable "domain" {
type = string
description = "DNS domain of the website managed by HHS"
default = null
}