Skip to content

Commit 12fee8a

Browse files
authored
Updated terraform lock file and changelog (#128)
* Updated terraform lock file and changelog * Added terraform lock change * Reverting terraform lock to last working version * Fully resolve merge issues in terraform code * Update deprecated key name (aws_region) * Updated aws provider version and key syntax to match cumulus * Reverted aws region syntax since we use aws 5.100.0
1 parent 3eb5971 commit 12fee8a

10 files changed

Lines changed: 47 additions & 75 deletions

File tree

.github/workflows/cicd-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ on:
2929
env:
3030
POETRY_VERSION: "1.8.2"
3131
PYTHON_VERSION: "3.10"
32-
TERRAFORM_VERSION: "1.12.2"
32+
TERRAFORM_VERSION: "1.14.0"
3333
REGISTRY: ghcr.io
3434
jobs:
3535
build:

CHANGELOG.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99
### Added
10-
- [issues/69](https://github.com/podaac/bignbit/issues/69): Added support for other projections, with the default being EPSG:4326. The projection is read from the `outputCrs` keyword in the dataset config. This likely needs refinement to account for cases when we have multiple projections per dataset.
1110
- [issues/97](https://github.com/podaac/bignbit/issues/97): Added the "bignbit" label to all `harmony-py` requests.
1211
### Changed
13-
- [issues/62](https://github.com/podaac/bignbit/issues/62): The retry policy for querying Harmony job status is now configurable as module parameters. By default, it will query for job status every 20 seconds for a maximum of 15 attempts.
1412
### Deprecated
1513
### Removed
1614
### Fixed
17-
- [issues/91](https://github.com/podaac/bignbit/issues/91): Fixed bug where the CNM collection name sent to GIBS included '/' characters when dealing with certain variables. This caused processing errors in GIBS, all collection names will now replace '/' with '_' before being sent to GIBS.
18-
- [issues/89](https://github.com/podaac/bignbit/issues/89): Fixed bug where querying CMR for a collection could result in multiple results because collection version was not included in the query. Fix is to include the version in the CMR query, which will now return only one result.
19-
- [issues/96](https://github.com/podaac/bignbit/issues/96): Fixed bug causing GIBS responses to fail processing due to provider name containing an underscore `_` which collided with the delimiter used in CNM identifiers. The new delimiter for CNM identifier is now an exclamation mark `!`.
15+
- [issues/127] Merged 0.4.0 changes into develop, updated harmony-py version, fixed conflict in terraform lock file.
2016
### Security
2117

2218
## [0.4.0]

examples/cumulus-tf/.terraform.lock.hcl

Lines changed: 0 additions & 48 deletions
This file was deleted.

examples/cumulus-tf/fake_gitc.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "aws_sqs_queue" "gitc_input_deadletter" {
1919
content_based_deduplication = true
2020
redrive_allow_policy = jsonencode({
2121
redrivePermission = "byQueue",
22-
sourceQueueArns = ["arn:aws:sqs:${local.current_aws_region}:${local.account_id}:${local.ec2_resources_name}-fake-gitc-IN.fifo"]
22+
sourceQueueArns = ["arn:aws:sqs:${data.aws_region.current.name}:${local.account_id}:${local.ec2_resources_name}-fake-gitc-IN.fifo"]
2323
})
2424
}
2525

examples/cumulus-tf/iam_step.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ data "aws_iam_policy_document" "states_assume_role_policy" {
44
actions = ["sts:AssumeRole"]
55
principals {
66
type = "Service"
7-
identifiers = ["states.${local.current_aws_region}.amazonaws.com"]
7+
identifiers = ["states.${data.aws_region.current.name}.amazonaws.com"]
88
}
99
}
1010
}

examples/cumulus-tf/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ terraform {
22
required_providers {
33
aws = {
44
source = "hashicorp/aws"
5-
version = ">= 5.100, < 6.13.0"
5+
version = ">= 5.100, < 6.0.0"
66
}
77
null = {
88
source = "hashicorp/null"
9-
version = "~> 2.1"
9+
version = "~> 3.2.0"
1010
}
1111
}
1212
}

examples/cumulus-tf/variable.tf

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,28 @@ variable "lambda_container_image_uri" {
7979
variable "cma_version" {
8080
type = string
8181
default = "v2.0.4"
82-
}
82+
}
83+
84+
variable "harmony_job_status_interval_seconds" {
85+
type = number
86+
description = "Interval in seconds for checking Harmony job status"
87+
default = 20
88+
}
89+
90+
variable "harmony_job_status_max_attempts" {
91+
type = number
92+
description = "Maximum number of attempts to check Harmony job status"
93+
default = 15
94+
}
95+
96+
variable "harmony_job_status_backoff_rate" {
97+
type = number
98+
description = "Backoff rate for Harmony job status checks"
99+
default = 1.0
100+
}
101+
102+
variable "harmony_job_status_max_delay_seconds" {
103+
type = number
104+
description = "Maximum delay in seconds for Harmony job status checks"
105+
default = 20
106+
}

terraform/lambda_functions.tf

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ resource "aws_lambda_function" "get_dataset_configuration" {
8989
variables = {
9090
STACK_NAME = var.prefix
9191
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
92-
REGION = local.current_aws_region
92+
REGION = data.aws_region.current.name
9393
}
9494
}
9595

@@ -121,7 +121,7 @@ resource "aws_lambda_function" "get_granule_umm_json" {
121121
EDL_USER_SSM = var.edl_user_ssm
122122
EDL_PASS_SSM = var.edl_pass_ssm
123123
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
124-
REGION = local.current_aws_region
124+
REGION = data.aws_region.current.name
125125
}
126126
}
127127

@@ -153,7 +153,7 @@ resource "aws_lambda_function" "get_collection_concept_id" {
153153
EDL_USER_SSM = var.edl_user_ssm
154154
EDL_PASS_SSM = var.edl_pass_ssm
155155
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
156-
REGION = local.current_aws_region
156+
REGION = data.aws_region.current.name
157157
}
158158
}
159159

@@ -183,7 +183,7 @@ resource "aws_lambda_function" "identify_image_file" {
183183
variables = {
184184
STACK_NAME = var.prefix
185185
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
186-
REGION = local.current_aws_region
186+
REGION = data.aws_region.current.name
187187
}
188188
}
189189

@@ -213,7 +213,7 @@ resource "aws_lambda_function" "submit_harmony_job" {
213213
variables = {
214214
STACK_NAME = var.prefix
215215
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
216-
REGION = local.current_aws_region
216+
REGION = data.aws_region.current.name
217217
EDL_USER_SSM = var.edl_user_ssm
218218
EDL_PASS_SSM = var.edl_pass_ssm
219219
}
@@ -245,7 +245,7 @@ resource "aws_lambda_function" "generate_image_metadata" {
245245
variables = {
246246
STACK_NAME = var.prefix
247247
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
248-
REGION = local.current_aws_region
248+
REGION = data.aws_region.current.name
249249
}
250250
}
251251

@@ -275,7 +275,7 @@ resource "aws_lambda_function" "get_harmony_job_status" {
275275
variables = {
276276
STACK_NAME = var.prefix
277277
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
278-
REGION = local.current_aws_region
278+
REGION = data.aws_region.current.name
279279
EDL_USER_SSM = var.edl_user_ssm
280280
EDL_PASS_SSM = var.edl_pass_ssm
281281
}
@@ -307,7 +307,7 @@ resource "aws_lambda_function" "process_harmony_results" {
307307
variables = {
308308
STACK_NAME = var.prefix
309309
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
310-
REGION = local.current_aws_region
310+
REGION = data.aws_region.current.name
311311
EDL_USER_SSM = var.edl_user_ssm
312312
EDL_PASS_SSM = var.edl_pass_ssm
313313
}
@@ -339,7 +339,7 @@ resource "aws_lambda_function" "apply_opera_hls_treatment" {
339339
variables = {
340340
STACK_NAME = var.prefix
341341
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
342-
REGION = local.current_aws_region
342+
REGION = data.aws_region.current.name
343343
EDL_USER_SSM = var.edl_user_ssm
344344
EDL_PASS_SSM = var.edl_pass_ssm
345345
}
@@ -374,7 +374,7 @@ resource "aws_lambda_function" "build_image_sets" {
374374
variables = {
375375
STACK_NAME = local.aws_resources_name
376376
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
377-
REGION = local.current_aws_region
377+
REGION = data.aws_region.current.name
378378
GIBS_REGION = var.gibs_region
379379
GIBS_SQS_URL = "https://sqs.${var.gibs_region}.amazonaws.com/${var.gibs_account_id}/${var.gibs_queue_name}"
380380
}
@@ -406,7 +406,7 @@ resource "aws_lambda_function" "send_to_gitc" {
406406
variables = {
407407
STACK_NAME = local.aws_resources_name
408408
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
409-
REGION = local.current_aws_region
409+
REGION = data.aws_region.current.name
410410
GIBS_REGION = var.gibs_region
411411
GIBS_SQS_URL = "https://sqs.${var.gibs_region}.amazonaws.com/${var.gibs_account_id}/${var.gibs_queue_name}"
412412
GIBS_RESPONSE_TOPIC_ARN = aws_sns_topic.gibs_response_topic.arn
@@ -440,7 +440,7 @@ resource "aws_lambda_function" "handle_gitc_response" {
440440
variables = {
441441
STACK_NAME = local.aws_resources_name
442442
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
443-
REGION = local.current_aws_region
443+
REGION = data.aws_region.current.name
444444
BIGNBIT_AUDIT_BUCKET_NAME = var.bignbit_audit_bucket
445445
BIGNBIT_AUDIT_PATH_NAME = var.bignbit_audit_path
446446
CMR_ENVIRONMENT = local.cmr_environment
@@ -475,7 +475,7 @@ resource "aws_lambda_function" "save_cnm_message" {
475475
variables = {
476476
STACK_NAME = local.aws_resources_name
477477
CUMULUS_MESSAGE_ADAPTER_DIR = "/opt/"
478-
REGION = local.current_aws_region
478+
REGION = data.aws_region.current.name
479479
}
480480
}
481481

terraform/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
aws = {
44
source = "hashicorp/aws"
5-
version = ">= 5.100, < 6.13.0"
5+
version = ">= 5.100, < 6.0.0"
66
}
77
null = {
88
source = "hashicorp/null"

terraform/sqs_sns.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ resource "aws_sqs_queue" "gibs_response_deadletter" {
4242
redrive_allow_policy = jsonencode({
4343
redrivePermission = "byQueue",
4444
# Cannot use reference to aws_sqs_queue.gibs_response_queue.arn because it causes a cycle https://github.com/hashicorp/terraform-provider-aws/issues/22577
45-
sourceQueueArns = ["arn:aws:sqs:${local.current_aws_region}:${local.account_id}:${local.aws_resources_name}-gibs-response-queue"]
45+
sourceQueueArns = ["arn:aws:sqs:${data.aws_region.current.name}:${local.account_id}:${local.aws_resources_name}-gibs-response-queue"]
4646
})
4747
}
4848

@@ -132,7 +132,7 @@ data "aws_iam_policy_document" "gibs_request_queue_policy" {
132132
"sqs:GetQueueUrl",
133133
"sqs:GetQueueAttributes",
134134
]
135-
resources = ["arn:aws:sqs:${local.current_aws_region}:${data.aws_caller_identity.current.account_id}:*",
135+
resources = ["arn:aws:sqs:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:*",
136136
"arn:aws:sqs:${var.gibs_region}:${var.gibs_account_id}:${var.gibs_queue_name}"]
137137
}
138138
}

0 commit comments

Comments
 (0)