gpt4 book ai didi

azure - 无法在 terraform cosmosdb 中指定备份

转载 作者:行者123 更新时间:2023-12-03 02:18:43 25 4
gpt4 key购买 nike

我正在使用 terraform 创建 CosmoDB ,我的构建使用 azurerm 2.56.0

resource "azurerm_cosmosdb_account" "testaccount" {
name = "testaccount"
location = var.location
resource_group_name = var.rgname
offer_type = "Standard"
Kind = "GlobalDocumentDB"
enable_automatic_failover = false

consistent_policy {
consistency_level = "Session"
}

backup {
type = "Periodic"
interval_in_minutes = "120"
retention_in_hours = "14"
}
}

我收到以下错误错误:不支持的 block 类型

当我注释掉备份部分时,它工作正常。我检查了cosmosdb帐户https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cosmosdb_account#backup

看来我已经正确声明了它。我还检查过这个版本的 azurerm 支持备份

我可能遗漏了一些明显的东西,有人知道问题是什么吗?谢谢丹

最佳答案

2.56.0 中不支持备份。您正在查看较新的文档。对于您的版本,文档为 here .

如果您想使用备份,则必须升级您的提供商

关于azure - 无法在 terraform cosmosdb 中指定备份,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70013585/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com