aliyun / terraform-provider-alicloud

Terraform AliCloud provider
https://www.terraform.io/docs/providers/alicloud/
Mozilla Public License 2.0
590 stars 553 forks source link

alicloud_nas_access_rule only works with standard NAS, not Extreme NAS access groups #4627

Open harrytewkesbury opened 2 years ago

harrytewkesbury commented 2 years ago

Terraform Version

0.12.31

Affected Resource(s)

Please list the resources as a list, for example:

Terraform Configuration Files

resource "alicloud_nas_access_rule" "this_access_rule" {
  access_group_name = module.cms_nas_access_group.this_access_group_name
  source_cidr_ip    = module.vpc_data.vpc_cidr_block
  rw_access_type    = var.rw_access_type
  user_access_type  = var.user_access_type
  priority          = var.access_rule_priority
}

...

Terraform will perform the following actions:

  # alicloud_nas_access_rule.this_access_rule will be created
  + resource "alicloud_nas_access_rule" "this_access_rule" {
      + access_group_name = "prd-ec1-marketing-cms-nas-access-group" # This group exists, but is a NAS Extreme access group
      + access_rule_id    = (known after apply)
      + id                = (known after apply)
      + priority          = 1
      + rw_access_type    = "RDWR"
      + source_cidr_ip    = "192.168.120.0/22"
      + user_access_type  = "no_squash"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Expected Behavior

An access group rule should be added to the access group created by alicloud_nas_access_group attached to an Extreme NAS instance

Actual Behavior

The API returns a "The Specified AccessGroup does not exist" error. The Resource should know the difference between an access group on a NAS Standard and a NAS Extreme instance.

tchernsan commented 2 years ago

This is highly needed because we need extreme type of NAS in order to create NAS snapshot. However we can't terraform the access rules so make this a half baked module.

parkbyungnam commented 8 months ago

It seems that the error occurs because General-purpose NAS, Extreme NAS, and CPFS have Permission Group respectively. You need to add file_system_type argument as well as access_group_name.