-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
311 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Datadog | ||
|
||
Configuration in this directory creates kinesis firehose stream with Direct Put as source and dynatrace as destination to Europe. | ||
|
||
This example can be tested with Demo Data in Kinesis Firehose Console. | ||
|
||
## Usage | ||
|
||
To run this example you need to execute: | ||
|
||
```bash | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
|
||
It's necessary configure the following variables: | ||
|
||
```hcl | ||
dynatrace_api_token = "<dynatrace_api_token>" | ||
dynatrace_api_url = "<dynatrace_api_url>" | ||
``` | ||
|
||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 | | ||
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.4 | | ||
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.4 | | ||
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 | | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_firehose"></a> [firehose](#module\_firehose) | ../../../ | n/a | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [aws_kms_key.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | resource | | ||
| [aws_s3_bucket.s3](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource | | ||
| [random_pet.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_dynatrace_api_token"></a> [dynatrace\_api\_token](#input\_dynatrace\_api\_token) | Dynatrace Api Token | `string` | n/a | yes | | ||
| <a name="input_dynatrace_api_url"></a> [dynatrace\_api\_url](#input\_dynatrace\_api\_url) | Dynatrace Api url | `string` | n/a | yes | | ||
| <a name="input_name_prefix"></a> [name\_prefix](#input\_name\_prefix) | Name prefix to use in resources | `string` | `"firehose-to-dynatrace"` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_firehose_role"></a> [firehose\_role](#output\_firehose\_role) | Firehose Role | | ||
| <a name="output_kinesis_firehose_arn"></a> [kinesis\_firehose\_arn](#output\_kinesis\_firehose\_arn) | The ARN of the Kinesis Firehose Stream | | ||
| <a name="output_kinesis_firehose_destination_id"></a> [kinesis\_firehose\_destination\_id](#output\_kinesis\_firehose\_destination\_id) | The Destination id of the Kinesis Firehose Stream | | ||
| <a name="output_kinesis_firehose_version_id"></a> [kinesis\_firehose\_version\_id](#output\_kinesis\_firehose\_version\_id) | The Version id of the Kinesis Firehose Stream | | ||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
resource "random_pet" "this" { | ||
length = 2 | ||
} | ||
|
||
resource "aws_s3_bucket" "s3" { | ||
bucket = "${var.name_prefix}-destination-bucket-${random_pet.this.id}" | ||
force_destroy = true | ||
} | ||
|
||
resource "aws_kms_key" "this" { | ||
description = "${var.name_prefix}-kms-key" | ||
deletion_window_in_days = 7 | ||
} | ||
|
||
module "firehose" { | ||
source = "../../../" | ||
name = "${var.name_prefix}-delivery-stream" | ||
destination = "dynatrace" | ||
buffer_interval = 60 | ||
dynatrace_endpoint_location = "eu" | ||
dynatrace_api_url = var.dynatrace_api_url | ||
http_endpoint_access_key = var.dynatrace_api_token | ||
http_endpoint_retry_duration = 60 | ||
http_endpoint_enable_request_configuration = true | ||
http_endpoint_request_configuration_content_encoding = "GZIP" | ||
http_endpoint_request_configuration_common_attributes = [ | ||
{ | ||
name = "testname" | ||
value = "testvalue" | ||
}, | ||
{ | ||
name = "testname2" | ||
value = "testvalue2" | ||
} | ||
] | ||
s3_backup_mode = "All" | ||
s3_backup_prefix = "backup/" | ||
s3_backup_bucket_arn = aws_s3_bucket.s3.arn | ||
s3_backup_buffer_interval = 100 | ||
s3_backup_buffer_size = 100 | ||
s3_backup_compression = "GZIP" | ||
s3_backup_enable_encryption = true | ||
s3_backup_kms_key_arn = aws_kms_key.this.arn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
output "firehose_role" { | ||
description = "Firehose Role" | ||
value = module.firehose.kinesis_firehose_role_arn | ||
} | ||
|
||
output "kinesis_firehose_arn" { | ||
description = "The ARN of the Kinesis Firehose Stream" | ||
value = module.firehose.kinesis_firehose_arn | ||
} | ||
|
||
output "kinesis_firehose_destination_id" { | ||
description = "The Destination id of the Kinesis Firehose Stream" | ||
value = module.firehose.kinesis_firehose_destination_id | ||
} | ||
|
||
output "kinesis_firehose_version_id" { | ||
description = "The Version id of the Kinesis Firehose Stream" | ||
value = module.firehose.kinesis_firehose_version_id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
variable "name_prefix" { | ||
description = "Name prefix to use in resources" | ||
type = string | ||
default = "firehose-to-dynatrace" | ||
} | ||
|
||
variable "dynatrace_api_token" { | ||
description = "Dynatrace Api Token" | ||
type = string | ||
sensitive = true | ||
} | ||
|
||
variable "dynatrace_api_url" { | ||
description = "Dynatrace Api url" | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
terraform { | ||
required_version = ">= 0.13.1" | ||
|
||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 4.4" | ||
} | ||
random = { | ||
source = "hashicorp/random" | ||
version = ">= 2.0" | ||
} | ||
} | ||
} |
Oops, something went wrong.