Skip to content

Commit aaab367

Browse files
committed
Updated sumo and aws tf provider version for kinesis firehose for metrics
1 parent fae9031 commit aaab367

File tree

8 files changed

+222
-27
lines changed

8 files changed

+222
-27
lines changed

aws/kinesisfirehoseformetrics/README.md

Lines changed: 59 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,44 +10,77 @@ This module is used to create the SumoLogic AWS Kinesis Firehose for Metrics sou
1010

1111
| Name | Version |
1212
|------|---------|
13-
| terraform | >= 0.13.0 |
14-
| aws | >= 3.42.0 |
15-
| random | >= 3.1.0 |
16-
| sumologic | >= 2.9.0 |
17-
| time | >= 0.7.1 |
13+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
14+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.16.2, < 6.0.0 |
15+
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.1.0 |
16+
| <a name="requirement_sumologic"></a> [sumologic](#requirement\_sumologic) | >= 2.28.3, < 3.0.0 |
17+
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.7.1 |
1818

1919
## Providers
2020

2121
| Name | Version |
2222
|------|---------|
23-
| aws | >= 3.42.0 |
24-
| random | >= 3.1.0 |
25-
| sumologic | >= 2.9.0 |
26-
| time | >= 0.7.1 |
23+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.16.2, < 6.0.0 |
24+
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.1.0 |
25+
| <a name="provider_sumologic"></a> [sumologic](#provider\_sumologic) | >= 2.28.3, < 3.0.0 |
26+
| <a name="provider_time"></a> [time](#provider\_time) | >= 0.7.1 |
27+
28+
## Modules
29+
30+
No modules.
31+
32+
## Resources
33+
34+
| Name | Type |
35+
|------|------|
36+
| [aws_cloudwatch_log_group.log_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
37+
| [aws_cloudwatch_log_stream.http_log_stream](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_stream) | resource |
38+
| [aws_cloudwatch_log_stream.s3_log_stream](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_stream) | resource |
39+
| [aws_cloudwatch_metric_stream.metric_stream](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_stream) | resource |
40+
| [aws_iam_policy.firehose_delivery_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
41+
| [aws_iam_policy.firehose_s3_upload_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
42+
| [aws_iam_policy.iam_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
43+
| [aws_iam_policy.metrics_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
44+
| [aws_iam_role.firehose_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
45+
| [aws_iam_role.metrics_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
46+
| [aws_iam_role.source_iam_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
47+
| [aws_iam_role_policy_attachment.firehose_policy_attach](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
48+
| [aws_iam_role_policy_attachment.firehose_s3_policy_attach](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
49+
| [aws_iam_role_policy_attachment.metrics_policy_attach](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
50+
| [aws_kinesis_firehose_delivery_stream.metrics_delivery_stream](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kinesis_firehose_delivery_stream) | resource |
51+
| [aws_s3_bucket.s3_bucket](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
52+
| [aws_s3_bucket_public_access_block.s3_bucket_access_block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | resource |
53+
| [random_string.aws_random](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource |
54+
| [sumologic_collector.collector](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/collector) | resource |
55+
| [sumologic_kinesis_metrics_source.source](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/kinesis_metrics_source) | resource |
56+
| [time_sleep.wait_for_seconds](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |
57+
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
58+
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
59+
| [sumologic_caller_identity.current](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/data-sources/caller_identity) | data source |
2760

2861
## Inputs
2962

3063
| Name | Description | Type | Default | Required |
3164
|------|-------------|------|---------|:--------:|
32-
| bucket\_details | Provide details for the AWS S3 bucket. If not provided, existing will be used. | <pre>object({<br> bucket_name = string<br> force_destroy_bucket = bool<br> })</pre> | <pre>{<br> "bucket_name": "sumologic-kinesis-firehose-metrics-random-id",<br> "force_destroy_bucket": true<br>}</pre> | no |
33-
| collector\_details | Provide details for the Sumo Logic collector. If not provided, then defaults will be used. | <pre>object({<br> collector_name = string<br> description = string<br> fields = map(string)<br> })</pre> | <pre>{<br> "collector_name": "SumoLogic Kinesis Firehose for Metrics Collector <Random ID>",<br> "description": "This collector is created using Sumo Logic terraform AWS Kinesis Firehose for metrics module to collect AWS cloudwatch metrics.",<br> "fields": {}<br>}</pre> | no |
34-
| create\_bucket | Provide "true" if you would like to create AWS S3 bucket to store failed logs. Provide "bucket\_details" if set to "false". | `bool` | `true` | no |
35-
| create\_collector | Provide "true" if you would like to create the Sumo Logic Collector. | `bool` | n/a | yes |
36-
| source\_details | Provide details for the Sumo Logic Kinesis Firehose for Metrics source. If not provided, then defaults will be used. | <pre>object({<br> source_name = string<br> source_category = string<br> collector_id = string<br> description = string<br> sumo_account_id = number<br> limit_to_namespaces = list(string)<br> fields = map(string)<br> iam_details = object({<br> create_iam_role = bool<br> iam_role_arn = string<br> })<br> })</pre> | <pre>{<br> "collector_id": "",<br> "description": "This source is created using Sumo Logic terraform AWS Kinesis Firehose for metrics module to collect AWS Cloudwatch metrics.",<br> "fields": {},<br> "iam_details": {<br> "create_iam_role": true,<br> "iam_role_arn": null<br> },<br> "limit_to_namespaces": [],<br> "source_category": "Labs/aws/cloudwatch/metrics",<br> "source_name": "Kinesis Firehose for Metrics Source",<br> "sumo_account_id": 926226587429<br>}</pre> | no |
37-
| sumologic\_organization\_id | Appears on the Account Overview page that displays information about your Sumo Logic organization. Used for IAM Role in Sumo Logic AWS Sources. | `string` | n/a | yes |
38-
| wait\_for\_seconds | wait\_for\_seconds is used to delay sumo logic source creation. This helps persisting IAM role in AWS system.<br> Default value is 180 seconds.<br> If the AWS IAM role is created outside the module, the value can be decreased to 1 second. | `number` | `180` | no |
65+
| <a name="input_bucket_details"></a> [bucket\_details](#input\_bucket\_details) | Provide details for the AWS S3 bucket. If not provided, existing will be used. | <pre>object({<br> bucket_name = string<br> force_destroy_bucket = bool<br> })</pre> | <pre>{<br> "bucket_name": "sumologic-kinesis-firehose-metrics-random-id",<br> "force_destroy_bucket": true<br>}</pre> | no |
66+
| <a name="input_collector_details"></a> [collector\_details](#input\_collector\_details) | Provide details for the Sumo Logic collector. If not provided, then defaults will be used. | <pre>object({<br> collector_name = string<br> description = string<br> fields = map(string)<br> })</pre> | <pre>{<br> "collector_name": "SumoLogic Kinesis Firehose for Metrics Collector <Random ID>",<br> "description": "This collector is created using Sumo Logic terraform AWS Kinesis Firehose for metrics module to collect AWS cloudwatch metrics.",<br> "fields": {}<br>}</pre> | no |
67+
| <a name="input_create_bucket"></a> [create\_bucket](#input\_create\_bucket) | Provide "true" if you would like to create AWS S3 bucket to store failed logs. Provide "bucket\_details" if set to "false". | `bool` | `true` | no |
68+
| <a name="input_create_collector"></a> [create\_collector](#input\_create\_collector) | Provide "true" if you would like to create the Sumo Logic Collector. | `bool` | n/a | yes |
69+
| <a name="input_source_details"></a> [source\_details](#input\_source\_details) | Provide details for the Sumo Logic Kinesis Firehose for Metrics source. If not provided, then defaults will be used. | <pre>object({<br> source_name = string<br> source_category = string<br> collector_id = string<br> description = string<br> sumo_account_id = number<br> limit_to_namespaces = list(string)<br> fields = map(string)<br> iam_details = object({<br> create_iam_role = bool<br> iam_role_arn = string<br> })<br> })</pre> | <pre>{<br> "collector_id": "",<br> "description": "This source is created using Sumo Logic terraform AWS Kinesis Firehose for metrics module to collect AWS Cloudwatch metrics.",<br> "fields": {},<br> "iam_details": {<br> "create_iam_role": true,<br> "iam_role_arn": null<br> },<br> "limit_to_namespaces": [],<br> "source_category": "Labs/aws/cloudwatch/metrics",<br> "source_name": "Kinesis Firehose for Metrics Source",<br> "sumo_account_id": 926226587429<br>}</pre> | no |
70+
| <a name="input_sumologic_organization_id"></a> [sumologic\_organization\_id](#input\_sumologic\_organization\_id) | Appears on the Account Overview page that displays information about your Sumo Logic organization. Used for IAM Role in Sumo Logic AWS Sources. | `string` | n/a | yes |
71+
| <a name="input_wait_for_seconds"></a> [wait\_for\_seconds](#input\_wait\_for\_seconds) | wait\_for\_seconds is used to delay sumo logic source creation. This helps persisting IAM role in AWS system.<br> Default value is 180 seconds.<br> If the AWS IAM role is created outside the module, the value can be decreased to 1 second. | `number` | `180` | no |
3972

4073
## Outputs
4174

4275
| Name | Description |
4376
|------|-------------|
44-
| aws\_cloudwatch\_log\_group | AWS Log group created to attach to delivery stream. |
45-
| aws\_cloudwatch\_log\_stream | AWS Log stream created to attach to log group. |
46-
| aws\_cloudwatch\_metric\_stream | CloudWatch metrics stream to send metrics. |
47-
| aws\_iam\_role | AWS IAM role with permission to setup kinesis firehose metrics. |
48-
| aws\_kinesis\_firehose\_delivery\_stream | AWS Kinesis firehose delivery stream to send metrics to Sumo Logic. |
49-
| aws\_s3\_bucket | AWS S3 Bucket name created to Store the Failed data. |
50-
| random\_string | Random String value created. |
51-
| source\_aws\_iam\_role | AWS IAM role with permission to setup Sumo Logic permissions. |
52-
| sumologic\_collector | Sumo Logic hosted collector. |
53-
| sumologic\_source | Sumo Logic AWS Kinesis Firehose for Metrics source. |
77+
| <a name="output_aws_cloudwatch_log_group"></a> [aws\_cloudwatch\_log\_group](#output\_aws\_cloudwatch\_log\_group) | AWS Log group created to attach to delivery stream. |
78+
| <a name="output_aws_cloudwatch_log_stream"></a> [aws\_cloudwatch\_log\_stream](#output\_aws\_cloudwatch\_log\_stream) | AWS Log stream created to attach to log group. |
79+
| <a name="output_aws_cloudwatch_metric_stream"></a> [aws\_cloudwatch\_metric\_stream](#output\_aws\_cloudwatch\_metric\_stream) | CloudWatch metrics stream to send metrics. |
80+
| <a name="output_aws_iam_role"></a> [aws\_iam\_role](#output\_aws\_iam\_role) | AWS IAM role with permission to setup kinesis firehose metrics. |
81+
| <a name="output_aws_kinesis_firehose_delivery_stream"></a> [aws\_kinesis\_firehose\_delivery\_stream](#output\_aws\_kinesis\_firehose\_delivery\_stream) | AWS Kinesis firehose delivery stream to send metrics to Sumo Logic. |
82+
| <a name="output_aws_s3_bucket"></a> [aws\_s3\_bucket](#output\_aws\_s3\_bucket) | AWS S3 Bucket name created to Store the Failed data. |
83+
| <a name="output_random_string"></a> [random\_string](#output\_random\_string) | Random String value created. |
84+
| <a name="output_source_aws_iam_role"></a> [source\_aws\_iam\_role](#output\_source\_aws\_iam\_role) | AWS IAM role with permission to setup Sumo Logic permissions. |
85+
| <a name="output_sumologic_collector"></a> [sumologic\_collector](#output\_sumologic\_collector) | Sumo Logic hosted collector. |
86+
| <a name="output_sumologic_source"></a> [sumologic\_source](#output\_sumologic\_source) | Sumo Logic AWS Kinesis Firehose for Metrics source. |
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## Requirements
2+
3+
| Name | Version |
4+
|------|---------|
5+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
6+
| <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 |
8+
| <a name="requirement_sumologic"></a> [sumologic](#requirement\_sumologic) | >= 2.28.3, < 3.0.0 |
9+
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.11.1 |
10+
11+
## Providers
12+
13+
No providers.
14+
15+
## Modules
16+
17+
| Name | Source | Version |
18+
|------|--------|---------|
19+
| <a name="module_kinesis_firehose_for_metrics_source_module"></a> [kinesis\_firehose\_for\_metrics\_source\_module](#module\_kinesis\_firehose\_for\_metrics\_source\_module) | SumoLogic/sumo-logic-integrations/sumologic//aws/kinesisfirehoseformetrics | n/a |
20+
21+
## Resources
22+
23+
No resources.
24+
25+
## Inputs
26+
27+
| Name | Description | Type | Default | Required |
28+
|------|-------------|------|---------|:--------:|
29+
| <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 |
30+
| <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 |
31+
| <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 |
32+
| <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 |
33+
34+
## Outputs
35+
36+
No outputs.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
####### BELOW ARE REQUIRED PARAMETERS FOR TERRAFORM SCRIPT #######
2+
# Visit - https://help.sumologic.com/Solutions/AWS_Observability_Solution/03_Set_Up_the_AWS_Observability_Solution#sumo-logic-access-configuration-required
3+
sumologic_environment = "<YOUR SUMO DEPLOYMENT>" # Please replace <YOUR SUMO DEPLOYMENT> (including brackets) with au, ca, de, eu, jp, us2, in, fed or us1.
4+
sumologic_access_id = "<YOUR SUMO ACCESS ID>" # Please replace <YOUR SUMO ACCESS ID> (including brackets) with your Sumo Logic Access ID.
5+
sumologic_access_key = "<YOUR SUMO ACCESS KEY>" # Please replace <YOUR SUMO ACCESS KEY> (including brackets) with your Sumo Logic Access KEY.
6+
sumologic_organization_id = "<YOUR SUMO ORG ID>" # Please replace <YOUR SUMO ORG ID> (including brackets) with your Sumo Logic Organization ID.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module "kinesis_firehose_for_metrics_source_module" {
2+
source = "SumoLogic/sumo-logic-integrations/sumologic//aws/kinesisfirehoseformetrics"
3+
4+
create_collector = true
5+
sumologic_organization_id = var.sumologic_organization_id
6+
wait_for_seconds = 20
7+
8+
source_details = {
9+
source_name = "<Source-Name>"
10+
source_category = "<Source-Category>"
11+
description = "<Source-Description>"
12+
collector_id = null
13+
limit_to_namespaces = []
14+
sumo_account_id = 926226587429
15+
fields = {}
16+
iam_details = {
17+
create_iam_role = true
18+
iam_role_arn = null
19+
}
20+
}
21+
22+
create_bucket = true
23+
bucket_details = {
24+
bucket_name = "<AWS-S3-bucket>"
25+
force_destroy_bucket = false
26+
}
27+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
provider "sumologic" {
2+
environment = var.sumologic_environment
3+
access_id = var.sumologic_access_id
4+
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>
20+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
variable "sumologic_environment" {
2+
type = string
3+
description = "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"
4+
5+
validation {
6+
condition = contains([
7+
"au",
8+
"ca",
9+
"de",
10+
"eu",
11+
"jp",
12+
"us1",
13+
"us2",
14+
"in",
15+
"fed"], var.sumologic_environment)
16+
error_message = "The value must be one of au, ca, de, eu, jp, us1, us2, in, or fed."
17+
}
18+
}
19+
20+
variable "sumologic_access_id" {
21+
type = string
22+
description = "Sumo Logic Access ID. Visit https://help.sumologic.com/Manage/Security/Access-Keys#Create_an_access_key"
23+
24+
validation {
25+
condition = can(regex("\\w+", var.sumologic_access_id))
26+
error_message = "The SumoLogic access ID must contain valid characters."
27+
}
28+
}
29+
30+
variable "sumologic_access_key" {
31+
type = string
32+
description = "Sumo Logic Access Key. Visit https://help.sumologic.com/Manage/Security/Access-Keys#Create_an_access_key"
33+
sensitive = true
34+
35+
validation {
36+
condition = can(regex("\\w+", var.sumologic_access_key))
37+
error_message = "The SumoLogic access key must contain valid characters."
38+
}
39+
}
40+
41+
variable "sumologic_organization_id" {
42+
type = string
43+
description = <<EOT
44+
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."
45+
For more details, visit https://help.sumologic.com/01Start-Here/05Customize-Your-Sumo-Logic-Experience/Preferences-Page
46+
EOT
47+
validation {
48+
condition = can(regex("\\w+", var.sumologic_organization_id))
49+
error_message = "The organization ID must contain valid characters."
50+
}
51+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
terraform {
2+
required_version = ">= 0.13.0"
3+
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = ">= 5.16.2, < 6.0.0"
8+
}
9+
sumologic = {
10+
version = ">= 2.28.3, < 3.0.0"
11+
source = "SumoLogic/sumologic"
12+
}
13+
time = {
14+
source = "hashicorp/time"
15+
version = ">= 0.11.1"
16+
}
17+
random = {
18+
source = "hashicorp/random"
19+
version = ">= 3.1.0"
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)