ovh.StorageEfsShareAcl
Explore with Pulumi AI
Creates an ACL rule for an EFS share.
Please take a look at the list of available access_level
values in the Required
section in order to know the list of supported access level configurations.
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,
});
const acl = new ovh.StorageEfsShareAcl("acl", {
serviceName: efs.then(efs => efs.serviceName),
shareId: share.id,
accessLevel: "ro",
accessTo: "10.0.0.1",
});
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)
acl = ovh.StorageEfsShareAcl("acl",
service_name=efs.service_name,
share_id=share.id,
access_level="ro",
access_to="10.0.0.1")
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
}
share, 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
}
_, err = ovh.NewStorageEfsShareAcl(ctx, "acl", &ovh.StorageEfsShareAclArgs{
ServiceName: pulumi.String(efs.ServiceName),
ShareId: share.ID(),
AccessLevel: pulumi.String("ro"),
AccessTo: pulumi.String("10.0.0.1"),
})
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,
});
var acl = new Ovh.StorageEfsShareAcl("acl", new()
{
ServiceName = efs.Apply(getStorageEfsResult => getStorageEfsResult.ServiceName),
ShareId = share.Id,
AccessLevel = "ro",
AccessTo = "10.0.0.1",
});
});
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 com.ovhcloud.pulumi.ovh.StorageEfsShareAcl;
import com.ovhcloud.pulumi.ovh.StorageEfsShareAclArgs;
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());
var acl = new StorageEfsShareAcl("acl", StorageEfsShareAclArgs.builder()
.serviceName(efs.serviceName())
.shareId(share.id())
.accessLevel("ro")
.accessTo("10.0.0.1")
.build());
}
}
resources:
share:
type: ovh:StorageEfsShare
properties:
serviceName: ${efs.serviceName}
name: share
description: My share
protocol: NFS
size: 100
acl:
type: ovh:StorageEfsShareAcl
properties:
serviceName: ${efs.serviceName}
shareId: ${share.id}
accessLevel: ro
accessTo: 10.0.0.1
variables:
efs:
fn::invoke:
function: ovh:getStorageEfs
arguments:
serviceName: XXX
Create StorageEfsShareAcl Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new StorageEfsShareAcl(name: string, args: StorageEfsShareAclArgs, opts?: CustomResourceOptions);
@overload
def StorageEfsShareAcl(resource_name: str,
args: StorageEfsShareAclArgs,
opts: Optional[ResourceOptions] = None)
@overload
def StorageEfsShareAcl(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_level: Optional[str] = None,
access_to: Optional[str] = None,
service_name: Optional[str] = None,
share_id: Optional[str] = None)
func NewStorageEfsShareAcl(ctx *Context, name string, args StorageEfsShareAclArgs, opts ...ResourceOption) (*StorageEfsShareAcl, error)
public StorageEfsShareAcl(string name, StorageEfsShareAclArgs args, CustomResourceOptions? opts = null)
public StorageEfsShareAcl(String name, StorageEfsShareAclArgs args)
public StorageEfsShareAcl(String name, StorageEfsShareAclArgs args, CustomResourceOptions options)
type: ovh:StorageEfsShareAcl
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 StorageEfsShareAclArgs
- 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 StorageEfsShareAclArgs
- 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 StorageEfsShareAclArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StorageEfsShareAclArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StorageEfsShareAclArgs
- 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 storageEfsShareAclResource = new Ovh.StorageEfsShareAcl("storageEfsShareAclResource", new()
{
AccessLevel = "string",
AccessTo = "string",
ServiceName = "string",
ShareId = "string",
});
example, err := ovh.NewStorageEfsShareAcl(ctx, "storageEfsShareAclResource", &ovh.StorageEfsShareAclArgs{
AccessLevel: pulumi.String("string"),
AccessTo: pulumi.String("string"),
ServiceName: pulumi.String("string"),
ShareId: pulumi.String("string"),
})
var storageEfsShareAclResource = new StorageEfsShareAcl("storageEfsShareAclResource", StorageEfsShareAclArgs.builder()
.accessLevel("string")
.accessTo("string")
.serviceName("string")
.shareId("string")
.build());
storage_efs_share_acl_resource = ovh.StorageEfsShareAcl("storageEfsShareAclResource",
access_level="string",
access_to="string",
service_name="string",
share_id="string")
const storageEfsShareAclResource = new ovh.StorageEfsShareAcl("storageEfsShareAclResource", {
accessLevel: "string",
accessTo: "string",
serviceName: "string",
shareId: "string",
});
type: ovh:StorageEfsShareAcl
properties:
accessLevel: string
accessTo: string
serviceName: string
shareId: string
StorageEfsShareAcl 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 StorageEfsShareAcl resource accepts the following input properties:
- Access
Level string - Rule access level
- Access
To string - Rule destination
- Service
Name string - Service name
- string
- Share ID
- Access
Level string - Rule access level
- Access
To string - Rule destination
- Service
Name string - Service name
- string
- Share ID
- access
Level String - Rule access level
- access
To String - Rule destination
- service
Name String - Service name
- String
- Share ID
- access
Level string - Rule access level
- access
To string - Rule destination
- service
Name string - Service name
- string
- Share ID
- access_
level str - Rule access level
- access_
to str - Rule destination
- service_
name str - Service name
- str
- Share ID
- access
Level String - Rule access level
- access
To String - Rule destination
- service
Name String - Service name
- String
- Share ID
Outputs
All input properties are implicitly available as output properties. Additionally, the StorageEfsShareAcl resource produces the following output properties:
- Access
Type string - Rule access type
- Created
At string - Rule creation date
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Rule status
- Access
Type string - Rule access type
- Created
At string - Rule creation date
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Rule status
- access
Type String - Rule access type
- created
At String - Rule creation date
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Rule status
- access
Type string - Rule access type
- created
At string - Rule creation date
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- Rule status
- access_
type str - Rule access type
- created_
at str - Rule creation date
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- Rule status
- access
Type String - Rule access type
- created
At String - Rule creation date
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Rule status
Look up Existing StorageEfsShareAcl Resource
Get an existing StorageEfsShareAcl 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?: StorageEfsShareAclState, opts?: CustomResourceOptions): StorageEfsShareAcl
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_level: Optional[str] = None,
access_to: Optional[str] = None,
access_type: Optional[str] = None,
created_at: Optional[str] = None,
service_name: Optional[str] = None,
share_id: Optional[str] = None,
status: Optional[str] = None) -> StorageEfsShareAcl
func GetStorageEfsShareAcl(ctx *Context, name string, id IDInput, state *StorageEfsShareAclState, opts ...ResourceOption) (*StorageEfsShareAcl, error)
public static StorageEfsShareAcl Get(string name, Input<string> id, StorageEfsShareAclState? state, CustomResourceOptions? opts = null)
public static StorageEfsShareAcl get(String name, Output<String> id, StorageEfsShareAclState state, CustomResourceOptions options)
resources: _: type: ovh:StorageEfsShareAcl 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.
- Access
Level string - Rule access level
- Access
To string - Rule destination
- Access
Type string - Rule access type
- Created
At string - Rule creation date
- Service
Name string - Service name
- string
- Share ID
- Status string
- Rule status
- Access
Level string - Rule access level
- Access
To string - Rule destination
- Access
Type string - Rule access type
- Created
At string - Rule creation date
- Service
Name string - Service name
- string
- Share ID
- Status string
- Rule status
- access
Level String - Rule access level
- access
To String - Rule destination
- access
Type String - Rule access type
- created
At String - Rule creation date
- service
Name String - Service name
- String
- Share ID
- status String
- Rule status
- access
Level string - Rule access level
- access
To string - Rule destination
- access
Type string - Rule access type
- created
At string - Rule creation date
- service
Name string - Service name
- string
- Share ID
- status string
- Rule status
- access_
level str - Rule access level
- access_
to str - Rule destination
- access_
type str - Rule access type
- created_
at str - Rule creation date
- service_
name str - Service name
- str
- Share ID
- status str
- Rule status
- access
Level String - Rule access level
- access
To String - Rule destination
- access
Type String - Rule access type
- created
At String - Rule creation date
- service
Name String - Service name
- String
- Share ID
- status String
- Rule status
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.