Skip to content

Commit

Permalink
Generalizes code to publish to EKS
Browse files Browse the repository at this point in the history
Refs #983
  • Loading branch information
shawncrawley committed Nov 27, 2024
1 parent a4d2917 commit 9064b3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Core/LAMBDA/viz_functions/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ variable "five_minute_trigger" {
})
}

variable "egis_host" {
type = string
}

########################################################################################################################################
########################################################################################################################################

locals {
egis_host = var.environment == "prod" ? "https://maps.water.noaa.gov/portal" : var.environment == "uat" ? "https://maps-staging.water.noaa.gov/portal" : var.environment == "ti" ? "https://maps-testing.water.noaa.gov/portal" : "https://hydrovis-dev.nwc.nws.noaa.gov/portal"
service_suffix = var.environment == "prod" ? "" : var.environment == "uat" ? "_beta" : var.environment == "ti" ? "_alpha" : "_gamma"
raster_output_prefix = "processing_outputs"
ecr_repository_image_tag = "latest"
Expand Down Expand Up @@ -835,7 +838,7 @@ resource "aws_lambda_function" "viz_publish_service" {
environment {
variables = {
GIS_PASSWORD = var.egis_portal_password
GIS_HOST = local.egis_host
GIS_HOST = var.egis_host
GIS_USERNAME = "hydrovis.proc"
PUBLISH_FLAG_BUCKET = var.python_preprocessing_bucket
S3_BUCKET = var.viz_authoritative_bucket
Expand Down
1 change: 1 addition & 0 deletions Core/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ module "viz-lambda-functions" {
default_tags = local.env.tags
nwm_dataflow_version = local.env.nwm_dataflow_version
five_minute_trigger = module.eventbridge.five_minute_eventbridge
egis_host = local.env.egis_host
}

module "viz-step-functions" {
Expand Down

0 comments on commit 9064b3e

Please sign in to comment.