Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a apiary_logs_retention_days variable that sets the retention_day… #154

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ 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](http://semver.org/spec/v2.0.0.html).

## [6.2.0] - TBD
### Added
- Added `apiary_cloudwatch_logs_retention_days` variable that sets the default retention period of the Apiary Cloudwatch group. The default is 30 days.

## [6.1.1] - 2020-05-04
### Changed
- Fix multiple instance deployment on k8s.
Expand Down
1 change: 1 addition & 0 deletions VARIABLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
| apiary_domain_name | Apiary domain name for Route 53. | string | `` | no |
| apiary_log_bucket | Bucket for Apiary logs. | string | - | yes |
| apiary_log_prefix | Prefix for Apiary logs. | string | `` | no |
| apiary_cloudwatch_logs_retention_days | Log retention in days for the Apiary ECS Cloudwatch log group. | string | `30` | no |
| apiary_managed_schemas | List of maps - each map entry describes an Apiary schema, along with S3 storage properties for the schema. See section [`apiary_managed_schemas`](#apiary_managed_schemas) for more info. | list(map) | - | no |
| apiary_producer_iamroles | AWS IAM roles allowed write access to managed Apiary S3 buckets. | map | `<map>` | no |
| apiary_rds_additional_sg | Comma-separated string containing additional security groups to attach to RDS. | list | `<list>` | no |
Expand Down
7 changes: 4 additions & 3 deletions ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ resource "aws_ecs_cluster" "apiary" {
}

resource "aws_cloudwatch_log_group" "apiary_ecs" {
count = "${var.hms_instance_type == "ecs" ? 1 : 0}"
name = "${local.instance_alias}-ecs"
tags = "${var.apiary_tags}"
count = "${var.hms_instance_type == "ecs" ? 1 : 0}"
name = "${local.instance_alias}-ecs"
retention_in_days = "${var.apiary_cloudwatch_logs_retention_days}"
tags = "${var.apiary_tags}"
}

resource "aws_ecs_task_definition" "apiary_hms_readwrite" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ variable "apiary_log_prefix" {
default = ""
}

variable "apiary_cloudwatch_logs_retention_days" {
description = "Log retention in days for the Apiary ECS Cloudwatch log group."
type = string
default = "30"
}

variable "enable_hive_metastore_metrics" {
description = "Enable sending Hive Metastore metrics to CloudWatch."
type = bool
Expand Down