Skip to content
Draft
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 packages/test-data/payloads/amsr2/discover.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"id": "AMSR2",
"meta": {
"name": "AMSR2",
"version": "1",
"version": "1.0",
"granuleId": "^GW1AM2_[\\d]{12}_[\\d]{3}B_L1S[N|G]RTBR_[\\d]{7}$",
"sampleFileName": "GW1AM2_201708071110_057B_L1SNRTBR_2220220.h5.gz",
"granuleIdExtraction": "^(GW1AM2_(.*))\\.h5\\.gz$",
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/collections/CSLC_S1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "OPERA_L2_CSLC-S1_V1",
"version": "1",
"version": "1.0",
"duplicateHandling": "replace",
"process": "CSLC",
"url_path": "OPERA_L2_CSLC-S1/{granule.granuleId}/",
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/collections/DISP_S1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "OPERA_L3_DISP-S1_V1",
"version": "1",
"version": "1.0",
"duplicateHandling": "replace",
"process": "DISP",
"url_path": "OPERA_L3_DISP-S1_V1/{granule.granuleId}/",
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/collections/DISP_S1_STACK.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "OPERA_L3_DISP-S1_STACK_V1",
"version": "1",
"version": "1.0",
"duplicateHandling": "replace",
"process": "DISP-STACK",
"url_path": "OPERA_L3_DISP-S1_STACK_V1/{granule.granuleId}/",
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/collections/DISP_S1_STATIC.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "OPERA_L3_DISP-S1-STATIC_V1",
"version": "1",
"version": "1.0",
"duplicateHandling": "replace",
"process": "DISP-STATIC",
"url_path": "OPERA_L3_DISP-S1-STATIC_V1/{granule.granuleId}/",
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/collections/DIST_ALERT_S1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "OPERA_L3_DIST-ALERT-S1_V1",
"version": "1",
"version": "1.0",
"duplicateHandling": "replace",
"process": "DIST",
"url_path": "OPERA_L3_DIST-ALERT-S1_V1/{granule.granuleId}/",
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/collections/TROPO_ZENITH.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "OPERA_L4_TROPO-ZENITH_V1",
"version": "1",
"version": "1.0",
"duplicateHandling": "replace",
"process": "TROPO",
"url_path": "OPERA_L4_TROPO-ZENITH_V1/{granule.granuleId}/",
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ data "aws_region" "current" {}

data "terraform_remote_state" "cumulus" {
backend = "s3"
workspace = var.PREFIX
workspace = "default"
config = local.cumulus_remote_state_config
}

Expand Down
18 changes: 9 additions & 9 deletions tf-modules/opex-workflow/local.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ locals {
account_id = data.aws_caller_identity.current.account_id
region = data.aws_region.current.name
module_prefix = "${var.PREFIX}-opera"
system_bucket = "${var.PREFIX}-internal"
system_bucket = "${var.BUCKET_PREFIX}-internal"
default_tags = {
Deployment = var.PREFIX
}
Expand All @@ -15,8 +15,8 @@ locals {
distribution_url = "" # Do we need this

cumulus_remote_state_config = {
bucket = "${var.PREFIX}-tf-state" # Do I want to add the last 4 digits of the AWS Account?
key = "cumulus/terraform.tfstate"
bucket = "cumulus-sit-tfstate" # Do I want to add the last 4 digits of the AWS Account?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may just make this a var that is passed in.

key = "nsidc-cumulus-prod/cumulus/terraform.tfstate"
region = data.aws_region.current.name
}

Expand Down Expand Up @@ -73,10 +73,10 @@ locals {
}

# Bucket types. These lists should not overlap
standard_bucket_names = toset([for n, cfg in local.bucket_config : "${var.PREFIX}-${n}" if cfg.type == "standard"])
protected_bucket_names = toset([for n, cfg in local.bucket_config : "${var.PREFIX}-${n}" if cfg.type == "protected"])
public_bucket_names = toset([for n, cfg in local.bucket_config : "${var.PREFIX}-${n}" if cfg.type == "public"])
workflow_bucket_names = toset([for n, cfg in local.bucket_config : "${var.PREFIX}-${n}" if cfg.type == "workflow"])
standard_bucket_names = toset([for n, cfg in local.bucket_config : "${var.BUCKET_PREFIX}-${n}" if cfg.type == "standard"])
protected_bucket_names = toset([for n, cfg in local.bucket_config : "${var.BUCKET_PREFIX}-${n}" if cfg.type == "protected"])
public_bucket_names = toset([for n, cfg in local.bucket_config : "${var.BUCKET_PREFIX}-${n}" if cfg.type == "public"])
workflow_bucket_names = toset([for n, cfg in local.bucket_config : "${var.BUCKET_PREFIX}-${n}" if cfg.type == "workflow"])

dar_yes_tags = {
DAR = "YES"
Expand All @@ -87,13 +87,13 @@ locals {

base_bucket_map = {
for n, cfg in local.bucket_config : n => {
name = "${var.PREFIX}-${n}"
name = "${var.BUCKET_PREFIX}-${n}"
type = cfg.type == "standard" ? n : cfg.type
}
}
internal_bucket_map = {
internal = {
name = "${var.PREFIX}-internal"
name = "${var.BUCKET_PREFIX}-internal"
type = "internal"
}
}
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/rules/CSLC_S1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OPERA_L2_CSLC-S1_V1",
"version": "1.0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/rules/CSLC_S1_CALVAL.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OPERA_L2_CSLC-S1_CALVAL_V1",
"version": "1.0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/rules/CSLC_S1_STATIC.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OPERA_L2_CSLC-S1-STATIC_V1",
"version": "1.0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/rules/CSLC_S1_STATIC_CALVAL.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OPERA_L2_CSLC-S1-STATIC_CALVAL_V1",
"version": "1.0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
4 changes: 2 additions & 2 deletions tf-modules/opex-workflow/rules/DISP_S1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"state": "ENABLED",
"collection": {
"name": "OPERA_L3_DISP-S1_V1",
"version": "1"
"version": "1.0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/rules/DISP_S1_PROV.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OPERA_L3_DISP-S1_PROVISIONAL_V0",
"version": "0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
4 changes: 2 additions & 2 deletions tf-modules/opex-workflow/rules/DISP_S1_STATIC.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"state": "ENABLED",
"collection": {
"name": "OPERA_L3_DISP-S1-STATIC_V1",
"version": "1"
"version": "1.0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/rules/DISP_S1_STATIC_PROV.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OPERA_L3_DISP-S1-STATIC_PROVISIONAL_V0",
"version": "0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
4 changes: 2 additions & 2 deletions tf-modules/opex-workflow/rules/DIST_ALERT_S1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"state": "ENABLED",
"collection": {
"name": "OPERA_L3_DIST-ALERT-S1_V1",
"version": "1"
"version": "1.0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/rules/DIST_ALERT_S1_PROV.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OPERA_L3_DIST-ALERT-S1_PROVISIONAL_V0",
"version": "0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/rules/RTC_S1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OPERA_L2_RTC-S1_V1",
"version": "1.0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/rules/RTC_S1_CALVAL.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OPERA_L2_RTC-S1_CALVAL_V1",
"version": "1.0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/rules/RTC_S1_STATIC.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OPERA_L2_RTC-S1-STATIC_V1",
"version": "1.0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/rules/RTC_S1_STATIC_CALVAL.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OPERA_L2_RTC-S1-STATIC_CALVAL_V1",
"version": "1.0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
4 changes: 2 additions & 2 deletions tf-modules/opex-workflow/rules/TROPO_ZENITH.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"state": "ENABLED",
"collection": {
"name": "OPERA_L4_TROPO-ZENITH_V1",
"version": "1"
"version": "1.0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/rules/TROPO_ZENITH_PROV.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OPERA_L4_TROPO-ZENITH_PROVISIONAL_V0",
"version": "0"
},
"provider": "ASFDAAC",
"provider": "ASF-TESTCNM",
"rule": {
"type": "sqs",
"value": "https://sqs.$AWS_REGION.amazonaws.com/$AWS_ACCOUNT_ID/$PREFIX-opera-workflow-queue"
Expand Down
5 changes: 3 additions & 2 deletions tf-modules/opex-workflow/testcnm.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[default]
test_bucket = opex-e2e-test-bucket
stack_name = dms-opex-sbx
profile = opex-sit
stack_name = nsidc-cumulus-prod
cnm_ingest_queue = opera-workflow-queue
cnm_response_queue = opera-mock-response-queue
provider = JPL-OPERA
provider = ASF-TESTCNM
trace = TEST
7 changes: 6 additions & 1 deletion tf-modules/opex-workflow/variables.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
variable "PREFIX" {
type = string
default = "dms-opex-sbx" # TODO: Update
default = "nsidc-cumulus-prod"
}

variable "BUCKET_PREFIX" {
type = string
default = "opex-nsidc-cumulus"
}

variable "DIST_DIR" {
Expand Down
2 changes: 1 addition & 1 deletion tf-modules/opex-workflow/workflow.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "example_workflow" {
source = "https://github.com/nasa/cumulus/releases/download/v21.0.1/terraform-aws-cumulus-workflow.zip" # Confirm which version We are on
source = "../../tf-modules/opex-workflow"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
source = "../../tf-modules/opex-workflow"
source = "../../tf-modules/workflow"


prefix = var.PREFIX
name = "OPERAWorkflow"
Expand Down