Skip to content

Commit 60fe753

Browse files
committed
Adding documentation for Kinesis Metric Source
1 parent c96fb2f commit 60fe753

File tree

1 file changed

+131
-0
lines changed

1 file changed

+131
-0
lines changed
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
layout: "sumologic"
3+
page_title: "SumoLogic: sumologic_kinesis_metrics_source"
4+
description: |-
5+
Provides a Sumologic Kinesis Metrics source. This source is used to integrate with Metrics Stream via Kinesis Firehose from AWS.
6+
---
7+
8+
# sumologic_kinesis_metrics_source
9+
10+
Provides a Sumologic Kinesis Metrics source. This source is used to ingest data from Cloudwatch Metrics Stream via Kinesis Firehose from AWS.
11+
12+
__IMPORTANT:__ The AWS credentials are stored in plain-text in the state. This is a potential security issue.
13+
14+
## Example Usage
15+
```hcl
16+
locals {
17+
tagfilters = [{
18+
"type" = "TagFilters"
19+
"namespace" = "All"
20+
"tags" = ["k3=v3"]
21+
},{
22+
"type" = "TagFilters"
23+
"namespace" = "AWS/Route53"
24+
"tags" = ["k1=v1"]
25+
},{
26+
"type" = "TagFilters"
27+
"namespace" = "AWS/S3"
28+
"tags" = ["k2=v2"]
29+
}]
30+
}
31+
32+
resource "sumologic_kinesis_metrics_source" "kinesis_metrics_access_key" {
33+
name = "Kinesis Metrics"
34+
description = "Description for Kinesis Metrics Source"
35+
category = "prod/kinesis/metrics"
36+
content_type = "KinesisMetric"
37+
collector_id = "${sumologic_collector.collector.id}"
38+
authentication {
39+
type = "S3BucketAuthentication"
40+
access_key = "someKey"
41+
secret_key = "******"
42+
}
43+
44+
path {
45+
type = "KinesisMetricPath"
46+
tag_filters {
47+
type = "TagFilters"
48+
namespace = "All"
49+
tags = ["k3=v3"]
50+
}
51+
tag_filters {
52+
type = "TagFilters"
53+
namespace = "AWS/Route53"
54+
tags = ["k1=v1"]
55+
}
56+
}
57+
}
58+
59+
resource "sumologic_kinesis_metrics_source" "kinesis_metrics_role_arn" {
60+
name = "Kinesis Metrics"
61+
description = "Description for Kinesis Metrics Source"
62+
category = "prod/kinesis/metrics"
63+
content_type = "KinesisMetric"
64+
collector_id = "${sumologic_collector.collector.id}"
65+
66+
authentication {
67+
type = "AWSRoleBasedAuthentication"
68+
role_arn = "arn:aws:iam::604066827510:role/cw-role-SumoRole-4AOLS73TGKYI"
69+
}
70+
71+
path {
72+
type = "KinesisMetricPath"
73+
tag_filters {
74+
type = "TagFilters"
75+
namespace = "All"
76+
tags = ["k3=v3"]
77+
}
78+
tag_filters {
79+
type = "TagFilters"
80+
namespace = "AWS/Route53"
81+
tags = ["k1=v1"]
82+
}
83+
}
84+
}
85+
86+
resource "sumologic_collector" "collector" {
87+
name = "my-collector"
88+
description = "Just testing this"
89+
}
90+
```
91+
92+
## Argument reference
93+
94+
In addition to the common properties, the following arguments are supported:
95+
96+
- `content_type` - (Required) The content-type of the collected data. Details can be found in the [Sumologic documentation for hosted sources][1].
97+
- `authentication` - (Required) Authentication details for connecting to the S3 bucket.
98+
+ `type` - (Required) Must be either `S3BucketAuthentication` or `AWSRoleBasedAuthentication`
99+
+ `access_key` - (Required) Your AWS access key if using type `S3BucketAuthentication`
100+
+ `secret_key` - (Required) Your AWS secret key if using type `S3BucketAuthentication`
101+
+ `role_arn` - (Required) Your AWS role ARN if using type `AWSRoleBasedAuthentication`
102+
- `path` - (Required) The location to scan for new data.
103+
+ `type` - (Required) Must be `KinesisMetricPath`
104+
+ `tag_filters` - (Optional) Tag filters allow you to filter the CloudWatch metrics you collect by the AWS tags you have assigned to your AWS resources. You can define tag filters for each supported namespace. If you do not define any tag filters, all metrics will be collected for the regions and namespaces you configured for the source above. More info on tag filters can be found [here](https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/Amazon-Web-Services/Amazon-CloudWatch-Source-for-Metrics#about-aws-tag-filtering)
105+
+ `type` - This value has to be set to `TagFilters`
106+
+ `namespace` - Namespace for which you want to define the tag filters. Use value as `All` to apply the tag filter for all namespaces.
107+
+ `tags` - List of key-value pairs of tag filters. Eg: `["k3=v3"]`
108+
109+
### See also
110+
* [Common Source Properties](https://github.com/SumoLogic/terraform-provider-sumologic/tree/master/website#common-source-properties)
111+
112+
## Attributes Reference
113+
The following attributes are exported:
114+
115+
- `id` - The internal ID of the source.
116+
- `url` - The HTTP endpoint to used while creating Kinesis Firehose on AWS.
117+
118+
## Import
119+
Kinesis Metrics sources can be imported using the collector and source IDs (`collector/source`), e.g.:
120+
121+
```hcl
122+
terraform import sumologic_kinesis_metrics_source_source.test 123/456
123+
```
124+
125+
HTTP sources can be imported using the collector name and source name (`collectorName/sourceName`), e.g.:
126+
127+
```hcl
128+
terraform import sumologic_kinesis_metrics_source.test my-test-collector/my-test-source
129+
```
130+
131+
[1]: https://help.sumologic.com/Send_Data/Sources/03Use_JSON_to_Configure_Sources/JSON_Parameters_for_Hosted_Sources

0 commit comments

Comments
 (0)