AccessRule

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.

NOTE: Available in v1.34.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var fooAccessGroup = new AliCloud.Nas.AccessGroup("fooAccessGroup", new AliCloud.Nas.AccessGroupArgs
        {
            Description = "tf-testAccNasConfig",
            Type = "Vpc",
        });
        var fooAccessRule = new AliCloud.Nas.AccessRule("fooAccessRule", new AliCloud.Nas.AccessRuleArgs
        {
            AccessGroupName = fooAccessGroup.Id,
            Priority = 2,
            RwAccessType = "RDWR",
            SourceCidrIp = "168.1.1.0/16",
            UserAccessType = "no_squash",
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

foo_access_group = alicloud.nas.AccessGroup("fooAccessGroup",
    description="tf-testAccNasConfig",
    type="Vpc")
foo_access_rule = alicloud.nas.AccessRule("fooAccessRule",
    access_group_name=foo_access_group.id,
    priority=2,
    rw_access_type="RDWR",
    source_cidr_ip="168.1.1.0/16",
    user_access_type="no_squash")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const fooAccessGroup = new alicloud.nas.AccessGroup("foo", {
    description: "tf-testAccNasConfig",
    type: "Vpc",
});
const fooAccessRule = new alicloud.nas.AccessRule("foo", {
    accessGroupName: fooAccessGroup.id,
    priority: 2,
    rwAccessType: "RDWR",
    sourceCidrIp: "168.1.1.0/16",
    userAccessType: "no_squash",
});

Create a AccessRule Resource

def AccessRule(resource_name, opts=None, access_group_name=None, priority=None, rw_access_type=None, source_cidr_ip=None, user_access_type=None, __props__=None);
func NewAccessRule(ctx *Context, name string, args AccessRuleArgs, opts ...ResourceOption) (*AccessRule, error)
public AccessRule(string name, AccessRuleArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AccessRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AccessRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AccessRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AccessRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The AccessRule resource accepts the following input properties:

AccessGroupName string

Permission group name.

SourceCidrIp string

Address or address segment.

Priority int

Priority level. Range: 1-100. Default value: 1.

RwAccessType string

Read-write permission type: RDWR (default), RDONLY.

UserAccessType string

User permission type: no_squash (default), root_squash, all_squash.

AccessGroupName string

Permission group name.

SourceCidrIp string

Address or address segment.

Priority int

Priority level. Range: 1-100. Default value: 1.

RwAccessType string

Read-write permission type: RDWR (default), RDONLY.

UserAccessType string

User permission type: no_squash (default), root_squash, all_squash.

accessGroupName string

Permission group name.

sourceCidrIp string

Address or address segment.

priority number

Priority level. Range: 1-100. Default value: 1.

rwAccessType string

Read-write permission type: RDWR (default), RDONLY.

userAccessType string

User permission type: no_squash (default), root_squash, all_squash.

access_group_name str

Permission group name.

source_cidr_ip str

Address or address segment.

priority float

Priority level. Range: 1-100. Default value: 1.

rw_access_type str

Read-write permission type: RDWR (default), RDONLY.

user_access_type str

User permission type: no_squash (default), root_squash, all_squash.

Outputs

All input properties are implicitly available as output properties. Additionally, the AccessRule resource produces the following output properties:

AccessRuleId string

The nas access rule ID.

Id string
The provider-assigned unique ID for this managed resource.
AccessRuleId string

The nas access rule ID.

Id string
The provider-assigned unique ID for this managed resource.
accessRuleId string

The nas access rule ID.

id string
The provider-assigned unique ID for this managed resource.
access_rule_id str

The nas access rule ID.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing AccessRule Resource

Get an existing AccessRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AccessRuleState, opts?: CustomResourceOptions): AccessRule
static get(resource_name, id, opts=None, access_group_name=None, access_rule_id=None, priority=None, rw_access_type=None, source_cidr_ip=None, user_access_type=None, __props__=None);
func GetAccessRule(ctx *Context, name string, id IDInput, state *AccessRuleState, opts ...ResourceOption) (*AccessRule, error)
public static AccessRule Get(string name, Input<string> id, AccessRuleState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AccessGroupName string

Permission group name.

AccessRuleId string

The nas access rule ID.

Priority int

Priority level. Range: 1-100. Default value: 1.

RwAccessType string

Read-write permission type: RDWR (default), RDONLY.

SourceCidrIp string

Address or address segment.

UserAccessType string

User permission type: no_squash (default), root_squash, all_squash.

AccessGroupName string

Permission group name.

AccessRuleId string

The nas access rule ID.

Priority int

Priority level. Range: 1-100. Default value: 1.

RwAccessType string

Read-write permission type: RDWR (default), RDONLY.

SourceCidrIp string

Address or address segment.

UserAccessType string

User permission type: no_squash (default), root_squash, all_squash.

accessGroupName string

Permission group name.

accessRuleId string

The nas access rule ID.

priority number

Priority level. Range: 1-100. Default value: 1.

rwAccessType string

Read-write permission type: RDWR (default), RDONLY.

sourceCidrIp string

Address or address segment.

userAccessType string

User permission type: no_squash (default), root_squash, all_squash.

access_group_name str

Permission group name.

access_rule_id str

The nas access rule ID.

priority float

Priority level. Range: 1-100. Default value: 1.

rw_access_type str

Read-write permission type: RDWR (default), RDONLY.

source_cidr_ip str

Address or address segment.

user_access_type str

User permission type: no_squash (default), root_squash, all_squash.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.