» alicloud_db_readonly_instance

Provides an RDS readonly instance resource.

» Example Usage

resource "alicloud_vpc" "default" {
    name       = "vpc-123456"
    cidr_block = "172.16.0.0/16"
}

resource "alicloud_vswitch" "default" {
    vpc_id            = "${alicloud_vpc.default.id}"
    cidr_block        = "172.16.0.0/24"
    availability_zone = "${data.alicloud_zones.default.zones.0.id}"
    name              = "vpc-123456"
}

resource "alicloud_db_instance" "default" {
    engine = "MySQL"
    engine_version = "5.6"
    db_instance_class = "rds.mysql.t1.small"
    db_instance_storage = "10"
    vswitch_id = "${alicloud_vswitch.default.id}"
}

resource "alicloud_db_readonly_instance" "foo" {
    master_db_instance_id = "${alicloud_db_instance.default.id}"
    engine_version = "${alicloud_db_instance.default.engine_version}"
    instance_type = "${alicloud_db_instance.default.instance_type}"
    instance_storage = "30"
    instance_name = "rm-123456_ro"
    vswitch_id = "${alicloud_vswitch.default.id}"
    parameters = [{
        name = "innodb_large_prefix"
        value = "ON"
    },{
        name = "connect_timeout"
        value = "50"
    }]
}

» Argument Reference

The following arguments are supported:

» Attributes Reference

The following attributes are exported:

» Import

RDS readonly instance can be imported using the id, e.g.

$ terraform import alicloud_db_readonly_instance.example rm-abc12345678