» alicloud_nas_access_rule

Provides a Nas Access Rule resource.

When NAS is activated, the Default VPC Permission Group is automatically generated. It allows all IP addresses in a VPC to access the mount point with full permissions. Full permissions include Read/Write permission with no restriction on root users.

» Example Usage

Basic Usage

resource "alicloud_nas_access_group" "foo" {
  name        = "tf-NasConfigName-%d"
  type        = "Vpc"
  description = "tf-testAccNasConfig"
resource "alicloud_nas_access_rule" "foo" {
  access_group_name = "${alicloud_nas_access_group.foo.id}"
  source_cidr_ip    = ""
  rw_access_type    = "RDWR"
  user_access_type  = "no_squash"
  priority          = 2

» Argument Reference

The following arguments are supported:

  • access_group_name - (Required, ForceNew) Permission group name.
  • source_cidr_ip - (Required) Address or address segment.
  • rw_access_type - (Optional) Read-write permission type: RDWR (default), RDONLY.
  • user_access_type - (Optional) User permission type: no_squash (default), root_squash, all_squash.
  • priority - (Optional) Priority level. Range: 1-100. Default value: 1.

» Attributes Reference

The following attributes are exported:

  • id - This ID of this resource. The value is formate as <access_group_name>:<access rule id>.
  • access_rule_id - The nas access rule ID.

» Import

Nas Access Rule can be imported using the id, e.g.

$ terraform import alicloud_nas_access_rule.foo tf-testAccNasConfigName:1