Skip to content

Commit

Permalink
Data load completed
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User committed Dec 10, 2024
2 parents 44dc50b + dadf9ef commit ad0f8c1
Show file tree
Hide file tree
Showing 13 changed files with 8,968 additions and 45 deletions.
10 changes: 10 additions & 0 deletions Core/EC2/Ingest/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
configuration_aliases = [ aws.sns, aws.no_tags]
}
}
}

###############
## VARIABLES ##
###############
Expand Down Expand Up @@ -84,6 +93,7 @@ locals {
###############

resource "aws_s3_object" "hml_ingester" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/owp-hml-ingester.tar.gz"
source = "${path.module}/../../../Source/Ingest/owp-hml-ingester.tar.gz"
Expand Down
12 changes: 12 additions & 0 deletions Core/EC2/RDSBastion/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
configuration_aliases = [ aws.sns, aws.no_tags]
}
}
}

###############
## VARIABLES ##
###############
Expand Down Expand Up @@ -220,20 +229,23 @@ resource "aws_instance" "rds-bastion" {
###############

resource "aws_s3_object" "postgis_setup" {
provider = aws.no_tags
bucket = var.data_deployment_bucket
key = "terraform_artifacts/${path.module}/postgis_setup.sql"
source = "${path.module}/data/postgis_setup.sql"
source_hash = filemd5("${path.module}/data/postgis_setup.sql")
}

resource "aws_s3_object" "ingest_rfcfcst_base" {
provider = aws.no_tags
bucket = var.data_deployment_bucket
key = "terraform_artifacts/${path.module}/ingest/rfcfcst_base.sql.gz"
source = "${path.module}/data/ingest/rfcfcst_base.sql.gz"
source_hash = filemd5("${path.module}/data/ingest/rfcfcst_base.sql.gz")
}

resource "aws_s3_object" "ingest_ingest_users" {
provider = aws.no_tags
bucket = var.data_deployment_bucket
key = "terraform_artifacts/${path.module}/ingest/ingest_users.sql"
content = templatefile("${path.module}/data/ingest/ingest_users.sql.tftpl", {
Expand Down
10 changes: 10 additions & 0 deletions Core/EC2/rnr/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
configuration_aliases = [ aws.sns, aws.no_tags]
}
}
}

###############
## VARIABLES ##
###############
Expand Down Expand Up @@ -95,6 +104,7 @@ locals {
###############

resource "aws_s3_object" "replace_route" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/owp-viz-replace-route.tgz"
source = "${path.module}/../../../Source/RnR/owp-viz-replace-route.tgz"
Expand Down
10 changes: 10 additions & 0 deletions Core/EC2/viz/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
configuration_aliases = [ aws.sns, aws.no_tags]
}
}
}

#######################
## DYNAMIC VARIABLES ##
#######################
Expand Down Expand Up @@ -171,6 +180,7 @@ data "aws_ami" "windows" {
################

resource "aws_s3_object" "setup_upload" {
provider = aws.no_tags
bucket = var.deployment_data_bucket
key = "terraform_artifacts/${path.module}/scripts/viz_ec2_setup.ps1"
source = "${path.module}/scripts/viz_ec2_setup.ps1"
Expand Down
2 changes: 1 addition & 1 deletion Core/LAMBDA/ingest_functions/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
configuration_aliases = [ aws.sns ]
configuration_aliases = [ aws.sns, aws.no_tags]
}
}
}
Expand Down
19 changes: 19 additions & 0 deletions Core/LAMBDA/layers/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
configuration_aliases = [ aws.sns, aws.no_tags]
}
}
}

variable "environment" {
description = "Hydrovis environment"
type = string
Expand All @@ -23,6 +32,7 @@ variable "deployment_bucket" {
######################

resource "aws_s3_object" "es_logging" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/es_logging.zip"
source = "${path.module}/es_logging.zip"
Expand Down Expand Up @@ -52,6 +62,7 @@ data "archive_file" "viz_lambda_shared_funcs_zip" {
}

resource "aws_s3_object" "viz_lambda_shared_funcs_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_lambda_shared_funcs.zip"
source = data.archive_file.viz_lambda_shared_funcs_zip.output_path
Expand All @@ -75,6 +86,7 @@ resource "aws_lambda_layer_version" "viz_lambda_shared_funcs" {
#############################

resource "aws_s3_object" "arcgis_python_api" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/arcgis_python_api.zip"
source = "${path.module}/arcgis_python_api.zip"
Expand All @@ -98,6 +110,7 @@ resource "aws_lambda_layer_version" "arcgis_python_api" {
##################

resource "aws_s3_object" "pandas" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/pandas.zip"
source = "${path.module}/pandas.zip"
Expand All @@ -122,6 +135,7 @@ resource "aws_lambda_layer_version" "pandas" {


resource "aws_s3_object" "geopandas" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/geopandas.zip"
source = "${path.module}/geopandas.zip"
Expand All @@ -145,6 +159,7 @@ resource "aws_lambda_layer_version" "geopandas" {
##################################

resource "aws_s3_object" "psycopg2_sqlalchemy" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/psycopg2_sqlalchemy.zip"
source = "${path.module}/psycopg2_sqlalchemy.zip"
Expand All @@ -168,6 +183,7 @@ resource "aws_lambda_layer_version" "psycopg2_sqlalchemy" {
##########################

resource "aws_s3_object" "huc_proc_combo" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/huc_proc_combo.zip"
source = "${path.module}/huc_proc_combo.zip"
Expand All @@ -191,6 +207,7 @@ resource "aws_lambda_layer_version" "huc_proc_combo" {
##################

resource "aws_s3_object" "xarray" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/xarray.zip"
source = "${path.module}/xarray.zip"
Expand All @@ -214,6 +231,7 @@ resource "aws_lambda_layer_version" "xarray" {
################

resource "aws_s3_object" "pika" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/pika.zip"
source = "${path.module}/pika.zip"
Expand All @@ -237,6 +255,7 @@ resource "aws_lambda_layer_version" "pika" {
####################

resource "aws_s3_object" "requests" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/requests.zip"
source = "${path.module}/requests.zip"
Expand Down
3 changes: 2 additions & 1 deletion Core/LAMBDA/rnr_functions/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
configuration_aliases = [ aws.sns ]
configuration_aliases = [ aws.sns, aws.no_tags]
}
}
}
Expand Down Expand Up @@ -80,6 +80,7 @@ data "archive_file" "rnr_domain_generator_zip" {
}

resource "aws_s3_object" "rnr_domain_generator_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/rnr_domain_generator.zip"
source = data.archive_file.rnr_domain_generator_zip.output_path
Expand Down
18 changes: 17 additions & 1 deletion Core/LAMBDA/viz_functions/image_based/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
configuration_aliases = [ aws.sns, aws.no_tags]
}
}
}

variable "environment" {
type = string
}
Expand Down Expand Up @@ -129,6 +138,7 @@ data "archive_file" "raster_processing_zip" {
}

resource "aws_s3_object" "raster_processing_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_raster_processing.zip"
source = data.archive_file.raster_processing_zip.output_path
Expand Down Expand Up @@ -253,6 +263,7 @@ data "archive_file" "optimize_rasters_zip" {
}

resource "aws_s3_object" "optimize_rasters_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_optimize_rasters.zip"
source = data.archive_file.optimize_rasters_zip.output_path
Expand Down Expand Up @@ -396,6 +407,7 @@ data "archive_file" "hand_fim_processing_zip" {
}

resource "aws_s3_object" "hand_fim_processing_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_hand_fim_processing.zip"
source = data.archive_file.hand_fim_processing_zip.output_path
Expand Down Expand Up @@ -496,7 +508,11 @@ data "aws_lambda_function" "viz_hand_fim_processing" {

module "schism-fim" {
source = "./viz_schism_fim_processing"

providers = {
aws = aws
aws.sns = aws.sns
aws.no_tags = aws.no_tags
}
environment = var.environment
account_id = var.account_id
region = var.region
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
configuration_aliases = [ aws.sns, aws.no_tags]
}
}
}

variable "environment" {
type = string
}
Expand Down Expand Up @@ -87,6 +96,7 @@ data "archive_file" "schism_processing_zip" {
}

resource "aws_s3_object" "schism_processing_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_schism_fim_processing.zip"
source = data.archive_file.schism_processing_zip.output_path
Expand Down
18 changes: 16 additions & 2 deletions Core/LAMBDA/viz_functions/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
configuration_aliases = [ aws.sns ]
configuration_aliases = [ aws.sns, aws.no_tags]
}
}
}
Expand Down Expand Up @@ -239,6 +239,7 @@ data "archive_file" "egis_health_checker_zip" {
}

resource "aws_s3_object" "egis_health_checker_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/egis_health_checker.zip"
source = data.archive_file.egis_health_checker_zip.output_path
Expand Down Expand Up @@ -329,6 +330,7 @@ data "archive_file" "python_preprocessing_zip" {
}

resource "aws_s3_object" "python_preprocessing_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_python_preprocessing.zip"
source = data.archive_file.python_preprocessing_zip.output_path
Expand Down Expand Up @@ -449,6 +451,7 @@ data "archive_file" "initialize_pipeline_zip" {
}

resource "aws_s3_object" "initialize_pipeline_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_initialize_pipeline.zip"
source = data.archive_file.initialize_pipeline_zip.output_path
Expand Down Expand Up @@ -550,6 +553,7 @@ data "archive_file" "db_postprocess_sql_zip" {
}

resource "aws_s3_object" "db_postprocess_sql_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_db_postprocess_sql.zip"
source = data.archive_file.db_postprocess_sql_zip.output_path
Expand Down Expand Up @@ -612,6 +616,7 @@ data "archive_file" "db_ingest_zip" {
}

resource "aws_s3_object" "db_ingest_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_db_ingest.zip"
source = data.archive_file.db_ingest_zip.output_path
Expand Down Expand Up @@ -674,6 +679,7 @@ data "archive_file" "fim_data_prep_zip" {
}

resource "aws_s3_object" "fim_data_prep_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_fim_data_prep.zip"
source = data.archive_file.fim_data_prep_zip.output_path
Expand Down Expand Up @@ -743,6 +749,7 @@ data "archive_file" "update_egis_data_zip" {
}

resource "aws_s3_object" "update_egis_data_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_update_egis_data.zip"
source = data.archive_file.update_egis_data_zip.output_path
Expand Down Expand Up @@ -809,13 +816,15 @@ data "archive_file" "publish_service_zip" {
}

resource "aws_s3_object" "publish_service_zip_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_publish_service.zip"
source = data.archive_file.publish_service_zip.output_path
source_hash = filemd5(data.archive_file.publish_service_zip.output_path)
}

resource "aws_s3_object" "viz_publish_mapx_files" {
provider = aws.no_tags
for_each = fileset("${path.module}/viz_publish_service/services", "**/*.mapx")
bucket = var.deployment_bucket
key = "viz_mapx/${reverse(split("/",each.key))[0]}"
Expand Down Expand Up @@ -897,6 +906,7 @@ data "archive_file" "viz_test_wrds_db_zip" {
}

resource "aws_s3_object" "viz_test_wrds_db_upload" {
provider = aws.no_tags
bucket = var.deployment_bucket
key = "terraform_artifacts/${path.module}/viz_update_egis_data.zip"
source = data.archive_file.viz_test_wrds_db_zip.output_path
Expand Down Expand Up @@ -946,7 +956,11 @@ resource "aws_lambda_function" "viz_test_wrds_db" {

module "image-based-lambdas" {
source = "./image_based"

providers = {
aws = aws
aws.sns = aws.sns
aws.no_tags = aws.no_tags
}
environment = var.environment
account_id = var.account_id
region = var.region
Expand Down
Loading

0 comments on commit ad0f8c1

Please sign in to comment.