Skip to content

Commit ab238f4

Browse files
committed
Updating kinesisfirehose for logs example
1 parent 01c8eb6 commit ab238f4

File tree

4 files changed

+23
-19
lines changed

4 files changed

+23
-19
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
data "aws_region" "current" {}
2+
3+
data "aws_caller_identity" "current" {}
4+
5+
data "sumologic_caller_identity" "current" {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
locals {
2+
# AWS account details
3+
aws_account_id = data.aws_caller_identity.current.account_id
4+
aws_region = data.aws_region.current.name
5+
6+
# S3 bucket inputs
7+
bucket_name = "aws-observability-random-${random_string.aws_random.id}"
8+
}

aws/kinesisfirehoseforlogs/examples/default/main.tf

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1+
resource "random_string" "aws_random" {
2+
length = 10
3+
upper = false
4+
special = false
5+
}
6+
17
module "kinesis_firehose_for_logs_module" {
28
source = "SumoLogic/sumo-logic-integrations/sumologic//aws/kinesisfirehoseforlogs"
39

410
create_collector = true
511

612
source_details = {
7-
source_name = "<Source-Name>"
8-
source_category = "<Source-Category>"
9-
description = "<Source-Description>"
13+
source_name = "Cloud Watch Logs (Region)"
14+
source_category = "aws/observability/cloudwatch/logs"
15+
description = "This source is created using Sumo Logic terraform AWS Observability module to collect AWS Cloud Watch logs."
1016
collector_id = null
1117
fields = {}
1218
}
1319

1420
create_bucket = true
1521
bucket_details = {
16-
bucket_name = "<AWS-S3-bucket>"
22+
bucket_name = local.bucket_name
1723
force_destroy_bucket = false
1824
}
1925

aws/kinesisfirehoseforlogs/examples/default/provider.tf

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,4 @@ provider "sumologic" {
22
environment = var.sumologic_environment
33
access_id = var.sumologic_access_id
44
access_key = var.sumologic_access_key
5-
}
6-
7-
provider "aws" {
8-
region = "us-east-1"
9-
#
10-
# Below properties should be added when you would like to onboard more than one region and account
11-
# More Information regarding AWS Profile can be found at -
12-
#
13-
# Access configuration
14-
#
15-
# profile = <Provide a profile as setup in AWS CLI>
16-
#
17-
# Terraform alias
18-
#
19-
# alias = <Provide a terraform alias for the aws provider. For eg :- production-us-east-1>
205
}

0 commit comments

Comments
 (0)