1. Packages
  2. Gcore Provider
  3. API Docs
  4. CloudFileShareAccessRule
Viewing docs for gcore 2.0.0-alpha.3
published on Monday, Mar 30, 2026 by g-core
Viewing docs for gcore 2.0.0-alpha.3
published on Monday, Mar 30, 2026 by g-core

    File share access rules control which IP addresses can mount a file share and their permissions (read-only or read-write).

    Example Usage

    All attributes

    The following example shows all configurable attributes for this resource.

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const exampleCloudFileShareAccessRule = new gcore.CloudFileShareAccessRule("example_cloud_file_share_access_rule", {
        projectId: 1,
        regionId: 1,
        fileShareId: "bd8c47ee-e565-4e26-8840-b537e6827b08",
        accessMode: "ro",
        ipAddress: "192.168.1.1",
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    example_cloud_file_share_access_rule = gcore.CloudFileShareAccessRule("example_cloud_file_share_access_rule",
        project_id=1,
        region_id=1,
        file_share_id="bd8c47ee-e565-4e26-8840-b537e6827b08",
        access_mode="ro",
        ip_address="192.168.1.1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.NewCloudFileShareAccessRule(ctx, "example_cloud_file_share_access_rule", &gcore.CloudFileShareAccessRuleArgs{
    			ProjectId:   pulumi.Float64(1),
    			RegionId:    pulumi.Float64(1),
    			FileShareId: pulumi.String("bd8c47ee-e565-4e26-8840-b537e6827b08"),
    			AccessMode:  pulumi.String("ro"),
    			IpAddress:   pulumi.String("192.168.1.1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleCloudFileShareAccessRule = new Gcore.CloudFileShareAccessRule("example_cloud_file_share_access_rule", new()
        {
            ProjectId = 1,
            RegionId = 1,
            FileShareId = "bd8c47ee-e565-4e26-8840-b537e6827b08",
            AccessMode = "ro",
            IpAddress = "192.168.1.1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.CloudFileShareAccessRule;
    import com.pulumi.gcore.CloudFileShareAccessRuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var exampleCloudFileShareAccessRule = new CloudFileShareAccessRule("exampleCloudFileShareAccessRule", CloudFileShareAccessRuleArgs.builder()
                .projectId(1.0)
                .regionId(1.0)
                .fileShareId("bd8c47ee-e565-4e26-8840-b537e6827b08")
                .accessMode("ro")
                .ipAddress("192.168.1.1")
                .build());
    
        }
    }
    
    resources:
      exampleCloudFileShareAccessRule:
        type: gcore:CloudFileShareAccessRule
        name: example_cloud_file_share_access_rule
        properties:
          projectId: 1
          regionId: 1
          fileShareId: bd8c47ee-e565-4e26-8840-b537e6827b08
          accessMode: ro
          ipAddress: 192.168.1.1
    

    Create CloudFileShareAccessRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CloudFileShareAccessRule(name: string, args: CloudFileShareAccessRuleArgs, opts?: CustomResourceOptions);
    @overload
    def CloudFileShareAccessRule(resource_name: str,
                                 args: CloudFileShareAccessRuleArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def CloudFileShareAccessRule(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 access_mode: Optional[str] = None,
                                 file_share_id: Optional[str] = None,
                                 ip_address: Optional[str] = None,
                                 project_id: Optional[float] = None,
                                 region_id: Optional[float] = None)
    func NewCloudFileShareAccessRule(ctx *Context, name string, args CloudFileShareAccessRuleArgs, opts ...ResourceOption) (*CloudFileShareAccessRule, error)
    public CloudFileShareAccessRule(string name, CloudFileShareAccessRuleArgs args, CustomResourceOptions? opts = null)
    public CloudFileShareAccessRule(String name, CloudFileShareAccessRuleArgs args)
    public CloudFileShareAccessRule(String name, CloudFileShareAccessRuleArgs args, CustomResourceOptions options)
    
    type: gcore:CloudFileShareAccessRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CloudFileShareAccessRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CloudFileShareAccessRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CloudFileShareAccessRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CloudFileShareAccessRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CloudFileShareAccessRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var cloudFileShareAccessRuleResource = new Gcore.Index.CloudFileShareAccessRule("cloudFileShareAccessRuleResource", new()
    {
        AccessMode = "string",
        FileShareId = "string",
        IpAddress = "string",
        ProjectId = 0,
        RegionId = 0,
    });
    
    example, err := gcore.NewCloudFileShareAccessRule(ctx, "cloudFileShareAccessRuleResource", &gcore.CloudFileShareAccessRuleArgs{
    	AccessMode:  pulumi.String("string"),
    	FileShareId: pulumi.String("string"),
    	IpAddress:   pulumi.String("string"),
    	ProjectId:   pulumi.Float64(0),
    	RegionId:    pulumi.Float64(0),
    })
    
    var cloudFileShareAccessRuleResource = new CloudFileShareAccessRule("cloudFileShareAccessRuleResource", CloudFileShareAccessRuleArgs.builder()
        .accessMode("string")
        .fileShareId("string")
        .ipAddress("string")
        .projectId(0.0)
        .regionId(0.0)
        .build());
    
    cloud_file_share_access_rule_resource = gcore.CloudFileShareAccessRule("cloudFileShareAccessRuleResource",
        access_mode="string",
        file_share_id="string",
        ip_address="string",
        project_id=0,
        region_id=0)
    
    const cloudFileShareAccessRuleResource = new gcore.CloudFileShareAccessRule("cloudFileShareAccessRuleResource", {
        accessMode: "string",
        fileShareId: "string",
        ipAddress: "string",
        projectId: 0,
        regionId: 0,
    });
    
    type: gcore:CloudFileShareAccessRule
    properties:
        accessMode: string
        fileShareId: string
        ipAddress: string
        projectId: 0
        regionId: 0
    

    CloudFileShareAccessRule Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CloudFileShareAccessRule resource accepts the following input properties:

    AccessMode string
    Access mode Available values: "ro", "rw".
    FileShareId string
    File Share ID
    IpAddress string
    Source IP or network
    ProjectId double
    Project ID
    RegionId double
    Region ID
    AccessMode string
    Access mode Available values: "ro", "rw".
    FileShareId string
    File Share ID
    IpAddress string
    Source IP or network
    ProjectId float64
    Project ID
    RegionId float64
    Region ID
    accessMode String
    Access mode Available values: "ro", "rw".
    fileShareId String
    File Share ID
    ipAddress String
    Source IP or network
    projectId Double
    Project ID
    regionId Double
    Region ID
    accessMode string
    Access mode Available values: "ro", "rw".
    fileShareId string
    File Share ID
    ipAddress string
    Source IP or network
    projectId number
    Project ID
    regionId number
    Region ID
    access_mode str
    Access mode Available values: "ro", "rw".
    file_share_id str
    File Share ID
    ip_address str
    Source IP or network
    project_id float
    Project ID
    region_id float
    Region ID
    accessMode String
    Access mode Available values: "ro", "rw".
    fileShareId String
    File Share ID
    ipAddress String
    Source IP or network
    projectId Number
    Project ID
    regionId Number
    Region ID

    Outputs

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

    AccessLevel string
    Access mode Available values: "ro", "rw".
    AccessTo string
    Source IP or network
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    Access Rule state Available values: "active", "applying", "denying", "error", "new", "queuedtoapply", "queuedtodeny".
    AccessLevel string
    Access mode Available values: "ro", "rw".
    AccessTo string
    Source IP or network
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    Access Rule state Available values: "active", "applying", "denying", "error", "new", "queuedtoapply", "queuedtodeny".
    accessLevel String
    Access mode Available values: "ro", "rw".
    accessTo String
    Source IP or network
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    Access Rule state Available values: "active", "applying", "denying", "error", "new", "queuedtoapply", "queuedtodeny".
    accessLevel string
    Access mode Available values: "ro", "rw".
    accessTo string
    Source IP or network
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    Access Rule state Available values: "active", "applying", "denying", "error", "new", "queuedtoapply", "queuedtodeny".
    access_level str
    Access mode Available values: "ro", "rw".
    access_to str
    Source IP or network
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    Access Rule state Available values: "active", "applying", "denying", "error", "new", "queuedtoapply", "queuedtodeny".
    accessLevel String
    Access mode Available values: "ro", "rw".
    accessTo String
    Source IP or network
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    Access Rule state Available values: "active", "applying", "denying", "error", "new", "queuedtoapply", "queuedtodeny".

    Look up Existing CloudFileShareAccessRule Resource

    Get an existing CloudFileShareAccessRule 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?: CloudFileShareAccessRuleState, opts?: CustomResourceOptions): CloudFileShareAccessRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_level: Optional[str] = None,
            access_mode: Optional[str] = None,
            access_to: Optional[str] = None,
            file_share_id: Optional[str] = None,
            ip_address: Optional[str] = None,
            project_id: Optional[float] = None,
            region_id: Optional[float] = None,
            state: Optional[str] = None) -> CloudFileShareAccessRule
    func GetCloudFileShareAccessRule(ctx *Context, name string, id IDInput, state *CloudFileShareAccessRuleState, opts ...ResourceOption) (*CloudFileShareAccessRule, error)
    public static CloudFileShareAccessRule Get(string name, Input<string> id, CloudFileShareAccessRuleState? state, CustomResourceOptions? opts = null)
    public static CloudFileShareAccessRule get(String name, Output<String> id, CloudFileShareAccessRuleState state, CustomResourceOptions options)
    resources:  _:    type: gcore:CloudFileShareAccessRule    get:      id: ${id}
    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.
    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:
    AccessLevel string
    Access mode Available values: "ro", "rw".
    AccessMode string
    Access mode Available values: "ro", "rw".
    AccessTo string
    Source IP or network
    FileShareId string
    File Share ID
    IpAddress string
    Source IP or network
    ProjectId double
    Project ID
    RegionId double
    Region ID
    State string
    Access Rule state Available values: "active", "applying", "denying", "error", "new", "queuedtoapply", "queuedtodeny".
    AccessLevel string
    Access mode Available values: "ro", "rw".
    AccessMode string
    Access mode Available values: "ro", "rw".
    AccessTo string
    Source IP or network
    FileShareId string
    File Share ID
    IpAddress string
    Source IP or network
    ProjectId float64
    Project ID
    RegionId float64
    Region ID
    State string
    Access Rule state Available values: "active", "applying", "denying", "error", "new", "queuedtoapply", "queuedtodeny".
    accessLevel String
    Access mode Available values: "ro", "rw".
    accessMode String
    Access mode Available values: "ro", "rw".
    accessTo String
    Source IP or network
    fileShareId String
    File Share ID
    ipAddress String
    Source IP or network
    projectId Double
    Project ID
    regionId Double
    Region ID
    state String
    Access Rule state Available values: "active", "applying", "denying", "error", "new", "queuedtoapply", "queuedtodeny".
    accessLevel string
    Access mode Available values: "ro", "rw".
    accessMode string
    Access mode Available values: "ro", "rw".
    accessTo string
    Source IP or network
    fileShareId string
    File Share ID
    ipAddress string
    Source IP or network
    projectId number
    Project ID
    regionId number
    Region ID
    state string
    Access Rule state Available values: "active", "applying", "denying", "error", "new", "queuedtoapply", "queuedtodeny".
    access_level str
    Access mode Available values: "ro", "rw".
    access_mode str
    Access mode Available values: "ro", "rw".
    access_to str
    Source IP or network
    file_share_id str
    File Share ID
    ip_address str
    Source IP or network
    project_id float
    Project ID
    region_id float
    Region ID
    state str
    Access Rule state Available values: "active", "applying", "denying", "error", "new", "queuedtoapply", "queuedtodeny".
    accessLevel String
    Access mode Available values: "ro", "rw".
    accessMode String
    Access mode Available values: "ro", "rw".
    accessTo String
    Source IP or network
    fileShareId String
    File Share ID
    ipAddress String
    Source IP or network
    projectId Number
    Project ID
    regionId Number
    Region ID
    state String
    Access Rule state Available values: "active", "applying", "denying", "error", "new", "queuedtoapply", "queuedtodeny".

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    Viewing docs for gcore 2.0.0-alpha.3
    published on Monday, Mar 30, 2026 by g-core
      Try Pulumi Cloud free. Your team will thank you.