Skip to content

Commit

Permalink
domain naming and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantanjunming committed Sep 6, 2024
1 parent 8b9d6c2 commit e5d33b1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
11 changes: 7 additions & 4 deletions modules/firehose-logs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,20 @@ resource "aws_iam_role" "new_firehose_iam" {

# Add additional policies to the firehose IAM role
resource "aws_iam_role_policy_attachment" "policy_attachment_firehose" {
role = one(aws_iam_role.new_firehose_iam[*].arn)
count = var.existing_firehose_iam != null ? 0 : 1
role = one(aws_iam_role.new_firehose_iam[*].name)
policy_arn = "arn:aws:iam::aws:policy/AmazonKinesisFirehoseFullAccess"
}

resource "aws_iam_role_policy_attachment" "policy_attachment_kinesis" {
role = one(aws_iam_role.new_firehose_iam[*].arn)
count = var.existing_firehose_iam != null ? 0 : 1
role = one(aws_iam_role.new_firehose_iam[*].name)
policy_arn = "arn:aws:iam::aws:policy/AmazonKinesisReadOnlyAccess"
}

resource "aws_iam_role_policy_attachment" "policy_attachment_cloudwatch" {
role = one(aws_iam_role.new_firehose_iam[*].arn)
count = var.existing_firehose_iam != null ? 0 : 1
role = one(aws_iam_role.new_firehose_iam[*].name)
policy_arn = "arn:aws:iam::aws:policy/CloudWatchLogsFullAccess"
}

Expand Down Expand Up @@ -193,7 +196,7 @@ resource "aws_kinesis_firehose_delivery_stream" "coralogix_stream_logs" {

s3_configuration {
role_arn = local.firehose_iam_role_arn
bucket_arn = aws_s3_bucket.firehose_bucket.arn
bucket_arn = local.s3_backup_bucket_arn
buffering_size = 5
buffering_interval = 300
compression_format = "GZIP"
Expand Down
6 changes: 3 additions & 3 deletions modules/firehose-logs/variables.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
variable "coralogix_region" {
description = "Coralogix account region: Europe, Europe2, India, Singapore, US, US2"
description = "Coralogix account region: EU1, EU2, AP1, AP2, AP3, US1, US2"
type = string
validation {
condition = contains(["Europe", "Europe2", "India", "Singapore", "US", "US2", "AP3"], var.coralogix_region)
error_message = "The coralogix region must be one of these values: [Europe, Europe2, India, Singapore, US, US2, AP3]."
condition = contains(["EU1", "EU2", "AP1", "AP2", "AP3", "US1", "US2"], var.coralogix_region)
error_message = "The coralogix region must be one of these values: [EU1, EU2, AP1, AP2, AP3, US1, US2]."
}
}

Expand Down
6 changes: 3 additions & 3 deletions modules/firehose-metrics/variables.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
variable "coralogix_region" {
description = "Coralogix account region: Europe, Europe2, India, Singapore, US, US2"
description = "Coralogix account region: EU1, EU2, AP1, AP2, AP3, US1, US2"
type = string
validation {
condition = contains(["Europe", "Europe2", "India", "Singapore", "US", "US2", "AP3"], var.coralogix_region)
error_message = "The coralogix region must be one of these values: [Europe, Europe2, India, Singapore, US, US2, AP3]."
condition = contains(["EU1", "EU2", "AP1", "AP2", "AP3", "US1", "US2"], var.coralogix_region)
error_message = "The coralogix region must be one of these values: [EU1, EU2, AP1, AP2, AP3, US1, US2]."
}
}

Expand Down

0 comments on commit e5d33b1

Please sign in to comment.