Skip to content

Commit

Permalink
Merge pull request #96 from asfadmin/cjl/feature/v18.2.0.0
Browse files Browse the repository at this point in the history
Upgrades for Cumulus v18.2.0
  • Loading branch information
lindsleycj authored Mar 5, 2024
2 parents 4ab104b + 2f90732 commit c0829f3
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 21 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@

# CHANGELOG

## v18.2.0.0
* Upgrade to [Cumulus v18.2.0](https://github.com/nasa/cumulus/releases/tag/v18.2.0)
* update required terraform version to `>= 1.5` in all CIRRUS modules matching the requirements
from the Cumulus application.
* Add `DAR=YES/NO` tags as appropriate for s3 buckets
* expose `enable_upgrade` variable in RDS module to allow for changes required for RDS
upgrade
* updates to RDS for PostgreSQL version 13.12
* update requirements.txt to latest versions of cumulus python modules

## v18.0.0.0
* Upgrade to [Cumulus v18.0.0](https://github.com/nasa/cumulus/releases/tag/v18.0.0)
* This new version of Cumulus uses Terraform v1.5.3, it's possible that DAAC terraform
Expand Down
11 changes: 10 additions & 1 deletion daac/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@ locals {
prefix = "${var.DEPLOY_NAME}-cumulus-${var.MATURITY}"

default_tags = {
Deployment = "${var.DEPLOY_NAME}-cumulus-${var.MATURITY}"
Deployment = local.prefix
}

dar_yes_tags = {
DAR = "YES"
}

dar_no_tags = {
DAR = "NO"
}


standard_bucket_names = [for n in var.standard_bucket_names : "${local.prefix}-${n}"]
protected_bucket_names = [for n in var.protected_bucket_names : "${local.prefix}-${n}"]
public_bucket_names = [for n in var.public_bucket_names : "${local.prefix}-${n}"]
Expand Down
12 changes: 6 additions & 6 deletions daac/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resource "aws_s3_bucket" "standard-bucket" {
lifecycle {
prevent_destroy = true
}
tags = local.default_tags
tags = merge(local.default_tags, local.dar_yes_tags)
}

resource "aws_s3_bucket_server_side_encryption_configuration" "standard_bucket_encryption_configuration" {
Expand All @@ -31,7 +31,7 @@ resource "aws_s3_bucket" "internal-bucket" {
lifecycle {
prevent_destroy = true
}
tags = local.default_tags
tags = merge(local.default_tags, local.dar_yes_tags)
}

resource "aws_s3_bucket_server_side_encryption_configuration" "internal_bucket_encryption_configuration" {
Expand Down Expand Up @@ -69,7 +69,7 @@ resource "aws_s3_bucket" "protected-bucket" {
target_bucket = "${local.prefix}-internal"
target_prefix = "${local.prefix}/ems-distribution/s3-server-access-logs/"
}
tags = local.default_tags
tags = merge(local.default_tags, local.dar_no_tags)
}

resource "aws_s3_bucket_server_side_encryption_configuration" "protected_bucket_encryption_configuration" {
Expand All @@ -96,7 +96,7 @@ resource "aws_s3_bucket" "public-bucket" {
target_bucket = "${local.prefix}-internal"
target_prefix = "${local.prefix}/ems-distribution/s3-server-access-logs/"
}
tags = local.default_tags
tags = merge(local.default_tags, local.dar_no_tags)
}

resource "aws_s3_bucket_server_side_encryption_configuration" "public_bucket_encryption_configuration" {
Expand All @@ -118,7 +118,7 @@ resource "aws_s3_bucket" "workflow-bucket" {
lifecycle {
prevent_destroy = true
}
tags = local.default_tags
tags = merge(local.default_tags, local.dar_yes_tags)
}

resource "aws_s3_bucket_server_side_encryption_configuration" "workflow_bucket_encryption_configuration" {
Expand All @@ -138,7 +138,7 @@ resource "aws_s3_bucket" "artifacts-bucket" {
lifecycle {
prevent_destroy = true
}
tags = local.default_tags
tags = merge(local.default_tags, local.dar_yes_tags)
}

resource "aws_s3_bucket_server_side_encryption_configuration" "artifacts_bucket_encryption_configuration" {
Expand Down
2 changes: 1 addition & 1 deletion daac/s3-replicator.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ locals {

module "s3-replicator" {

source = "https://github.com/nasa/cumulus/releases/download/v18.0.0/terraform-aws-cumulus-s3-replicator.zip"
source = "https://github.com/nasa/cumulus/releases/download/v18.2.0/terraform-aws-cumulus-s3-replicator.zip"

prefix = local.prefix
vpc_id = data.aws_vpc.application_vpcs.id
Expand Down
2 changes: 1 addition & 1 deletion daac/versions.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
terraform {
required_version = ">= 0.13"
required_version = ">= 1.5"
}
2 changes: 1 addition & 1 deletion dashboard/versions.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
terraform {
required_version = ">= 0.13"
required_version = ">= 1.5"
}
3 changes: 2 additions & 1 deletion rds/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ resource "random_string" "user_db_pass" {
}

module "rds_cluster" {
source = "https://github.com/nasa/cumulus/releases/download/v18.0.0/terraform-aws-cumulus-rds.zip"
source = "https://github.com/nasa/cumulus/releases/download/v18.2.0/terraform-aws-cumulus-rds.zip"
db_admin_username = var.db_admin_username
db_admin_password = var.db_admin_password == "" ? random_string.admin_db_pass.result : var.db_admin_password
region = data.aws_region.current.name
vpc_id = data.aws_vpc.application_vpcs.id
subnets = data.aws_subnets.subnet_ids.ids
engine_version = var.engine_version
enable_upgrade = var.enable_upgrade
parameter_group_family = var.parameter_group_family
deletion_protection = var.deletion_protection
backup_retention_period = var.backup_retention_period
Expand Down
17 changes: 14 additions & 3 deletions rds/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ variable "deletion_protection" {
}

variable "engine_version" {
description = "Postgres engine version for Serverless cluster"
description = "Postgres engine version for serverless cluster"
type = string
default = "11.13"
default = "13.12"
}

variable "parameter_group_family" {
Expand All @@ -59,14 +59,19 @@ variable "parameter_group_family" {
default = "aurora-postgresql11"
}

variable "parameter_group_family_v13" {
description = "Database family to use for creating database parameter group under postgres 13 upgrade conditions"
type = string
default = "aurora-postgresql13"
}

### Required for user/database provisioning
variable "provision_user_database" {
description = "true/false flag to configure if the module should provision a user and database using default settings"
type = bool
default = true
}


variable "rds_user_password" {
type = string
default = ""
Expand All @@ -77,3 +82,9 @@ variable "snapshot_identifier" {
type = string
default = null
}

variable "enable_upgrade" {
description = "Flag to enable use of updated parameter group for postgres v13"
type = bool
default = true
}
3 changes: 2 additions & 1 deletion rds/variables/example.tfvars
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# these are the default values, if you want to turn either off set these
# these are the default values, if you want to turn any off set these
# to false
deletion_protection = true
provision_user_database = true
enable_upgrade = true
2 changes: 1 addition & 1 deletion rds/versions.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
terraform {
required_version = ">= 0.13"
required_version = ">= 1.5"
}
2 changes: 1 addition & 1 deletion workflows/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "acme_workflow" {

source = "https://github.com/nasa/cumulus/releases/download/v18.0.0/terraform-aws-cumulus-workflow.zip"
source = "https://github.com/nasa/cumulus/releases/download/v18.2.0/terraform-aws-cumulus-workflow.zip"

prefix = local.prefix
name = "ACMEWorkflow"
Expand Down
6 changes: 3 additions & 3 deletions workflows/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cumulus-message-adapter-python==2.0.0
cumulus-message-adapter==2.0.2
cumulus_process==1.0.0
cumulus-message-adapter-python==2.2.0
cumulus-message-adapter==2.0.3
cumulus_process==1.3.0
2 changes: 1 addition & 1 deletion workflows/versions.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
terraform {
required_version = ">= 0.13"
required_version = ">= 1.5"
}

0 comments on commit c0829f3

Please sign in to comment.