-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #214 --------- Co-authored-by: Kris Stanton <[email protected]>
- Loading branch information
1 parent
83ed287
commit 8d8aaa8
Showing
11 changed files
with
189 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: terraspace-fmt | ||
name: Terraspace Format | ||
entry: bin/pre-commit-terraspace-fmt.sh | ||
language: system | ||
pass_filenames: false | ||
files: \.tf(vars)?$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
data "aws_secretsmanager_secret" "rds_cluster_admin_db_login_secret" { | ||
arn = "<%= unquoted(output('rds-cluster.admin_db_login_secret_arn')) %>" | ||
} | ||
|
||
data "aws_secretsmanager_secret_version" "rds_cluster_admin_db_login_secret_version" { | ||
secret_id = data.aws_secretsmanager_secret.rds_cluster_admin_db_login_secret.id | ||
} | ||
|
||
data "aws_secretsmanager_secret" "rds_cluster_user_credentials_secret" { | ||
arn = "<%= unquoted(output('rds-cluster.user_credentials_secret_arn')) %>" | ||
} | ||
|
||
data "aws_secretsmanager_secret_version" "rds_cluster_user_credentials_secret_version" { | ||
secret_id = data.aws_secretsmanager_secret.rds_cluster_user_credentials_secret.id | ||
} | ||
|
||
module "orca" { | ||
source = "https://github.com/nasa/cumulus-orca/releases/download/v6.0.3/cumulus-orca-terraform.zip" | ||
#-------------------------- | ||
# Cumulus variables | ||
#-------------------------- | ||
# REQUIRED | ||
buckets = var.buckets | ||
lambda_subnet_ids = module.vpc.subnets.ids | ||
permissions_boundary_arn = local.permissions_boundary_arn | ||
prefix = var.prefix | ||
system_bucket = var.system_bucket | ||
vpc_id = module.vpc.vpc_id | ||
workflow_config = module.cumulus.workflow_config | ||
|
||
# OPTIONAL | ||
tags = var.tags | ||
|
||
#-------------------------- | ||
# ORCA variables | ||
#-------------------------- | ||
# REQUIRED | ||
# | ||
db_host_endpoint = local.rds_endpoint | ||
db_admin_username = "postgres" | ||
db_admin_password = jsondecode(data.aws_secretsmanager_secret_version.rds_cluster_admin_db_login_secret_version.secret_string)["password"] | ||
db_user_password = jsondecode(data.aws_secretsmanager_secret_version.rds_cluster_user_credentials_secret_version.secret_string)["password"] | ||
dlq_subscription_email = var.orca_dlq_subscription_email | ||
orca_default_bucket = var.buckets.orca_default.name | ||
orca_reports_bucket_name = var.buckets.orca_reports.name | ||
rds_security_group_id = local.rds_security_group | ||
s3_access_key = data.aws_ssm_parameter.orca_s3_access_key.value | ||
s3_secret_key = data.aws_ssm_parameter.orca_s3_secret_key.value | ||
|
||
# OPTIONAL | ||
|
||
# db_admin_username = "postgres" | ||
# default_multipart_chunksize_mb = 250 | ||
# metadata_queue_message_retention_time = 777600 | ||
# orca_default_recovery_type = "Standard" | ||
# orca_default_storage_class = "GLACIER" | ||
# orca_delete_old_reconcile_jobs_frequency_cron = "cron(0 0 ? * SUN *)" | ||
# orca_ingest_lambda_memory_size = 2240 | ||
# orca_ingest_lambda_timeout = 600 | ||
# orca_internal_reconciliation_expiration_days = 30 | ||
# orca_reconciliation_lambda_memory_size = 128 | ||
# orca_reconciliation_lambda_timeout = 720 | ||
# orca_recovery_buckets = [] | ||
# orca_recovery_complete_filter_prefix = "" | ||
# orca_recovery_expiration_days = 5 | ||
# orca_recovery_lambda_memory_size = 128 | ||
# orca_recovery_lambda_timeout = 720 | ||
# orca_recovery_retry_limit = 3 | ||
# orca_recovery_retry_interval = 1 | ||
# orca_recovery_retry_backoff = 2 | ||
# s3_inventory_queue_message_retention_time_seconds = 432000 | ||
# s3_report_frequency = "Daily" | ||
# sqs_delay_time_seconds = 0 | ||
# sqs_maximum_message_size = 262144 | ||
# staged_recovery_queue_message_retention_time_seconds = 432000 | ||
# status_update_queue_message_retention_time_seconds = 777600 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,20 @@ | |
#<% depends_on("rds-cluster") %> | ||
|
||
cmr_environment = "UAT" | ||
orca_dlq_subscription_email = "[email protected]" | ||
|
||
system_bucket = "<%= bucket('internal') %>" | ||
|
||
buckets = { | ||
# https://nasa.github.io/cumulus-orca/docs/developer/deployment-guide/deployment-s3-bucket/ | ||
orca_reports = { | ||
name = "<%= %Q[csda-cumulus-cba-#{Terraspace.env == 'prod' ? 'prod' : 'uat'}-orca-reports] %>" | ||
type = "orca" | ||
} | ||
orca_default = { | ||
name = "<%= %Q[csda-cumulus-cba-#{Terraspace.env == 'prod' ? 'prod' : 'uat'}-orca-archive] %>" | ||
type = "orca" | ||
} | ||
internal = { | ||
name = "<%= bucket('internal') %>" | ||
type = "internal" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This is intended to be used as a pre-commit hook, and will thus fail if any | ||
# `*.tf` files were reformatted so that pre-commit fails. | ||
! make fmt | grep "\.tf\s*$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters