Aws BackUp 支持 terraform 中的跨区域复制
AwsBackUp supports cross region copy in terraform
terraform
是否支持跨区域复制(https://www.terraform.io/docs/providers/aws/r/backup_plan.html)的aws
备份功能?
当我阅读文档时,我可以看到它确实支持。
但我收到以下错误:
Error: Unsupported argument
on backup_plan.tf line 11, in resource "aws_backup_plan" "example":
11: copy_action = {
An argument named "copy_action" is not expected here.
我的terraform
文件供大家参考
resource "aws_backup_plan" "example" {
name = "example-plan"
rule {
rule_name = "MainRule"
target_vault_name = "primary"
schedule = "cron(5 8 * * ? *)"
start_window = 480
completion_window = 10080
lifecycle {
delete_after = 30
}
copy_action {
destination_vault_arn = "arn:aws:backup:us-west-2:123456789:backup-vault:secondary"
}
}
}
但是当我移除方块时
copy_action {
destination_vault_arn = "arn:aws:backup:us-west-2:123456789:backup-vault:secondary"
}
效果很好
谢谢
我假设您是 运行 2.57.0 或更早版本的 Terraform AWS Provider。
Version 2.58.0(3 天前发布)带来了对 copy_action
:
的支持
resource/aws_backup_plan
: Add rule configuration block copy_action
configuration block (support cross region copy)
您可以在代码中指定至少需要此版本,如下所示:
provider "aws" {
version = "~> 2.58.0"
}
terraform
是否支持跨区域复制(https://www.terraform.io/docs/providers/aws/r/backup_plan.html)的aws
备份功能?
当我阅读文档时,我可以看到它确实支持。
但我收到以下错误:
Error: Unsupported argument on backup_plan.tf line 11, in resource "aws_backup_plan" "example": 11: copy_action = { An argument named "copy_action" is not expected here.
我的terraform
文件供大家参考
resource "aws_backup_plan" "example" {
name = "example-plan"
rule {
rule_name = "MainRule"
target_vault_name = "primary"
schedule = "cron(5 8 * * ? *)"
start_window = 480
completion_window = 10080
lifecycle {
delete_after = 30
}
copy_action {
destination_vault_arn = "arn:aws:backup:us-west-2:123456789:backup-vault:secondary"
}
}
}
但是当我移除方块时
copy_action {
destination_vault_arn = "arn:aws:backup:us-west-2:123456789:backup-vault:secondary"
}
效果很好
谢谢
我假设您是 运行 2.57.0 或更早版本的 Terraform AWS Provider。
Version 2.58.0(3 天前发布)带来了对 copy_action
:
resource/aws_backup_plan
: Add rule configuration blockcopy_action
configuration block (support cross region copy)
您可以在代码中指定至少需要此版本,如下所示:
provider "aws" {
version = "~> 2.58.0"
}