InvalidArgumentException:目前不支持启用或禁用动态分区

InvalidArgumentException: Enabling or disabling Dynamic Partitioning is not supported at the moment

当我尝试在我的项目中 运行 terraform apply 时,它抛出以下错误:

 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" {
│ 
╵

因为这部分:

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
    }

我的 provider.tf 文件中已有最新版本:

  required_providers {
    archive = {
      source  = "hashicorp/archive"
      version = "2.2.0"
    }
    aws     = {
      source  = "hashicorp/aws"
      version = "3.72.0"
    }
  }

但是,当我在我的终端上查看 terraform version 时,我得到了这个:

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

我已经试过了terraform init -upgrade但这并没有什么不同either.I也从网站上手动下载了terraform的新版本但是我的终端仍然显示1.0.7

是的,这是目前的限制。目前,您只能在创建新传输流时启用动态分区,而不能在现有传输流上启用。

来自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.

这意味着,如果你想使用当前的功能,你将不得不创建一个新的流。