Provides an AWS Backup vault resource.
resource "aws_backup_vault" "example" {
name = "example_backup_vault"
kms_key_arn = aws_kms_key.example.arn
}
This resource supports the following arguments:
force_destroy
- (Optional, Default: false
) A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.kms_key_arn
- (Optional) The server-side encryption key that is used to protect your backups.name
- (Required) Name of the backup vault to create.tags
- (Optional) Metadata that you can assign to help organize the resources that you create. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.This resource exports the following attributes in addition to the arguments above:
id
- The name of the vault.arn
- The ARN of the vault.recovery_points
- The number of recovery points that are stored in a backup vault.tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.delete
- (Default 10m
)In Terraform v1.5.0 and later, use an import
block to import Backup vault using the name
. For example:
import {
to = aws_backup_vault.test-vault
id = "TestVault"
}
Using terraform import
, import Backup vault using the name
. For example:
% terraform import aws_backup_vault.test-vault TestVault