Skip to content

Commit

Permalink
chore: Remove deprecated variable: enable_kinesis_source
Browse files Browse the repository at this point in the history
  • Loading branch information
fdmsantos committed Feb 19, 2024
1 parent 7aa8e71 commit 1a11d32
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 24 deletions.
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Supports all destinations and all Kinesis Firehose Features.

#### Kinesis Data Stream

**To Enabled it:** `input_source = "kinesis"`. The use of variable `enable_kinesis_source` is deprecated and will be removed on next Major Release.
**To Enabled it:** `input_source = "kinesis"`.

```hcl
module "firehose" {
Expand All @@ -124,7 +124,7 @@ module "firehose" {

If Kinesis Data Stream is encrypted, it's necessary pass this info to module .

**To Enabled It:** `input_source = "kinesis"`. The use of variable `enable_kinesis_source` is deprecated and will be removed on next Major Release.
**To Enabled It:** `input_source = "kinesis"`.

**KMS Key:** use `kinesis_source_kms_arn` variable to indicate the KMS Key to module add permissions to policy to decrypt the Kinesis Data Stream.

Expand Down Expand Up @@ -499,7 +499,7 @@ module "firehose" {
source = "fdmsantos/kinesis-firehose/aws"
version = "x.x.x"
name = "firehose-delivery-stream"
enable_kinesis_source = true
input_source = "kinesis"
kinesis_source_stream_arn = "<kinesis_stream_arn>"
destination = "s3" # or destination = "extended_s3"
s3_bucket_arn = "<bucket_arn>"
Expand All @@ -524,7 +524,7 @@ module "firehose" {
source = "fdmsantos/kinesis-firehose/aws"
version = "x.x.x"
name = "firehose-delivery-stream"
enable_kinesis_source = true
input_source = "kinesis"
kinesis_source_stream_arn = "<kinesis_stream_arn>"
destination = "s3" # or destination = "extended_s3"
s3_bucket_arn = "<bucket_arn>"
Expand All @@ -550,7 +550,7 @@ module "firehose" {
source = "fdmsantos/kinesis-firehose/aws"
version = "x.x.x"
name = "firehose-delivery-stream"
enable_kinesis_source = true
input_source = "kinesis"
kinesis_source_stream_arn = "<kinesis_stream_arn>"
destination = "s3" # or destination = "extended_s3"
s3_bucket_arn = "<bucket_arn>"
Expand Down Expand Up @@ -958,7 +958,6 @@ No modules.
| <a name="input_enable_data_format_conversion"></a> [enable\_data\_format\_conversion](#input\_enable\_data\_format\_conversion) | Set it to true if you want to disable format conversion. | `bool` | `false` | no |
| <a name="input_enable_destination_log"></a> [enable\_destination\_log](#input\_enable\_destination\_log) | The CloudWatch Logging Options for the delivery stream | `bool` | `true` | no |
| <a name="input_enable_dynamic_partitioning"></a> [enable\_dynamic\_partitioning](#input\_enable\_dynamic\_partitioning) | Enables or disables dynamic partitioning | `bool` | `false` | no |
| <a name="input_enable_kinesis_source"></a> [enable\_kinesis\_source](#input\_enable\_kinesis\_source) | DEPRECATED: Use instead `input_source = "kinesis"` | `bool` | `false` | no |
| <a name="input_enable_lambda_transform"></a> [enable\_lambda\_transform](#input\_enable\_lambda\_transform) | Set it to true to enable data transformation with lambda | `bool` | `false` | no |
| <a name="input_enable_s3_backup"></a> [enable\_s3\_backup](#input\_enable\_s3\_backup) | The Amazon S3 backup mode | `bool` | `false` | no |
| <a name="input_enable_s3_encryption"></a> [enable\_s3\_encryption](#input\_enable\_s3\_encryption) | Indicates if want use encryption in S3 bucket. | `bool` | `false` | no |
Expand Down Expand Up @@ -1095,12 +1094,6 @@ No modules.
| <a name="output_s3_cross_account_bucket_policy"></a> [s3\_cross\_account\_bucket\_policy](#output\_s3\_cross\_account\_bucket\_policy) | Bucket Policy to S3 Bucket Destination when the bucket belongs to another account |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

## Deprecation

### Version >= 2.1.0

* variable `enable_kinesis_source` is deprecated. Use instead `input_source = "kinesis"`.

## Upgrade

- Version 1.x to 2.x Upgrade Guide [here](https://github.com/fdmsantos/terraform-aws-kinesis-firehose/blob/main/UPGRADE-2.0.md)
Expand Down
4 changes: 4 additions & 0 deletions UPGRADE-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ If you find a bug, please open an issue with supporting configuration to reprodu
4. Added variables:

- All variables prefixed with opensearch and opensearchserverless

5. Deprecations

- Variable `enable_kinesis_source` removed. Use instead `input_source = "kinesis"`.
2 changes: 1 addition & 1 deletion examples/s3/kinesis-to-s3-basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource "aws_kinesis_stream" "this" {
module "firehose" {
source = "../../../"
name = "${var.name_prefix}-delivery-stream"
enable_kinesis_source = true
input_source = "kinesis"
kinesis_source_stream_arn = aws_kinesis_stream.this.arn
destination = "s3"
s3_bucket_arn = aws_s3_bucket.s3.arn
Expand Down
2 changes: 1 addition & 1 deletion examples/s3/kinesis-to-s3-complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module "firehose" {
name = "${var.name_prefix}-delivery-stream"
buffering_size = 100
buffering_interval = 100
enable_kinesis_source = true
input_source = "kinesis"
kinesis_source_stream_arn = aws_kinesis_stream.this.arn
destination = "s3"
s3_bucket_arn = aws_s3_bucket.s3.arn
Expand Down
6 changes: 3 additions & 3 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ data "aws_iam_policy_document" "cross_account_elasticsearch" {
##################
# OpenSearch
##################
data "aws_iam_policy_document" "opensearch" { # TODO Change Actions
data "aws_iam_policy_document" "opensearch" {
count = local.add_opensearch_policy ? 1 : 0
statement {
effect = "Allow"
Expand Down Expand Up @@ -455,7 +455,7 @@ resource "aws_iam_role_policy_attachment" "opensearch" {
policy_arn = aws_iam_policy.opensearch[0].arn
}

data "aws_iam_policy_document" "cross_account_opensearch" { # TODO Change Actions
data "aws_iam_policy_document" "cross_account_opensearch" {
count = local.add_opensearch_policy && var.destination_cross_account ? 1 : 0
version = "2012-10-17"
statement {
Expand All @@ -482,7 +482,7 @@ data "aws_iam_policy_document" "cross_account_opensearch" { # TODO Change Action
"${var.opensearch_domain_arn}/${var.opensearch_index_name}*/_stats"
]
}
} # TODO Change Actions
}

resource "aws_iam_service_linked_role" "opensearch" {
count = contains(["elasticsearch", "opensearch"], local.destination) && var.enable_vpc && var.opensearch_vpc_create_service_linked_role ? 1 : 0
Expand Down
2 changes: 1 addition & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ locals {
cw_log_group_name = "/aws/kinesisfirehose/${var.name}"
cw_log_delivery_stream_name = "DestinationDelivery"
cw_log_backup_stream_name = "BackupDelivery"
source = var.enable_kinesis_source ? "kinesis" : var.input_source # TODO: This should be removed when delete enable_kinesis_source variable (Next Major Version)
source = var.input_source
is_kinesis_source = local.source == "kinesis" ? true : false
is_waf_source = local.source == "waf" ? true : false
destinations = {
Expand Down
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,6 @@ variable "sse_kms_key_arn" {
default = null
}

variable "enable_kinesis_source" {
description = "DEPRECATED: Use instead `input_source = \"kinesis\"`"
type = bool
default = false
}

variable "kinesis_source_stream_arn" {
description = "The kinesis stream used as the source of the firehose delivery stream"
type = string
Expand Down

0 comments on commit 1a11d32

Please sign in to comment.