You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

AWS QLDB:如何通过Terraform借助CloudFormation创建表(非账本)

问题解答

首先明确:目前AWS CloudFormation并没有提供专门用于创建QLDB表的资源类型,你参考的文档仅对应QLDB账本(AWS::QLDB::Ledger)的创建,无法直接通过CloudFormation资源来创建QLDB表。

如果想用Terraform实现QLDB表的创建,不需要依赖CloudFormation资源,Terraform本身提供了原生的aws_qldb_table资源,可以直接完成表的创建操作,示例代码如下:

resource "aws_qldb_ledger" "example" {
  name = "example-ledger"
}

resource "aws_qldb_table" "example" {
  name        = "example-table"
  ledger_name = aws_qldb_ledger.example.name
}

如果一定要通过Terraform调用CloudFormation来实现,由于CloudFormation没有对应表的资源,这种方式是不可行的,建议直接使用Terraform的原生QLDB表资源。

内容的提问来源于stack exchange,提问作者André Luís Oliveira

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 14:21:39