amazon-web-services - 无效参数异常 : Enabling or disabling Dynamic Partitioning is not supported at the moment

标签 amazon-web-services terraform terraform-provider-aws amazon-kinesis amazon-kinesis-firehose

当我尝试在项目中运行 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 版本时,我得到了以下信息:

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 :

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.

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

关于amazon-web-services - 无效参数异常 : Enabling or disabling Dynamic Partitioning is not supported at the moment,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70836067/

相关文章:

amazon-web-services - 仅适用于付款和使用事件 View 的 AWS IAM 政策(适用于会计人员)

amazon-web-services - 使用 cloudformation 根据 lambda 持续时间指标创建 cloudwatch 警报

google-cloud-platform - 用于谷歌存储的静态网站的 Terraform 谷歌存储桶 - 403

terraform - 如何修复 "count"对象只能在 "module"、 "resource"和 "data" block 中使用,并且仅当 "count"参数时

terraform - 在 Terraform 中,有没有办法为模块使用不同的提供程序?

continuous-integration - Terraform:使用模块创建安全组时如何不重复安全组?

amazon-web-services - 地形错误 : Invalid value for module argument

java - Java 中分段 S3 上传的 eTag 算法?

amazon-web-services - Lambda API 结果作为在 Cloud Formation 中创建 AWS 资源的条件

azure-devops - 使用 terraform -out 参数