alicloud_hbr_server_backup_plan

Provides a Hybrid Backup Recovery (HBR) Server Backup Plan resource.

For information about Hybrid Backup Recovery (HBR) Server Backup Plan and how to use it, see What is Server Backup Plan.

Example Usage

Basic Usage

data "alicloud_zones" "example" {
  available_resource_creation = "Instance"
}

data "alicloud_instance_types" "example" {
  availability_zone = data.alicloud_zones.example.zones.0.id
  cpu_core_count    = 1
  memory_size       = 2
}

data "alicloud_images" "example" {
  name_regex = "^ubuntu_[0-9]+_[0-9]+_x64*"
  owners     = "system"
}

resource "alicloud_vpc" "example" {
  vpc_name   = "terraform-example"
  cidr_block = "172.17.3.0/24"
}

resource "alicloud_vswitch" "example" {
  vswitch_name = "terraform-example"
  cidr_block   = "172.17.3.0/24"
  vpc_id       = alicloud_vpc.example.id
  zone_id      = data.alicloud_zones.example.zones.0.id
}

resource "alicloud_security_group" "example" {
  name   = "terraform-example"
  vpc_id = alicloud_vpc.example.id
}

resource "alicloud_instance" "example" {
  image_id             = data.alicloud_images.example.images.0.id
  instance_type        = data.alicloud_instance_types.example.instance_types.0.id
  availability_zone    = data.alicloud_zones.example.zones.0.id
  security_groups      = [alicloud_security_group.example.id]
  instance_name        = "terraform-example"
  internet_charge_type = "PayByBandwidth"
  vswitch_id           = alicloud_vswitch.example.id
}

resource "alicloud_hbr_server_backup_plan" "example" {
  ecs_server_backup_plan_name = "terraform-example"
  instance_id                 = alicloud_instance.example.id
  schedule                    = "I|1602673264|PT2H"
  retention                   = 1
  detail {
    app_consistent = true
    snapshot_group = true
  }
  disabled = false
}

Argument Reference

The following arguments are supported:

Block detail

The detail supports the following:

Attributes Reference

The following attributes are exported:

Import

Hybrid Backup Recovery (HBR) Server Backup Plan can be imported using the id, e.g.

$ terraform import alicloud_hbr_server_backup_plan.example <id>