ovh.StorageEfsShare
Explore with Pulumi AI
Creates a share for an EFS service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const efs = ovh.getStorageEfs({
serviceName: "XXX",
});
const share = new ovh.StorageEfsShare("share", {
serviceName: efs.then(efs => efs.serviceName),
name: "share",
description: "My share",
protocol: "NFS",
size: 100,
});
import pulumi
import pulumi_ovh as ovh
efs = ovh.get_storage_efs(service_name="XXX")
share = ovh.StorageEfsShare("share",
service_name=efs.service_name,
name="share",
description="My share",
protocol="NFS",
size=100)
package main
import (
"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
efs, err := ovh.GetStorageEfs(ctx, &ovh.GetStorageEfsArgs{
ServiceName: "XXX",
}, nil)
if err != nil {
return err
}
_, err = ovh.NewStorageEfsShare(ctx, "share", &ovh.StorageEfsShareArgs{
ServiceName: pulumi.String(efs.ServiceName),
Name: pulumi.String("share"),
Description: pulumi.String("My share"),
Protocol: pulumi.String("NFS"),
Size: pulumi.Float64(100),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var efs = Ovh.GetStorageEfs.Invoke(new()
{
ServiceName = "XXX",
});
var share = new Ovh.StorageEfsShare("share", new()
{
ServiceName = efs.Apply(getStorageEfsResult => getStorageEfsResult.ServiceName),
Name = "share",
Description = "My share",
Protocol = "NFS",
Size = 100,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.OvhFunctions;
import com.pulumi.ovh.inputs.GetStorageEfsArgs;
import com.ovhcloud.pulumi.ovh.StorageEfsShare;
import com.ovhcloud.pulumi.ovh.StorageEfsShareArgs;
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 efs = OvhFunctions.getStorageEfs(GetStorageEfsArgs.builder()
.serviceName("XXX")
.build());
var share = new StorageEfsShare("share", StorageEfsShareArgs.builder()
.serviceName(efs.serviceName())
.name("share")
.description("My share")
.protocol("NFS")
.size(100.0)
.build());
}
}
resources:
share:
type: ovh:StorageEfsShare
properties:
serviceName: ${efs.serviceName}
name: share
description: My share
protocol: NFS
size: 100
variables:
efs:
fn::invoke:
function: ovh:getStorageEfs
arguments:
serviceName: XXX
Create StorageEfsShare Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new StorageEfsShare(name: string, args: StorageEfsShareArgs, opts?: CustomResourceOptions);
@overload
def StorageEfsShare(resource_name: str,
args: StorageEfsShareArgs,
opts: Optional[ResourceOptions] = None)
@overload
def StorageEfsShare(resource_name: str,
opts: Optional[ResourceOptions] = None,
protocol: Optional[str] = None,
service_name: Optional[str] = None,
size: Optional[float] = None,
description: Optional[str] = None,
mount_point_name: Optional[str] = None,
name: Optional[str] = None,
snapshot_id: Optional[str] = None)
func NewStorageEfsShare(ctx *Context, name string, args StorageEfsShareArgs, opts ...ResourceOption) (*StorageEfsShare, error)
public StorageEfsShare(string name, StorageEfsShareArgs args, CustomResourceOptions? opts = null)
public StorageEfsShare(String name, StorageEfsShareArgs args)
public StorageEfsShare(String name, StorageEfsShareArgs args, CustomResourceOptions options)
type: ovh:StorageEfsShare
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 StorageEfsShareArgs
- 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 StorageEfsShareArgs
- 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 StorageEfsShareArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StorageEfsShareArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StorageEfsShareArgs
- 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 storageEfsShareResource = new Ovh.StorageEfsShare("storageEfsShareResource", new()
{
Protocol = "string",
ServiceName = "string",
Size = 0,
Description = "string",
MountPointName = "string",
Name = "string",
SnapshotId = "string",
});
example, err := ovh.NewStorageEfsShare(ctx, "storageEfsShareResource", &ovh.StorageEfsShareArgs{
Protocol: pulumi.String("string"),
ServiceName: pulumi.String("string"),
Size: pulumi.Float64(0),
Description: pulumi.String("string"),
MountPointName: pulumi.String("string"),
Name: pulumi.String("string"),
SnapshotId: pulumi.String("string"),
})
var storageEfsShareResource = new StorageEfsShare("storageEfsShareResource", StorageEfsShareArgs.builder()
.protocol("string")
.serviceName("string")
.size(0.0)
.description("string")
.mountPointName("string")
.name("string")
.snapshotId("string")
.build());
storage_efs_share_resource = ovh.StorageEfsShare("storageEfsShareResource",
protocol="string",
service_name="string",
size=0,
description="string",
mount_point_name="string",
name="string",
snapshot_id="string")
const storageEfsShareResource = new ovh.StorageEfsShare("storageEfsShareResource", {
protocol: "string",
serviceName: "string",
size: 0,
description: "string",
mountPointName: "string",
name: "string",
snapshotId: "string",
});
type: ovh:StorageEfsShare
properties:
description: string
mountPointName: string
name: string
protocol: string
serviceName: string
size: 0
snapshotId: string
StorageEfsShare 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 StorageEfsShare resource accepts the following input properties:
- Protocol string
- Share protocol
- Service
Name string - Service name
- Size double
- Share size in Gigabytes
- Description string
- Share description
- Mount
Point stringName - User-defined name used to generate human readable access path for the share
- Name string
- Share name
- Snapshot
Id string - Snapshot ID used to create the share
- Protocol string
- Share protocol
- Service
Name string - Service name
- Size float64
- Share size in Gigabytes
- Description string
- Share description
- Mount
Point stringName - User-defined name used to generate human readable access path for the share
- Name string
- Share name
- Snapshot
Id string - Snapshot ID used to create the share
- protocol String
- Share protocol
- service
Name String - Service name
- size Double
- Share size in Gigabytes
- description String
- Share description
- mount
Point StringName - User-defined name used to generate human readable access path for the share
- name String
- Share name
- snapshot
Id String - Snapshot ID used to create the share
- protocol string
- Share protocol
- service
Name string - Service name
- size number
- Share size in Gigabytes
- description string
- Share description
- mount
Point stringName - User-defined name used to generate human readable access path for the share
- name string
- Share name
- snapshot
Id string - Snapshot ID used to create the share
- protocol str
- Share protocol
- service_
name str - Service name
- size float
- Share size in Gigabytes
- description str
- Share description
- mount_
point_ strname - User-defined name used to generate human readable access path for the share
- name str
- Share name
- snapshot_
id str - Snapshot ID used to create the share
- protocol String
- Share protocol
- service
Name String - Service name
- size Number
- Share size in Gigabytes
- description String
- Share description
- mount
Point StringName - User-defined name used to generate human readable access path for the share
- name String
- Share name
- snapshot
Id String - Snapshot ID used to create the share
Outputs
All input properties are implicitly available as output properties. Additionally, the StorageEfsShare resource produces the following output properties:
- created_
at str - Share creation date
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- Share status
Look up Existing StorageEfsShare Resource
Get an existing StorageEfsShare 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?: StorageEfsShareState, opts?: CustomResourceOptions): StorageEfsShare
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
mount_point_name: Optional[str] = None,
name: Optional[str] = None,
protocol: Optional[str] = None,
service_name: Optional[str] = None,
size: Optional[float] = None,
snapshot_id: Optional[str] = None,
status: Optional[str] = None) -> StorageEfsShare
func GetStorageEfsShare(ctx *Context, name string, id IDInput, state *StorageEfsShareState, opts ...ResourceOption) (*StorageEfsShare, error)
public static StorageEfsShare Get(string name, Input<string> id, StorageEfsShareState? state, CustomResourceOptions? opts = null)
public static StorageEfsShare get(String name, Output<String> id, StorageEfsShareState state, CustomResourceOptions options)
resources: _: type: ovh:StorageEfsShare 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.
- Created
At string - Share creation date
- Description string
- Share description
- Mount
Point stringName - User-defined name used to generate human readable access path for the share
- Name string
- Share name
- Protocol string
- Share protocol
- Service
Name string - Service name
- Size double
- Share size in Gigabytes
- Snapshot
Id string - Snapshot ID used to create the share
- Status string
- Share status
- Created
At string - Share creation date
- Description string
- Share description
- Mount
Point stringName - User-defined name used to generate human readable access path for the share
- Name string
- Share name
- Protocol string
- Share protocol
- Service
Name string - Service name
- Size float64
- Share size in Gigabytes
- Snapshot
Id string - Snapshot ID used to create the share
- Status string
- Share status
- created
At String - Share creation date
- description String
- Share description
- mount
Point StringName - User-defined name used to generate human readable access path for the share
- name String
- Share name
- protocol String
- Share protocol
- service
Name String - Service name
- size Double
- Share size in Gigabytes
- snapshot
Id String - Snapshot ID used to create the share
- status String
- Share status
- created
At string - Share creation date
- description string
- Share description
- mount
Point stringName - User-defined name used to generate human readable access path for the share
- name string
- Share name
- protocol string
- Share protocol
- service
Name string - Service name
- size number
- Share size in Gigabytes
- snapshot
Id string - Snapshot ID used to create the share
- status string
- Share status
- created_
at str - Share creation date
- description str
- Share description
- mount_
point_ strname - User-defined name used to generate human readable access path for the share
- name str
- Share name
- protocol str
- Share protocol
- service_
name str - Service name
- size float
- Share size in Gigabytes
- snapshot_
id str - Snapshot ID used to create the share
- status str
- Share status
- created
At String - Share creation date
- description String
- Share description
- mount
Point StringName - User-defined name used to generate human readable access path for the share
- name String
- Share name
- protocol String
- Share protocol
- service
Name String - Service name
- size Number
- Share size in Gigabytes
- snapshot
Id String - Snapshot ID used to create the share
- status String
- Share status
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.