When I try to run terraform apply
in my project, it throws the following error:
Error: Error Updating Kinesis Firehose Delivery Stream: "delivery"
│ InvalidArgumentException: Enabling or disabling Dynamic Partitioning is not supported at the moment
│
│ with module.shippeo-api.module.v1.aws_kinesis_firehose_delivery_stream.event-eta,
│ on ../../modules/api_gateway_v1/kinesis.tf line 12, in resource "aws_kinesis_firehose_delivery_stream" "event-eta":
│ 12: resource "aws_kinesis_firehose_delivery_stream" "event-eta" {
│
╵
because of this part:
resource "aws_kinesis_firehose_delivery_stream" "event-eta" {
name = local.firehose_delivery_stream
destination = "extended_s3"
extended_s3_configuration {
role_arn = var.integration_role_arn
#bucket_arn = aws_s3_bucket.jsonfiles.arn
bucket_arn = var.target_bucket_arn
prefix = "!{partitionKeyFromLambda:apiPath}/!{partitionKeyFromLambda:authorizerClientId}/!{timestamp:yyyy}/!{timestamp:MM}/!{timestamp:dd}/!{timestamp:HH}/"
#prefix = "!{timestamp:yyyy}/!{timestamp:MM}/!{timestamp:dd}/!{timestamp:HH}/"
error_output_prefix = "error/!{timestamp:yyyy}/!{timestamp:MM}/!{timestamp:dd}/!{timestamp:HH}/!{firehose:error-output-type}"
dynamic_partitioning_configuration {
enabled = true
}
I already have the latest version in my provider.tf files:
required_providers {
archive = {
source = "hashicorp/archive"
version = "2.2.0"
}
aws = {
source = "hashicorp/aws"
version = "3.72.0"
}
}
However, when I check terraform version
on my terminal, I get this:
Terraform v1.0.7
on darwin_amd64
+ provider registry.terraform.io/hashicorp/archive v2.2.0
+ provider registry.terraform.io/hashicorp/aws v3.72.0
Your version of Terraform is out of date! The latest version
is 1.1.4. You can update by downloading from https://www.terraform.io/downloads.html
I already tried terraform init -upgrade
but that didn't make a difference either.I also manually downloaded terraform's new version from the website but my terminal still shows 1.0.7
Yes, that's limitation at the moment. Currently, you can enable the dynamic partitioning only while creating a new delivery stream but not on existing delivery streams.
From AWS documentation:
Important You can enable dynamic partitioning only when you create a new delivery stream. You cannot enable dynamic partitioning for an existing delivery stream that does not have dynamic partitioning already enabled.
It means, if you want to use the feature currently, you will have to create a new stream.