1. Packages
  2. Gcore Provider
  3. API Docs
  4. getFileShare
gcore 0.29.1 published on Wednesday, Sep 10, 2025 by g-core

gcore.getFileShare

Explore with Pulumi AI

gcore logo
gcore 0.29.1 published on Wednesday, Sep 10, 2025 by g-core

    Get information about a file share (NFS) in Gcore Cloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const project = gcore.getProject({
        name: "Default",
    });
    const region = gcore.getRegion({
        name: "Luxembourg-2",
    });
    const standard = gcore.getFileShare({
        name: "tf-file-share-standard",
        regionId: data.gcore_region.rg.id,
        projectId: data.gcore_project.pr.id,
    });
    export const view = standard;
    
    import pulumi
    import pulumi_gcore as gcore
    
    project = gcore.get_project(name="Default")
    region = gcore.get_region(name="Luxembourg-2")
    standard = gcore.get_file_share(name="tf-file-share-standard",
        region_id=data["gcore_region"]["rg"]["id"],
        project_id=data["gcore_project"]["pr"]["id"])
    pulumi.export("view", standard)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.GetProject(ctx, &gcore.GetProjectArgs{
    			Name: "Default",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = gcore.GetRegion(ctx, &gcore.GetRegionArgs{
    			Name: "Luxembourg-2",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		standard, err := gcore.LookupFileShare(ctx, &gcore.LookupFileShareArgs{
    			Name:      "tf-file-share-standard",
    			RegionId:  pulumi.Float64Ref(data.Gcore_region.Rg.Id),
    			ProjectId: pulumi.Float64Ref(data.Gcore_project.Pr.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("view", standard)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var project = Gcore.GetProject.Invoke(new()
        {
            Name = "Default",
        });
    
        var region = Gcore.GetRegion.Invoke(new()
        {
            Name = "Luxembourg-2",
        });
    
        var standard = Gcore.GetFileShare.Invoke(new()
        {
            Name = "tf-file-share-standard",
            RegionId = data.Gcore_region.Rg.Id,
            ProjectId = data.Gcore_project.Pr.Id,
        });
    
        return new Dictionary<string, object?>
        {
            ["view"] = standard,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.GcoreFunctions;
    import com.pulumi.gcore.inputs.GetProjectArgs;
    import com.pulumi.gcore.inputs.GetRegionArgs;
    import com.pulumi.gcore.inputs.GetFileShareArgs;
    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) {
            final var project = GcoreFunctions.getProject(GetProjectArgs.builder()
                .name("Default")
                .build());
    
            final var region = GcoreFunctions.getRegion(GetRegionArgs.builder()
                .name("Luxembourg-2")
                .build());
    
            final var standard = GcoreFunctions.getFileShare(GetFileShareArgs.builder()
                .name("tf-file-share-standard")
                .regionId(data.gcore_region().rg().id())
                .projectId(data.gcore_project().pr().id())
                .build());
    
            ctx.export("view", standard.applyValue(getFileShareResult -> getFileShareResult));
        }
    }
    
    variables:
      project:
        fn::invoke:
          function: gcore:getProject
          arguments:
            name: Default
      region:
        fn::invoke:
          function: gcore:getRegion
          arguments:
            name: Luxembourg-2
      standard:
        fn::invoke:
          function: gcore:getFileShare
          arguments:
            name: tf-file-share-standard
            regionId: ${data.gcore_region.rg.id}
            projectId: ${data.gcore_project.pr.id}
    outputs:
      view: ${standard}
    

    Using getFileShare

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getFileShare(args: GetFileShareArgs, opts?: InvokeOptions): Promise<GetFileShareResult>
    function getFileShareOutput(args: GetFileShareOutputArgs, opts?: InvokeOptions): Output<GetFileShareResult>
    def get_file_share(id: Optional[str] = None,
                       name: Optional[str] = None,
                       project_id: Optional[float] = None,
                       project_name: Optional[str] = None,
                       region_id: Optional[float] = None,
                       region_name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetFileShareResult
    def get_file_share_output(id: Optional[pulumi.Input[str]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       project_id: Optional[pulumi.Input[float]] = None,
                       project_name: Optional[pulumi.Input[str]] = None,
                       region_id: Optional[pulumi.Input[float]] = None,
                       region_name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetFileShareResult]
    func LookupFileShare(ctx *Context, args *LookupFileShareArgs, opts ...InvokeOption) (*LookupFileShareResult, error)
    func LookupFileShareOutput(ctx *Context, args *LookupFileShareOutputArgs, opts ...InvokeOption) LookupFileShareResultOutput

    > Note: This function is named LookupFileShare in the Go SDK.

    public static class GetFileShare 
    {
        public static Task<GetFileShareResult> InvokeAsync(GetFileShareArgs args, InvokeOptions? opts = null)
        public static Output<GetFileShareResult> Invoke(GetFileShareInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFileShareResult> getFileShare(GetFileShareArgs args, InvokeOptions options)
    public static Output<GetFileShareResult> getFileShare(GetFileShareArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcore:index/getFileShare:getFileShare
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the file share. It must be unique within the project and region.
    Id string
    The ID of this resource.
    ProjectId double
    Project ID, only one of projectid or projectname should be set
    ProjectName string
    Project name, only one of projectid or projectname should be set
    RegionId double
    Region ID, only one of regionid or regionname should be set
    RegionName string
    Region name, only one of regionid or regionname should be set
    Name string
    The name of the file share. It must be unique within the project and region.
    Id string
    The ID of this resource.
    ProjectId float64
    Project ID, only one of projectid or projectname should be set
    ProjectName string
    Project name, only one of projectid or projectname should be set
    RegionId float64
    Region ID, only one of regionid or regionname should be set
    RegionName string
    Region name, only one of regionid or regionname should be set
    name String
    The name of the file share. It must be unique within the project and region.
    id String
    The ID of this resource.
    projectId Double
    Project ID, only one of projectid or projectname should be set
    projectName String
    Project name, only one of projectid or projectname should be set
    regionId Double
    Region ID, only one of regionid or regionname should be set
    regionName String
    Region name, only one of regionid or regionname should be set
    name string
    The name of the file share. It must be unique within the project and region.
    id string
    The ID of this resource.
    projectId number
    Project ID, only one of projectid or projectname should be set
    projectName string
    Project name, only one of projectid or projectname should be set
    regionId number
    Region ID, only one of regionid or regionname should be set
    regionName string
    Region name, only one of regionid or regionname should be set
    name str
    The name of the file share. It must be unique within the project and region.
    id str
    The ID of this resource.
    project_id float
    Project ID, only one of projectid or projectname should be set
    project_name str
    Project name, only one of projectid or projectname should be set
    region_id float
    Region ID, only one of regionid or regionname should be set
    region_name str
    Region name, only one of regionid or regionname should be set
    name String
    The name of the file share. It must be unique within the project and region.
    id String
    The ID of this resource.
    projectId Number
    Project ID, only one of projectid or projectname should be set
    projectName String
    Project name, only one of projectid or projectname should be set
    regionId Number
    Region ID, only one of regionid or regionname should be set
    regionName String
    Region name, only one of regionid or regionname should be set

    getFileShare Result

    The following output properties are available:

    ConnectionPoint string
    The connection point of the file share.
    CreatedAt string
    The creation time of the file share in ISO 8601 format.
    Id string
    The ID of this resource.
    Name string
    The name of the file share. It must be unique within the project and region.
    NetworkId string
    The ID of the network to which the file share will be connected.
    NetworkName string
    The name of the network associated with the file share.
    Protocol string
    The protocol used by the file share. Currently, only 'NFS' is supported.
    ShareNetworkName string
    The name of the share network associated with the file share. This is only applicable for 'standard'.
    Size double
    The size of the file share in GB. It must be a positive integer.
    Status string
    The status of the file share.
    SubnetId string
    The ID of the subnet within the network. This is optional and can be used to specify a particular subnet for the file share.
    SubnetName string
    The name of the subnet associated with the file share
    Tags Dictionary<string, string>
    Tags associated with the file share. Tags are key-value pairs.
    TypeName string
    The type of the file share (standard or vast).
    ProjectId double
    Project ID, only one of projectid or projectname should be set
    ProjectName string
    Project name, only one of projectid or projectname should be set
    RegionId double
    Region ID, only one of regionid or regionname should be set
    RegionName string
    Region name, only one of regionid or regionname should be set
    ConnectionPoint string
    The connection point of the file share.
    CreatedAt string
    The creation time of the file share in ISO 8601 format.
    Id string
    The ID of this resource.
    Name string
    The name of the file share. It must be unique within the project and region.
    NetworkId string
    The ID of the network to which the file share will be connected.
    NetworkName string
    The name of the network associated with the file share.
    Protocol string
    The protocol used by the file share. Currently, only 'NFS' is supported.
    ShareNetworkName string
    The name of the share network associated with the file share. This is only applicable for 'standard'.
    Size float64
    The size of the file share in GB. It must be a positive integer.
    Status string
    The status of the file share.
    SubnetId string
    The ID of the subnet within the network. This is optional and can be used to specify a particular subnet for the file share.
    SubnetName string
    The name of the subnet associated with the file share
    Tags map[string]string
    Tags associated with the file share. Tags are key-value pairs.
    TypeName string
    The type of the file share (standard or vast).
    ProjectId float64
    Project ID, only one of projectid or projectname should be set
    ProjectName string
    Project name, only one of projectid or projectname should be set
    RegionId float64
    Region ID, only one of regionid or regionname should be set
    RegionName string
    Region name, only one of regionid or regionname should be set
    connectionPoint String
    The connection point of the file share.
    createdAt String
    The creation time of the file share in ISO 8601 format.
    id String
    The ID of this resource.
    name String
    The name of the file share. It must be unique within the project and region.
    networkId String
    The ID of the network to which the file share will be connected.
    networkName String
    The name of the network associated with the file share.
    protocol String
    The protocol used by the file share. Currently, only 'NFS' is supported.
    shareNetworkName String
    The name of the share network associated with the file share. This is only applicable for 'standard'.
    size Double
    The size of the file share in GB. It must be a positive integer.
    status String
    The status of the file share.
    subnetId String
    The ID of the subnet within the network. This is optional and can be used to specify a particular subnet for the file share.
    subnetName String
    The name of the subnet associated with the file share
    tags Map<String,String>
    Tags associated with the file share. Tags are key-value pairs.
    typeName String
    The type of the file share (standard or vast).
    projectId Double
    Project ID, only one of projectid or projectname should be set
    projectName String
    Project name, only one of projectid or projectname should be set
    regionId Double
    Region ID, only one of regionid or regionname should be set
    regionName String
    Region name, only one of regionid or regionname should be set
    connectionPoint string
    The connection point of the file share.
    createdAt string
    The creation time of the file share in ISO 8601 format.
    id string
    The ID of this resource.
    name string
    The name of the file share. It must be unique within the project and region.
    networkId string
    The ID of the network to which the file share will be connected.
    networkName string
    The name of the network associated with the file share.
    protocol string
    The protocol used by the file share. Currently, only 'NFS' is supported.
    shareNetworkName string
    The name of the share network associated with the file share. This is only applicable for 'standard'.
    size number
    The size of the file share in GB. It must be a positive integer.
    status string
    The status of the file share.
    subnetId string
    The ID of the subnet within the network. This is optional and can be used to specify a particular subnet for the file share.
    subnetName string
    The name of the subnet associated with the file share
    tags {[key: string]: string}
    Tags associated with the file share. Tags are key-value pairs.
    typeName string
    The type of the file share (standard or vast).
    projectId number
    Project ID, only one of projectid or projectname should be set
    projectName string
    Project name, only one of projectid or projectname should be set
    regionId number
    Region ID, only one of regionid or regionname should be set
    regionName string
    Region name, only one of regionid or regionname should be set
    connection_point str
    The connection point of the file share.
    created_at str
    The creation time of the file share in ISO 8601 format.
    id str
    The ID of this resource.
    name str
    The name of the file share. It must be unique within the project and region.
    network_id str
    The ID of the network to which the file share will be connected.
    network_name str
    The name of the network associated with the file share.
    protocol str
    The protocol used by the file share. Currently, only 'NFS' is supported.
    share_network_name str
    The name of the share network associated with the file share. This is only applicable for 'standard'.
    size float
    The size of the file share in GB. It must be a positive integer.
    status str
    The status of the file share.
    subnet_id str
    The ID of the subnet within the network. This is optional and can be used to specify a particular subnet for the file share.
    subnet_name str
    The name of the subnet associated with the file share
    tags Mapping[str, str]
    Tags associated with the file share. Tags are key-value pairs.
    type_name str
    The type of the file share (standard or vast).
    project_id float
    Project ID, only one of projectid or projectname should be set
    project_name str
    Project name, only one of projectid or projectname should be set
    region_id float
    Region ID, only one of regionid or regionname should be set
    region_name str
    Region name, only one of regionid or regionname should be set
    connectionPoint String
    The connection point of the file share.
    createdAt String
    The creation time of the file share in ISO 8601 format.
    id String
    The ID of this resource.
    name String
    The name of the file share. It must be unique within the project and region.
    networkId String
    The ID of the network to which the file share will be connected.
    networkName String
    The name of the network associated with the file share.
    protocol String
    The protocol used by the file share. Currently, only 'NFS' is supported.
    shareNetworkName String
    The name of the share network associated with the file share. This is only applicable for 'standard'.
    size Number
    The size of the file share in GB. It must be a positive integer.
    status String
    The status of the file share.
    subnetId String
    The ID of the subnet within the network. This is optional and can be used to specify a particular subnet for the file share.
    subnetName String
    The name of the subnet associated with the file share
    tags Map<String>
    Tags associated with the file share. Tags are key-value pairs.
    typeName String
    The type of the file share (standard or vast).
    projectId Number
    Project ID, only one of projectid or projectname should be set
    projectName String
    Project name, only one of projectid or projectname should be set
    regionId Number
    Region ID, only one of regionid or regionname should be set
    regionName String
    Region name, only one of regionid or regionname should be set

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    gcore logo
    gcore 0.29.1 published on Wednesday, Sep 10, 2025 by g-core