alicloud_dfs_mount_point

Provides a DFS Mount Point resource.

For information about DFS Mount Point and how to use it, see What is Mount Point.

Example Usage

Basic Usage

variable "name" {
  default = "terraform-example"
}

provider "alicloud" {
  region = "cn-hangzhou"
}

data "alicloud_dfs_zones" "default" {}

resource "random_integer" "default" {
  min = 10000
  max = 99999
}

resource "alicloud_vpc" "DefaultVPC" {
  cidr_block = "172.16.0.0/12"
  vpc_name   = var.name
}

resource "alicloud_vswitch" "DefaultVSwitch" {
  description  = "example"
  vpc_id       = alicloud_vpc.DefaultVPC.id
  cidr_block   = "172.16.0.0/24"
  vswitch_name = var.name

  zone_id = data.alicloud_dfs_zones.default.zones.0.zone_id
}

resource "alicloud_dfs_access_group" "DefaultAccessGroup" {
  description       = "AccessGroup resource manager center example"
  network_type      = "VPC"
  access_group_name = "${var.name}-${random_integer.default.result}"
}

resource "alicloud_dfs_access_group" "UpdateAccessGroup" {
  description       = "Second AccessGroup resource manager center example"
  network_type      = "VPC"
  access_group_name = "${var.name}-update-${random_integer.default.result}"
}

resource "alicloud_dfs_file_system" "DefaultFs" {
  space_capacity       = "1024"
  description          = "for mountpoint  example"
  storage_type         = "STANDARD"
  zone_id              = data.alicloud_dfs_zones.default.zones.0.zone_id
  protocol_type        = "HDFS"
  data_redundancy_type = "LRS"
  file_system_name     = "${var.name}-${random_integer.default.result}"
}


resource "alicloud_dfs_mount_point" "default" {
  vpc_id          = alicloud_vpc.DefaultVPC.id
  description     = "mountpoint example"
  network_type    = "VPC"
  vswitch_id      = alicloud_vswitch.DefaultVSwitch.id
  file_system_id  = alicloud_dfs_file_system.DefaultFs.id
  access_group_id = alicloud_dfs_access_group.DefaultAccessGroup.id
  status          = "Active"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

DFS Mount Point can be imported using the id, e.g.

$ terraform import alicloud_dfs_mount_point.example <file_system_id>:<mount_point_id>