alicloud_dfs_file_system

Provides a DFS File System resource.

For information about DFS File System and how to use it, see What is File System.

Example Usage

Basic Usage

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

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

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

data "alicloud_dfs_zones" "default" {}

locals {
  zone_id      = data.alicloud_dfs_zones.default.zones.0.zone_id
  storage_type = data.alicloud_dfs_zones.default.zones.0.options.0.storage_type
}

resource "alicloud_dfs_file_system" "default" {
  protocol_type                    = "HDFS"
  description                      = var.name
  file_system_name                 = "${var.name}-${random_integer.default.result}"
  space_capacity                   = "1024"
  throughput_mode                  = "Provisioned"
  provisioned_throughput_in_mi_bps = "512"
  storage_type                     = local.storage_type
  zone_id                          = local.zone_id
}

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 File System can be imported using the id, e.g.

$ terraform import alicloud_dfs_file_system.example <id>