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

2023-09-04 02:22:25 作者:离人怎挽

当我尝试在项目中运行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,但也没有效果。我也从网站手动下载了Terraform的新版本,但我的终端仍然显示1.0.7

推荐答案

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

发件人AWS documentation:

重要信息仅当您创建 新的递送信息流。您不能为 不具有动态分区的现有传递流 已启用。

这意味着,如果您当前想要使用该功能,您必须创建一个新的流。