Skip to content

Commit

Permalink
feat(multi-region): configurable aws_region for firelens
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.
  • Loading branch information
thisismana committed Sep 10, 2024
1 parent 2c8d8d9 commit 5c79459
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 5c79459

Please sign in to comment.