Skip to content

Commit

Permalink
feat(multi-region): configurable aws_region for firelens (#154)
Browse files Browse the repository at this point in the history
Allow changing the `aws_region` used by firelense to sign off requests in case the stack was deployed in a region that does match OpenSearch's region.

Co-authored-by: Moritz Zimmer <[email protected]>
  • Loading branch information
thisismana and moritzzimmer authored Sep 19, 2024
1 parent 5a2bbef commit 6b0cf02
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion container_definition.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ locals {
logDriver = "awsfirelens",
options = {
Aws_Auth = "On"
Aws_Region = data.aws_region.current.name
Aws_Region = null != var.firelens.aws_region ? var.firelens.aws_region : data.aws_region.current.name
Host = var.firelens.opensearch_host
Logstash_Format = "true"
Logstash_Prefix = "${var.service_name}-app"
Expand Down
2 changes: 1 addition & 1 deletion envoy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ locals {
logDriver = "awsfirelens",
options = {
Aws_Auth = "On"
Aws_Region = data.aws_region.current.name
Aws_Region = null != var.firelens.aws_region ? var.firelens.aws_region : data.aws_region.current.name
Host = var.firelens.opensearch_host
Logstash_Format = "true"
Logstash_Prefix = "${var.service_name}-envoy"
Expand Down
1 change: 1 addition & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ variable "firelens" {
init_config_files = optional(list(string), [])
log_level = optional(string, "info")
opensearch_host = optional(string, "")
aws_region = optional(string)
})
}

Expand Down

0 comments on commit 6b0cf02

Please sign in to comment.