Skip to content

Commit

Permalink
BREAKING CHANGE: Add support to AWS Provider Version 5
Browse files Browse the repository at this point in the history
  • Loading branch information
fdmsantos committed Sep 18, 2023
1 parent d52a71f commit 4a0a404
Show file tree
Hide file tree
Showing 62 changed files with 318 additions and 240 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# AWS Kinesis Firehose Terraform module

[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)

Dynamic Terraform module, which creates a Kinesis Firehose Stream and others resources like Cloudwatch, IAM Roles and Security Groups that integrate with Kinesis Firehose.
Supports all destinations and all Kinesis Firehose Features.

Expand Down Expand Up @@ -51,7 +53,7 @@ Supports all destinations and all Kinesis Firehose Features.
| Module version | AWS Provider version |
|----------------|----------------------|
| >= 1.x.x | ~> 4.4 |
| >= 2.x.x | ~> 5.0 (WIP) |
| >= 2.x.x | ~> 5.0 |

## Features

Expand Down Expand Up @@ -743,13 +745,13 @@ The destination variable configured in module is mapped to firehose valid destin
| 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_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.4 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 5.0 |

## Modules

Expand Down Expand Up @@ -820,8 +822,8 @@ No modules.
| <a name="input_application_role_service_principal"></a> [application\_role\_service\_principal](#input\_application\_role\_service\_principal) | AWS Service Principal to assume application role | `string` | `null` | no |
| <a name="input_application_role_tags"></a> [application\_role\_tags](#input\_application\_role\_tags) | A map of tags to assign to IAM Application role | `map(string)` | `{}` | no |
| <a name="input_associate_role_to_redshift_cluster"></a> [associate\_role\_to\_redshift\_cluster](#input\_associate\_role\_to\_redshift\_cluster) | Set it to false if don't want the module associate the role to redshift cluster | `bool` | `true` | no |
| <a name="input_buffer_interval"></a> [buffer\_interval](#input\_buffer\_interval) | Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination | `number` | `300` | no |
| <a name="input_buffer_size"></a> [buffer\_size](#input\_buffer\_size) | Buffer incoming data to the specified size, in MBs, before delivering it to the destination. | `number` | `5` | no |
| <a name="input_buffering_interval"></a> [buffering\_interval](#input\_buffering\_interval) | Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination | `number` | `300` | no |
| <a name="input_buffering_size"></a> [buffering\_size](#input\_buffering\_size) | Buffer incoming data to the specified size, in MBs, before delivering it to the destination. | `number` | `5` | no |
| <a name="input_configure_existing_application_role"></a> [configure\_existing\_application\_role](#input\_configure\_existing\_application\_role) | Set it to True if want use existing application role to add the firehose Policy | `bool` | `false` | no |
| <a name="input_coralogix_endpoint_location"></a> [coralogix\_endpoint\_location](#input\_coralogix\_endpoint\_location) | Endpoint Location to coralogix destination | `string` | `"ireland"` | no |
| <a name="input_coralogix_parameter_application_name"></a> [coralogix\_parameter\_application\_name](#input\_coralogix\_parameter\_application\_name) | By default, your delivery stream arn will be used as applicationName | `string` | `null` | no |
Expand Down Expand Up @@ -930,8 +932,8 @@ No modules.
| <a name="input_role_permissions_boundary"></a> [role\_permissions\_boundary](#input\_role\_permissions\_boundary) | The ARN of the policy that is used to set the permissions boundary for the IAM role used by Kinesis Firehose Stream | `string` | `null` | no |
| <a name="input_role_tags"></a> [role\_tags](#input\_role\_tags) | A map of tags to assign to IAM role | `map(string)` | `{}` | no |
| <a name="input_s3_backup_bucket_arn"></a> [s3\_backup\_bucket\_arn](#input\_s3\_backup\_bucket\_arn) | The ARN of the S3 backup bucket | `string` | `null` | no |
| <a name="input_s3_backup_buffer_interval"></a> [s3\_backup\_buffer\_interval](#input\_s3\_backup\_buffer\_interval) | Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination. | `number` | `300` | no |
| <a name="input_s3_backup_buffer_size"></a> [s3\_backup\_buffer\_size](#input\_s3\_backup\_buffer\_size) | Buffer incoming data to the specified size, in MBs, before delivering it to the destination. | `number` | `5` | no |
| <a name="input_s3_backup_buffering_interval"></a> [s3\_backup\_buffering\_interval](#input\_s3\_backup\_buffering\_interval) | Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination. | `number` | `300` | no |
| <a name="input_s3_backup_buffering_size"></a> [s3\_backup\_buffering\_size](#input\_s3\_backup\_buffering\_size) | Buffer incoming data to the specified size, in MBs, before delivering it to the destination. | `number` | `5` | no |
| <a name="input_s3_backup_compression"></a> [s3\_backup\_compression](#input\_s3\_backup\_compression) | The compression format | `string` | `"UNCOMPRESSED"` | no |
| <a name="input_s3_backup_create_cw_log_group"></a> [s3\_backup\_create\_cw\_log\_group](#input\_s3\_backup\_create\_cw\_log\_group) | Enables or disables the cloudwatch log group creation | `bool` | `true` | no |
| <a name="input_s3_backup_enable_encryption"></a> [s3\_backup\_enable\_encryption](#input\_s3\_backup\_enable\_encryption) | Indicates if want enable KMS Encryption in S3 Backup Bucket. | `bool` | `false` | no |
Expand All @@ -946,6 +948,8 @@ No modules.
| <a name="input_s3_backup_use_existing_role"></a> [s3\_backup\_use\_existing\_role](#input\_s3\_backup\_use\_existing\_role) | Indicates if want use the kinesis firehose role to s3 backup bucket access. | `bool` | `true` | no |
| <a name="input_s3_bucket_arn"></a> [s3\_bucket\_arn](#input\_s3\_bucket\_arn) | The ARN of the S3 destination bucket | `string` | `null` | no |
| <a name="input_s3_compression_format"></a> [s3\_compression\_format](#input\_s3\_compression\_format) | The compression format | `string` | `"UNCOMPRESSED"` | no |
| <a name="input_s3_configuration_buffering_interval"></a> [s3\_configuration\_buffering\_interval](#input\_s3\_configuration\_buffering\_interval) | Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination. | `number` | `300` | no |
| <a name="input_s3_configuration_buffering_size"></a> [s3\_configuration\_buffering\_size](#input\_s3\_configuration\_buffering\_size) | Buffer incoming data to the specified size, in MBs, before delivering it to the destination. The default value is 5. We recommend setting SizeInMBs to a value greater than the amount of data you typically ingest into the delivery stream in 10 seconds. For example, if you typically ingest data at 1 MB/sec set SizeInMBs to be 10 MB or higher. | `number` | `5` | no |
| <a name="input_s3_cross_account"></a> [s3\_cross\_account](#input\_s3\_cross\_account) | Indicates if S3 bucket destination is in a different account | `bool` | `false` | no |
| <a name="input_s3_error_output_prefix"></a> [s3\_error\_output\_prefix](#input\_s3\_error\_output\_prefix) | Prefix added to failed records before writing them to S3. This prefix appears immediately following the bucket name. | `string` | `null` | no |
| <a name="input_s3_kms_key_arn"></a> [s3\_kms\_key\_arn](#input\_s3\_kms\_key\_arn) | Specifies the KMS key ARN the stream will use to encrypt data. If not set, no encryption will be used | `string` | `null` | no |
Expand Down
22 changes: 22 additions & 0 deletions UPGRADE-2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Upgrade from v1.x to v2.x

If you have any questions regarding this upgrade process, please consult the `examples` directory

If you find a bug, please open an issue with supporting configuration to reproduce.

## List of backwards incompatible changes

### Variable and output changes

1. Renamed variables:

- `buffer_size` -> `buffering_size`
- `buffer_interval` -> `buffering_interval`
- `s3_backup_buffer_size` -> `s3_backup_buffering_size`
- `s3_backup_buffer_interval` -> `s3_backup_buffering_interval`

2. Added variables:

- `s3_configuration_buffering_size` has been added to S3 Configuration block. On version 1 buffer size for s3 configuration was the same as destination. Now you can configure different buffer size
- `s3_configuration_buffering_interval` has been added to S3 Configuration block. On version 1 buffer interval for s3 configuration was the same as destination. Now you can configure different buffer interval

6 changes: 3 additions & 3 deletions examples/elasticsearch/opensearch-in-vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ Note that this example may create resources which cost money. Run `terraform des
| 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_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
| <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_aws"></a> [aws](#provider\_aws) | ~> 5.0 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

## Modules
Expand Down Expand Up @@ -70,11 +70,11 @@ Note that this example may create resources which cost money. Run `terraform des

| Name | Description |
|------|-------------|
| <a name="output_dashboard_endpoint"></a> [dashboard\_endpoint](#output\_dashboard\_endpoint) | Kibana Endpoint |
| <a name="output_destination_security_group"></a> [destination\_security\_group](#output\_destination\_security\_group) | Destination Security Group |
| <a name="output_es_domain"></a> [es\_domain](#output\_es\_domain) | Opensearch Domain |
| <a name="output_es_endpoint"></a> [es\_endpoint](#output\_es\_endpoint) | Opensearch Endpoint |
| <a name="output_firehose_role"></a> [firehose\_role](#output\_firehose\_role) | Firehose Role |
| <a name="output_firehose_security_group"></a> [firehose\_security\_group](#output\_firehose\_security\_group) | Firehose Security Group |
| <a name="output_kibana_endpoint"></a> [kibana\_endpoint](#output\_kibana\_endpoint) | Kibana Endpoint |
| <a name="output_opensearch_iam_service_linked_role_arn"></a> [opensearch\_iam\_service\_linked\_role\_arn](#output\_opensearch\_iam\_service\_linked\_role\_arn) | AWS Opensearch iam Service Linked Role |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
6 changes: 3 additions & 3 deletions examples/elasticsearch/opensearch-in-vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module "firehose" {
source = "../../../"
name = "${var.name_prefix}-delivery-stream"
destination = "opensearch"
buffer_interval = 60
buffering_interval = 60
elasticsearch_domain_arn = aws_opensearch_domain.this.arn
elasticsearch_index_name = "test"
elasticsearch_enable_vpc = true
Expand All @@ -101,8 +101,8 @@ module "firehose" {
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_buffering_interval = 100
s3_backup_buffering_size = 100
s3_backup_compression = "GZIP"
s3_backup_enable_encryption = true
s3_backup_kms_key_arn = aws_kms_key.this.arn
Expand Down
4 changes: 2 additions & 2 deletions examples/elasticsearch/opensearch-in-vpc/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ output "es_endpoint" {
value = aws_opensearch_domain.this.endpoint
}

output "kibana_endpoint" {
output "dashboard_endpoint" {
description = "Kibana Endpoint"
value = aws_opensearch_domain.this.kibana_endpoint
value = aws_opensearch_domain.this.dashboard_endpoint
}

output "opensearch_iam_service_linked_role_arn" {
Expand Down
2 changes: 1 addition & 1 deletion examples/elasticsearch/opensearch-in-vpc/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.4"
version = "~> 5.0"
}
random = {
source = "hashicorp/random"
Expand Down
6 changes: 3 additions & 3 deletions examples/elasticsearch/public-opensearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ Note that this example may create resources which cost money. Run `terraform des
| 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_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
| <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_aws"></a> [aws](#provider\_aws) | ~> 5.0 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

## Modules
Expand Down Expand Up @@ -64,8 +64,8 @@ Note that this example may create resources which cost money. Run `terraform des

| Name | Description |
|------|-------------|
| <a name="output_dashboard_endpoint"></a> [dashboard\_endpoint](#output\_dashboard\_endpoint) | Kibana Endpoint |
| <a name="output_es_domain"></a> [es\_domain](#output\_es\_domain) | Opensearch Domain |
| <a name="output_es_endpoint"></a> [es\_endpoint](#output\_es\_endpoint) | Opensearch Endpoint |
| <a name="output_firehose_role"></a> [firehose\_role](#output\_firehose\_role) | Firehose Role |
| <a name="output_kibana_endpoint"></a> [kibana\_endpoint](#output\_kibana\_endpoint) | Kibana Endpoint |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
28 changes: 14 additions & 14 deletions examples/elasticsearch/public-opensearch/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,18 @@ POLICIES
}

module "firehose" {
source = "../../../"
name = "${var.name_prefix}-delivery-stream"
destination = "opensearch"
buffer_interval = 60
elasticsearch_domain_arn = aws_opensearch_domain.this.arn
elasticsearch_index_name = "test"
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
source = "../../../"
name = "${var.name_prefix}-delivery-stream"
destination = "opensearch"
buffering_interval = 60
elasticsearch_domain_arn = aws_opensearch_domain.this.arn
elasticsearch_index_name = "test"
s3_backup_mode = "All"
s3_backup_prefix = "backup/"
s3_backup_bucket_arn = aws_s3_bucket.s3.arn
s3_backup_buffering_interval = 100
s3_backup_buffering_size = 100
s3_backup_compression = "GZIP"
s3_backup_enable_encryption = true
s3_backup_kms_key_arn = aws_kms_key.this.arn
}
4 changes: 2 additions & 2 deletions examples/elasticsearch/public-opensearch/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ output "firehose_role" {
value = module.firehose.kinesis_firehose_role_arn
}

output "kibana_endpoint" {
output "dashboard_endpoint" {
description = "Kibana Endpoint"
value = aws_opensearch_domain.this.kibana_endpoint
value = aws_opensearch_domain.this.dashboard_endpoint
}
2 changes: 1 addition & 1 deletion examples/elasticsearch/public-opensearch/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.4"
version = "~> 5.0"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/http-endpoint/coralogix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ coralogix_private_key = "<coralogix_private_key>"
| 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_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
| <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_aws"></a> [aws](#provider\_aws) | ~> 5.0 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

## Modules
Expand Down
6 changes: 3 additions & 3 deletions examples/http-endpoint/coralogix/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module "firehose" {
source = "../../../"
name = "${var.name_prefix}-delivery-stream"
destination = "coralogix"
buffer_interval = 60
buffering_interval = 60
coralogix_endpoint_location = "ireland"
http_endpoint_access_key = var.coralogix_private_key
http_endpoint_retry_duration = 30
Expand All @@ -26,8 +26,8 @@ module "firehose" {
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_buffering_interval = 100
s3_backup_buffering_size = 100
s3_backup_compression = "GZIP"
s3_backup_enable_encryption = true
s3_backup_kms_key_arn = aws_kms_key.this.arn
Expand Down
2 changes: 1 addition & 1 deletion examples/http-endpoint/coralogix/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.4"
version = "~> 5.0"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/http-endpoint/custom-http-endpoint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ http_endpoint_access_key = "<http_endpoint_access_key>"
| 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_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
| <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_aws"></a> [aws](#provider\_aws) | ~> 5.0 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

## Modules
Expand Down
18 changes: 9 additions & 9 deletions examples/http-endpoint/custom-http-endpoint/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module "firehose" {
source = "../../../"
name = "${var.name_prefix}-delivery-stream"
destination = "http_endpoint"
buffer_interval = 60
buffering_interval = 60
http_endpoint_name = var.http_endpoint_name
http_endpoint_url = var.http_endpoint_url
http_endpoint_access_key = var.http_endpoint_access_key
Expand All @@ -33,12 +33,12 @@ module "firehose" {
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
s3_backup_mode = "All"
s3_backup_prefix = "backup/"
s3_backup_bucket_arn = aws_s3_bucket.s3.arn
s3_backup_buffering_interval = 100
s3_backup_buffering_size = 100
s3_backup_compression = "GZIP"
s3_backup_enable_encryption = true
s3_backup_kms_key_arn = aws_kms_key.this.arn
}
2 changes: 1 addition & 1 deletion examples/http-endpoint/custom-http-endpoint/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.4"
version = "~> 5.0"
}
random = {
source = "hashicorp/random"
Expand Down
Loading

0 comments on commit 4a0a404

Please sign in to comment.