gcore 0.29.1 published on Wednesday, Sep 10, 2025 by g-core
gcore.getFileShare
Explore with Pulumi AI
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.
- Project
Id double - Project ID, only one of projectid or projectname should be set
- Project
Name string - Project name, only one of projectid or projectname should be set
- Region
Id double - Region ID, only one of regionid or regionname should be set
- Region
Name 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.
- Project
Id float64 - Project ID, only one of projectid or projectname should be set
- Project
Name string - Project name, only one of projectid or projectname should be set
- Region
Id float64 - Region ID, only one of regionid or regionname should be set
- Region
Name 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.
- project
Id Double - Project ID, only one of projectid or projectname should be set
- project
Name String - Project name, only one of projectid or projectname should be set
- region
Id Double - Region ID, only one of regionid or regionname should be set
- region
Name 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.
- project
Id number - Project ID, only one of projectid or projectname should be set
- project
Name string - Project name, only one of projectid or projectname should be set
- region
Id number - Region ID, only one of regionid or regionname should be set
- region
Name 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.
- project
Id Number - Project ID, only one of projectid or projectname should be set
- project
Name String - Project name, only one of projectid or projectname should be set
- region
Id Number - Region ID, only one of regionid or regionname should be set
- region
Name String - Region name, only one of regionid or regionname should be set
getFileShare Result
The following output properties are available:
- Connection
Point string - The connection point of the file share.
- Created
At 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.
- Network
Id string - The ID of the network to which the file share will be connected.
- Network
Name 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.
- 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.
- Subnet
Id 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.
- Subnet
Name string - The name of the subnet associated with the file share
- Dictionary<string, string>
- Tags associated with the file share. Tags are key-value pairs.
- Type
Name string - The type of the file share (standard or vast).
- Project
Id double - Project ID, only one of projectid or projectname should be set
- Project
Name string - Project name, only one of projectid or projectname should be set
- Region
Id double - Region ID, only one of regionid or regionname should be set
- Region
Name string - Region name, only one of regionid or regionname should be set
- Connection
Point string - The connection point of the file share.
- Created
At 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.
- Network
Id string - The ID of the network to which the file share will be connected.
- Network
Name 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.
- 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.
- Subnet
Id 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.
- Subnet
Name string - The name of the subnet associated with the file share
- map[string]string
- Tags associated with the file share. Tags are key-value pairs.
- Type
Name string - The type of the file share (standard or vast).
- Project
Id float64 - Project ID, only one of projectid or projectname should be set
- Project
Name string - Project name, only one of projectid or projectname should be set
- Region
Id float64 - Region ID, only one of regionid or regionname should be set
- Region
Name string - Region name, only one of regionid or regionname should be set
- connection
Point String - The connection point of the file share.
- created
At 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.
- network
Id String - The ID of the network to which the file share will be connected.
- network
Name 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.
- 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.
- subnet
Id 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.
- subnet
Name String - The name of the subnet associated with the file share
- Map<String,String>
- Tags associated with the file share. Tags are key-value pairs.
- type
Name String - The type of the file share (standard or vast).
- project
Id Double - Project ID, only one of projectid or projectname should be set
- project
Name String - Project name, only one of projectid or projectname should be set
- region
Id Double - Region ID, only one of regionid or regionname should be set
- region
Name String - Region name, only one of regionid or regionname should be set
- connection
Point string - The connection point of the file share.
- created
At 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.
- network
Id string - The ID of the network to which the file share will be connected.
- network
Name 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.
- 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.
- subnet
Id 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.
- subnet
Name string - The name of the subnet associated with the file share
- {[key: string]: string}
- Tags associated with the file share. Tags are key-value pairs.
- type
Name string - The type of the file share (standard or vast).
- project
Id number - Project ID, only one of projectid or projectname should be set
- project
Name string - Project name, only one of projectid or projectname should be set
- region
Id number - Region ID, only one of regionid or regionname should be set
- region
Name 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.
- 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
- 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
- connection
Point String - The connection point of the file share.
- created
At 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.
- network
Id String - The ID of the network to which the file share will be connected.
- network
Name 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.
- 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.
- subnet
Id 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.
- subnet
Name String - The name of the subnet associated with the file share
- Map<String>
- Tags associated with the file share. Tags are key-value pairs.
- type
Name String - The type of the file share (standard or vast).
- project
Id Number - Project ID, only one of projectid or projectname should be set
- project
Name String - Project name, only one of projectid or projectname should be set
- region
Id Number - Region ID, only one of regionid or regionname should be set
- region
Name 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.