From 2d959c0e03b9e49340648fc8276bed23b19a2150 Mon Sep 17 00:00:00 2001 From: "Yen, David (398B-Affiliate)" Date: Tue, 20 Apr 2021 14:59:08 -0700 Subject: [PATCH 1/2] remove log2elasticsearch lambda reference and replaced with optional log_destination_arn --- CHANGELOG.md | 17 +++++++++++++++++ README.md | 3 ++- main.tf | 2 +- modules/dmrpp_service/main.tf | 10 +++++----- modules/dmrpp_service/variables.tf | 6 +++++- variables.tf | 6 +++++- 6 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a98f47f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,17 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] - xxxx-xx-xx + +### Added +### Changed +- **PODAAC-3366** + - Modify DMRPP to be cumulus 7.x compliant. +### Deprecated +### Removed +### Fixed +### Security diff --git a/README.md b/README.md index 398261c..db7685a 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,6 @@ module "dmrpp-generator" { // Required parameters source = "https://github.com/ghrcdaac/dmrpp-generator/releases/download//dmrpp-generator.zip" cluster_arn = module.cumulus.ecs_cluster_arn - log2elasticsearch_lambda_function_arn = module.cumulus.log2elasticsearch_lambda_function_arn region = var.region prefix = var.prefix docker_image = var.dmrpp-generator-docker-image @@ -49,6 +48,8 @@ module "dmrpp-generator" { desired_count = 1 // Default to 1 docker_image = "ghrcdaac/dmrpp-generator:" } + +log_destination_arn = var.aws_log_mechanism (optional) ``` In [variables.tf](https://github.com/nasa/cumulus-template-deploy/blob/master/cumulus-tf/variables.tf) file you need to define diff --git a/main.tf b/main.tf index e228eba..7947b5d 100644 --- a/main.tf +++ b/main.tf @@ -10,7 +10,7 @@ module "dmrpp_service" { prefix = var.prefix cluster_arn = var.cluster_arn desired_count = var.desired_count - log2elasticsearch_lambda_function_arn = var.log2elasticsearch_lambda_function_arn + log_destination_arn = var.log_destination_arn docker_image = var.docker_image cpu = var.cpu memory_reservation = var.memory_reservation diff --git a/modules/dmrpp_service/main.tf b/modules/dmrpp_service/main.tf index 3aa7459..1e286ce 100644 --- a/modules/dmrpp_service/main.tf +++ b/modules/dmrpp_service/main.tf @@ -12,7 +12,7 @@ module "dmrpp_ecs_task_module" { } module "dmrpp_service" { - source = "https://github.com/nasa/cumulus/releases/download/v5.0.1/terraform-aws-cumulus-ecs-service.zip" + source = "https://github.com/nasa/cumulus/releases/download/v8.0.0/terraform-aws-cumulus-ecs-service.zip" prefix = var.prefix @@ -21,10 +21,10 @@ module "dmrpp_service" { cluster_arn = var.cluster_arn desired_count = var.desired_count image = var.docker_image - log2elasticsearch_lambda_function_arn = var.log2elasticsearch_lambda_function_arn - cpu = var.cpu - memory_reservation = var.memory_reservation - volumes = var.volumes + log_destination_arn = var.log_destination_arn + cpu = var.cpu + memory_reservation = var.memory_reservation + volumes = var.volumes environment = { AWS_DEFAULT_REGION = var.region diff --git a/modules/dmrpp_service/variables.tf b/modules/dmrpp_service/variables.tf index ff52ade..f82259d 100644 --- a/modules/dmrpp_service/variables.tf +++ b/modules/dmrpp_service/variables.tf @@ -4,6 +4,10 @@ variable "cpu" {} variable "memory_reservation" {} variable "region" {} variable "cluster_arn" {} -variable "log2elasticsearch_lambda_function_arn" {} +variable "log_destination_arn" { + type = string + default = null + description = "A shared AWS:Log:Destination that receives logs in log_groups" +} variable "docker_image" {} variable "volumes" {} diff --git a/variables.tf b/variables.tf index 4eb0c5f..ba14ee9 100644 --- a/variables.tf +++ b/variables.tf @@ -26,7 +26,11 @@ variable "memory_reservation" { default = 900 } variable "cluster_arn" {} -variable "log2elasticsearch_lambda_function_arn" {} +variable "log_destination_arn" { + type = string + default = null + description = "A shared AWS:Log:Destination that receives logs in log_groups" +} variable "docker_image" { default = "ghrcdaac/dmrpp-generator:latest" } From b11da69c89f12dc73b6bf61321798b8ddc55959c Mon Sep 17 00:00:00 2001 From: "Yen, David (398B-Affiliate)" Date: Wed, 21 Apr 2021 07:50:49 -0700 Subject: [PATCH 2/2] enhance changelog file to reference to a issue number --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a98f47f..57e1978 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### Changed -- **PODAAC-3366** - - Modify DMRPP to be cumulus 7.x compliant. +- https://github.com/ghrcdaac/dmrpp-generator/issues/12 + - Modification to fix the above issue. ### Deprecated ### Removed ### Fixed