Skip to content

Commit fdcf98a

Browse files
Addressed comments
1 parent d4c7207 commit fdcf98a

File tree

15 files changed

+24
-62
lines changed

15 files changed

+24
-62
lines changed

aws/cloudtrail/examples/default/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
|------|---------|
55
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
66
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.16.2, < 6.0.0 |
7+
| <a name="requirement_random"></a> [random](#requirement\_random) | >=3.1.0 |
78
| <a name="requirement_sumologic"></a> [sumologic](#requirement\_sumologic) | >= 2.28.3, < 3.0.0 |
89

910
## Providers
1011

1112
| Name | Version |
1213
|------|---------|
1314
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.43.0 |
15+
| <a name="provider_random"></a> [random](#provider\_random) | 3.6.0 |
1416
| <a name="provider_sumologic"></a> [sumologic](#provider\_sumologic) | 2.28.3 |
1517

1618
## Modules
@@ -23,6 +25,7 @@
2325

2426
| Name | Type |
2527
|------|------|
28+
| [random_string.aws_random](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource |
2629
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
2730
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
2831
| [sumologic_caller_identity.current](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/data-sources/caller_identity) | data source |
@@ -31,10 +34,8 @@
3134

3235
| Name | Description | Type | Default | Required |
3336
|------|-------------|------|---------|:--------:|
34-
| <a name="input_sumo_aws_account_id"></a> [sumo\_aws\_account\_id](#input\_sumo\_aws\_account\_id) | Please provide Sumo's AWS account ID | `string` | n/a | yes |
3537
| <a name="input_sumologic_access_id"></a> [sumologic\_access\_id](#input\_sumologic\_access\_id) | Sumo Logic Access ID. Visit https://help.sumologic.com/Manage/Security/Access-Keys#Create_an_access_key | `string` | n/a | yes |
3638
| <a name="input_sumologic_access_key"></a> [sumologic\_access\_key](#input\_sumologic\_access\_key) | Sumo Logic Access Key. Visit https://help.sumologic.com/Manage/Security/Access-Keys#Create_an_access_key | `string` | n/a | yes |
37-
| <a name="input_sumologic_collector_id"></a> [sumologic\_collector\_id](#input\_sumologic\_collector\_id) | Please provide Sumo Collector ID | `string` | n/a | yes |
3839
| <a name="input_sumologic_environment"></a> [sumologic\_environment](#input\_sumologic\_environment) | Enter au, ca, de, eu, jp, us2, in, fed or us1. For more information on Sumo Logic deployments visit https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-and-Firewall-Security | `string` | n/a | yes |
3940
| <a name="input_sumologic_organization_id"></a> [sumologic\_organization\_id](#input\_sumologic\_organization\_id) | You can find your org on the Preferences page in the Sumo Logic UI. For more information, see the Preferences Page topic. Your org ID will be used to configure the IAM Role for Sumo Logic AWS Sources."<br> For more details, visit https://help.sumologic.com/01Start-Here/05Customize-Your-Sumo-Logic-Experience/Preferences-Page | `string` | n/a | yes |
4041

aws/cloudtrail/examples/default/locals.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ locals {
44
aws_region = data.aws_region.current.name
55

66
# CloudTrail inputs
7-
bucket_name = "aws-observability-random-${var.sumologic_collector_id}"
7+
bucket_name = "aws-observability-random-${random_string.aws_random.id}"
88
path_expression = "AWSLogs/${local.aws_account_id}/CloudTrail/${local.aws_region}/*"
99
cloudtrail_fields = { account = local.aws_account_id }
1010
cloudtrail_source_bucket_name = "akhil_${local.aws_region}_${var.sumologic_organization_id}"

aws/cloudtrail/examples/default/main.auto.tfvars

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@ sumologic_environment = "<YOUR SUMO DEPLOYMENT>" # Please replace <YOUR
33
sumologic_organization_id = "<YOUR SUMO ORG ID>" # Please replace <YOUR SUMO ORG ID> (including brackets) with your Sumo Logic Organization ID.
44
sumologic_access_id = "<YOUR SUMO ACCESS ID>" # Please replace <YOUR SUMO ACCESS ID> (including brackets) with your Sumo Logic Access ID.
55
sumologic_access_key = "<YOUR SUMO ACCESS KEY>" # Please replace <YOUR SUMO ACCESS KEY> (including brackets) with your Sumo Logic Access KEY.
6-
sumologic_collector_id = "<YOUR SUMO COLLECTOR ID>" # Please replace <YOUR SUMO COLLECTOR ID> (including brackets) with your Sumo Logic collector ID.
7-
sumo_aws_account_id = "<SUMO'S AWS ACCOUNT ID>" # Please replace <UMO'S AWS ACCOUNT ID> (including brackets) with Sumo Logic's aws account ID.

aws/cloudtrail/examples/default/main.tf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11

2+
resource "random_string" "aws_random" {
3+
length = 10
4+
upper = false
5+
special = false
6+
}
7+
28
module "cloudtrail_module" {
39
source = "SumoLogic/sumo-logic-integrations/sumologic//aws/cloudtrail"
410

@@ -11,7 +17,7 @@ module "cloudtrail_module" {
1117
source_name = "CloudTrail Logs (Region)"
1218
source_category = "aws/observability/cloudtrail/logs"
1319
description = "This source is created using Sumo Logic terraform AWS Observability module to collect AWS cloudtrail logs."
14-
collector_id = var.sumologic_collector_id
20+
collector_id = module.cloudtrail_module.sumologic_collector.collector.id
1521
bucket_details = {
1622
create_bucket = true
1723
bucket_name = local.bucket_name
@@ -20,7 +26,7 @@ module "cloudtrail_module" {
2026
}
2127
paused = false
2228
scan_interval = 60000
23-
sumo_account_id = var.sumo_aws_account_id
29+
sumo_account_id = 926226587429
2430
cutoff_relative_time = "-1d"
2531
fields = local.cloudtrail_fields
2632
iam_details = {

aws/cloudtrail/examples/default/variables.tf

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,3 @@ variable "sumologic_organization_id" {
4949
error_message = "The organization ID must contain valid characters."
5050
}
5151
}
52-
53-
variable "sumologic_collector_id" {
54-
type = string
55-
description = "Please provide Sumo Collector ID"
56-
}
57-
58-
variable "sumo_aws_account_id" {
59-
type = string
60-
description = "Please provide Sumo's AWS account ID"
61-
}

aws/cloudtrail/examples/default/versions.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@ terraform {
1010
source = "hashicorp/aws"
1111
version = ">= 5.16.2, < 6.0.0"
1212
}
13+
random = {
14+
source = "hashicorp/random"
15+
version = ">=3.1.0"
16+
}
1317
}
1418
}

aws/cloudwatchlogsforwarder/examples/default/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
|------|-------------|------|---------|:--------:|
3232
| <a name="input_sumologic_access_id"></a> [sumologic\_access\_id](#input\_sumologic\_access\_id) | Sumo Logic Access ID. Visit https://help.sumologic.com/Manage/Security/Access-Keys#Create_an_access_key | `string` | n/a | yes |
3333
| <a name="input_sumologic_access_key"></a> [sumologic\_access\_key](#input\_sumologic\_access\_key) | Sumo Logic Access Key. Visit https://help.sumologic.com/Manage/Security/Access-Keys#Create_an_access_key | `string` | n/a | yes |
34-
| <a name="input_sumologic_collector_id"></a> [sumologic\_collector\_id](#input\_sumologic\_collector\_id) | Please provide Sumo Collector ID | `string` | n/a | yes |
3534
| <a name="input_sumologic_environment"></a> [sumologic\_environment](#input\_sumologic\_environment) | Enter au, ca, de, eu, jp, us2, in, fed or us1. For more information on Sumo Logic deployments visit https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-and-Firewall-Security | `string` | n/a | yes |
3635
| <a name="input_sumologic_organization_id"></a> [sumologic\_organization\_id](#input\_sumologic\_organization\_id) | You can find your org on the Preferences page in the Sumo Logic UI. For more information, see the Preferences Page topic. Your org ID will be used to configure the IAM Role for Sumo Logic AWS Sources."<br> For more details, visit https://help.sumologic.com/01Start-Here/05Customize-Your-Sumo-Logic-Experience/Preferences-Page | `string` | n/a | yes |
3736

aws/cloudwatchlogsforwarder/examples/default/main.auto.tfvars

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ sumologic_environment = "<YOUR SUMO DEPLOYMENT>" # Please replace <YOUR
33
sumologic_organization_id = "<YOUR SUMO ORG ID>" # Please replace <YOUR SUMO ORG ID> (including brackets) with your Sumo Logic Organization ID.
44
sumologic_access_id = "<YOUR SUMO ACCESS ID>" # Please replace <YOUR SUMO ACCESS ID> (including brackets) with your Sumo Logic Access ID.
55
sumologic_access_key = "<YOUR SUMO ACCESS KEY>" # Please replace <YOUR SUMO ACCESS KEY> (including brackets) with your Sumo Logic Access KEY.
6-
sumologic_collector_id = "<YOUR SUMO COLLECTOR ID>" # Please replace <YOUR SUMO COLLECTOR ID> (including brackets) with your Sumo Logic collector ID.

aws/cloudwatchlogsforwarder/examples/default/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module "cloudwatch_logs_lambda_log_forwarder_module" {
44
source = "SumoLogic/sumo-logic-integrations/sumologic//aws/cloudwatchlogsforwarder"
55

6-
create_collector = false
6+
create_collector = true
77

88
# Lambda Log Forwarder configurations
99
email_id = "[email protected]"
@@ -16,7 +16,7 @@ module "cloudwatch_logs_lambda_log_forwarder_module" {
1616
source_name = "CloudWatch Logs (Region)"
1717
source_category = "Labs/aws/cloudwatch"
1818
description = "Provide details for the Sumo Logic HTTP source. If not provided, then defaults will be used."
19-
collector_id = var.sumologic_collector_id
19+
collector_id = module.cloudwatch_logs_lambda_log_forwarder_module.sumologic_collector.collector.id
2020
fields = local.cloudwatch_logs_fields
2121
}
2222

aws/cloudwatchlogsforwarder/examples/default/variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,3 @@ variable "sumologic_organization_id" {
4949
error_message = "The organization ID must contain valid characters."
5050
}
5151
}
52-
53-
variable "sumologic_collector_id" {
54-
type = string
55-
description = "Please provide Sumo Collector ID"
56-
}

0 commit comments

Comments
 (0)