diff --git a/CHANGELOG.md b/CHANGELOG.md index b71113b..0dad2fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ 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). +## [7.3.6] - 2024-09-10 +### Added +- Added new variable `external_database_host_readonly` to handle externel mysql readonly host. +### Removed +- Removed s3 log bucket `INTELLIGENT_TIERING` transistion to reduce extra cost on access log transfer storage class type as log bucket has expiration configured. + ## [7.3.5] - 2024-09-02 ### Added - Use unique SID in IAM Policy. diff --git a/VARIABLES.md b/VARIABLES.md index 2948bd2..ea038d7 100644 --- a/VARIABLES.md +++ b/VARIABLES.md @@ -54,6 +54,8 @@ | encrypt\_db | Specifies whether the DB cluster is encrypted | `bool` | `false` | no | | external\_data\_buckets | Buckets that are not managed by Apiary but added to Hive Metastore IAM role access. | `list(any)` | `[]` | no | | external\_database\_host | External Metastore database host to support legacy installations, MySQL database won't be created by Apiary when this option is specified. | `string` | `""` | no | +| external\_database\_host\_readonly | External Metastore database host to support legacy installations. | `string` | `""` | no | + | hive\_metastore\_port | Port on which both Hive Metastore readwrite and readonly will run. | `number` | `9083` | no | | hms\_additional\_environment\_variables | Additional environment variables for the Hive Metastore. | `map(any)` | `{}` | no | | hms\_housekeeper\_additional\_environment\_variables | Additional environment variables for Hive Housekeeper. | `map(any)` | `{}` | no | diff --git a/k8s-readonly.tf b/k8s-readonly.tf index ce02997..deedba7 100644 --- a/k8s-readonly.tf +++ b/k8s-readonly.tf @@ -70,7 +70,7 @@ resource "kubernetes_deployment_v1" "apiary_hms_readonly" { env { name = "MYSQL_HOST" - value = var.external_database_host == "" ? join("", aws_rds_cluster.apiary_cluster.*.endpoint) : var.external_database_host + value = var.external_database_host == "" ? join("", aws_rds_cluster.apiary_cluster.*.endpoint) : coalesce(var.external_database_host_readonly,var.external_database_host) } env { diff --git a/s3-other.tf b/s3-other.tf index 64bf71d..9f10e4f 100644 --- a/s3-other.tf +++ b/s3-other.tf @@ -132,11 +132,6 @@ EOF abort_incomplete_multipart_upload_days = var.s3_lifecycle_abort_incomplete_multipart_upload_days - transition { - days = 30 - storage_class = "INTELLIGENT_TIERING" - } - expiration { days = var.s3_log_expiry } diff --git a/templates.tf b/templates.tf index c403c87..af1cfdd 100644 --- a/templates.tf +++ b/templates.tf @@ -75,7 +75,7 @@ locals{ }) hms_readonly_template = templatefile("${path.module}/templates/apiary-hms-readonly.json", { - mysql_db_host = "${var.external_database_host == "" ? join("", aws_rds_cluster.apiary_cluster.*.reader_endpoint) : var.external_database_host}" + mysql_db_host = "${var.external_database_host == "" ? join("", aws_rds_cluster.apiary_cluster.*.reader_endpoint) : coalesce(var.external_database_host_readonly,var.external_database_host)}" mysql_db_name = "${var.apiary_database_name}" mysql_secret_arn = "${data.aws_secretsmanager_secret.db_ro_user.arn}" hive_metastore_access_mode = "readonly" diff --git a/variables.tf b/variables.tf index f679770..98b399a 100644 --- a/variables.tf +++ b/variables.tf @@ -138,6 +138,12 @@ variable "external_database_host" { default = "" } +variable "external_database_host_readonly" { + description = "External Metastore database host readonly to support legacy installations" + type = string + default = "" +} + variable "enable_vpc_endpoint_services" { description = "Enable metastore NLB, Route53 entries VPC access and VPC endpoint services, for cross-account access." type = bool