1. Packages
  2. Volcengine
  3. API Docs
  4. vepfs
  5. MountServiceAttachment
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

volcengine.vepfs.MountServiceAttachment

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

    Provides a resource to manage vepfs mount service attachment

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
        {
            VpcName = "acc-test-vpc",
            CidrBlock = "172.16.0.0/16",
        });
    
        var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
        {
            SubnetName = "acc-test-subnet",
            CidrBlock = "172.16.0.0/24",
            ZoneId = "cn-beijing-a",
            VpcId = fooVpc.Id,
        });
    
        var fooFileSystem = new Volcengine.Vepfs.FileSystem("fooFileSystem", new()
        {
            FileSystemName = "acc-test-file-system",
            SubnetId = fooSubnet.Id,
            StoreType = "Advance_100",
            Description = "tf-test",
            Capacity = 12,
            Project = "default",
            EnableRestripe = false,
            Tags = new[]
            {
                new Volcengine.Vepfs.Inputs.FileSystemTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        });
    
        var fooMountService = new Volcengine.Vepfs.MountService("fooMountService", new()
        {
            MountServiceName = "acc-test-mount-service",
            SubnetId = fooSubnet.Id,
            NodeType = "ecs.g1ie.large",
            Project = "default",
        });
    
        var fooMountServiceAttachment = new Volcengine.Vepfs.MountServiceAttachment("fooMountServiceAttachment", new()
        {
            MountServiceId = fooMountService.Id,
            FileSystemId = fooFileSystem.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vepfs"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
    			VpcName:   pulumi.String("acc-test-vpc"),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
    			SubnetName: pulumi.String("acc-test-subnet"),
    			CidrBlock:  pulumi.String("172.16.0.0/24"),
    			ZoneId:     pulumi.String("cn-beijing-a"),
    			VpcId:      fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		fooFileSystem, err := vepfs.NewFileSystem(ctx, "fooFileSystem", &vepfs.FileSystemArgs{
    			FileSystemName: pulumi.String("acc-test-file-system"),
    			SubnetId:       fooSubnet.ID(),
    			StoreType:      pulumi.String("Advance_100"),
    			Description:    pulumi.String("tf-test"),
    			Capacity:       pulumi.Int(12),
    			Project:        pulumi.String("default"),
    			EnableRestripe: pulumi.Bool(false),
    			Tags: vepfs.FileSystemTagArray{
    				&vepfs.FileSystemTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		fooMountService, err := vepfs.NewMountService(ctx, "fooMountService", &vepfs.MountServiceArgs{
    			MountServiceName: pulumi.String("acc-test-mount-service"),
    			SubnetId:         fooSubnet.ID(),
    			NodeType:         pulumi.String("ecs.g1ie.large"),
    			Project:          pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vepfs.NewMountServiceAttachment(ctx, "fooMountServiceAttachment", &vepfs.MountServiceAttachmentArgs{
    			MountServiceId: fooMountService.ID(),
    			FileSystemId:   fooFileSystem.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.vpc.Vpc;
    import com.pulumi.volcengine.vpc.VpcArgs;
    import com.pulumi.volcengine.vpc.Subnet;
    import com.pulumi.volcengine.vpc.SubnetArgs;
    import com.pulumi.volcengine.vepfs.FileSystem;
    import com.pulumi.volcengine.vepfs.FileSystemArgs;
    import com.pulumi.volcengine.vepfs.inputs.FileSystemTagArgs;
    import com.pulumi.volcengine.vepfs.MountService;
    import com.pulumi.volcengine.vepfs.MountServiceArgs;
    import com.pulumi.volcengine.vepfs.MountServiceAttachment;
    import com.pulumi.volcengine.vepfs.MountServiceAttachmentArgs;
    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 fooVpc = new Vpc("fooVpc", VpcArgs.builder()        
                .vpcName("acc-test-vpc")
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()        
                .subnetName("acc-test-subnet")
                .cidrBlock("172.16.0.0/24")
                .zoneId("cn-beijing-a")
                .vpcId(fooVpc.id())
                .build());
    
            var fooFileSystem = new FileSystem("fooFileSystem", FileSystemArgs.builder()        
                .fileSystemName("acc-test-file-system")
                .subnetId(fooSubnet.id())
                .storeType("Advance_100")
                .description("tf-test")
                .capacity(12)
                .project("default")
                .enableRestripe(false)
                .tags(FileSystemTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build());
    
            var fooMountService = new MountService("fooMountService", MountServiceArgs.builder()        
                .mountServiceName("acc-test-mount-service")
                .subnetId(fooSubnet.id())
                .nodeType("ecs.g1ie.large")
                .project("default")
                .build());
    
            var fooMountServiceAttachment = new MountServiceAttachment("fooMountServiceAttachment", MountServiceAttachmentArgs.builder()        
                .mountServiceId(fooMountService.id())
                .fileSystemId(fooFileSystem.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_vpc = volcengine.vpc.Vpc("fooVpc",
        vpc_name="acc-test-vpc",
        cidr_block="172.16.0.0/16")
    foo_subnet = volcengine.vpc.Subnet("fooSubnet",
        subnet_name="acc-test-subnet",
        cidr_block="172.16.0.0/24",
        zone_id="cn-beijing-a",
        vpc_id=foo_vpc.id)
    foo_file_system = volcengine.vepfs.FileSystem("fooFileSystem",
        file_system_name="acc-test-file-system",
        subnet_id=foo_subnet.id,
        store_type="Advance_100",
        description="tf-test",
        capacity=12,
        project="default",
        enable_restripe=False,
        tags=[volcengine.vepfs.FileSystemTagArgs(
            key="k1",
            value="v1",
        )])
    foo_mount_service = volcengine.vepfs.MountService("fooMountService",
        mount_service_name="acc-test-mount-service",
        subnet_id=foo_subnet.id,
        node_type="ecs.g1ie.large",
        project="default")
    foo_mount_service_attachment = volcengine.vepfs.MountServiceAttachment("fooMountServiceAttachment",
        mount_service_id=foo_mount_service.id,
        file_system_id=foo_file_system.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
        vpcName: "acc-test-vpc",
        cidrBlock: "172.16.0.0/16",
    });
    const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
        subnetName: "acc-test-subnet",
        cidrBlock: "172.16.0.0/24",
        zoneId: "cn-beijing-a",
        vpcId: fooVpc.id,
    });
    const fooFileSystem = new volcengine.vepfs.FileSystem("fooFileSystem", {
        fileSystemName: "acc-test-file-system",
        subnetId: fooSubnet.id,
        storeType: "Advance_100",
        description: "tf-test",
        capacity: 12,
        project: "default",
        enableRestripe: false,
        tags: [{
            key: "k1",
            value: "v1",
        }],
    });
    const fooMountService = new volcengine.vepfs.MountService("fooMountService", {
        mountServiceName: "acc-test-mount-service",
        subnetId: fooSubnet.id,
        nodeType: "ecs.g1ie.large",
        project: "default",
    });
    const fooMountServiceAttachment = new volcengine.vepfs.MountServiceAttachment("fooMountServiceAttachment", {
        mountServiceId: fooMountService.id,
        fileSystemId: fooFileSystem.id,
    });
    
    resources:
      fooVpc:
        type: volcengine:vpc:Vpc
        properties:
          vpcName: acc-test-vpc
          cidrBlock: 172.16.0.0/16
      fooSubnet:
        type: volcengine:vpc:Subnet
        properties:
          subnetName: acc-test-subnet
          cidrBlock: 172.16.0.0/24
          zoneId: cn-beijing-a
          vpcId: ${fooVpc.id}
      fooFileSystem:
        type: volcengine:vepfs:FileSystem
        properties:
          fileSystemName: acc-test-file-system
          subnetId: ${fooSubnet.id}
          storeType: Advance_100
          description: tf-test
          capacity: 12
          project: default
          enableRestripe: false
          tags:
            - key: k1
              value: v1
      fooMountService:
        type: volcengine:vepfs:MountService
        properties:
          mountServiceName: acc-test-mount-service
          subnetId: ${fooSubnet.id}
          nodeType: ecs.g1ie.large
          project: default
      fooMountServiceAttachment:
        type: volcengine:vepfs:MountServiceAttachment
        properties:
          mountServiceId: ${fooMountService.id}
          fileSystemId: ${fooFileSystem.id}
    

    Create MountServiceAttachment Resource

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

    Constructor syntax

    new MountServiceAttachment(name: string, args: MountServiceAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def MountServiceAttachment(resource_name: str,
                               args: MountServiceAttachmentArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def MountServiceAttachment(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               file_system_id: Optional[str] = None,
                               mount_service_id: Optional[str] = None,
                               customer_path: Optional[str] = None)
    func NewMountServiceAttachment(ctx *Context, name string, args MountServiceAttachmentArgs, opts ...ResourceOption) (*MountServiceAttachment, error)
    public MountServiceAttachment(string name, MountServiceAttachmentArgs args, CustomResourceOptions? opts = null)
    public MountServiceAttachment(String name, MountServiceAttachmentArgs args)
    public MountServiceAttachment(String name, MountServiceAttachmentArgs args, CustomResourceOptions options)
    
    type: volcengine:vepfs:MountServiceAttachment
    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 MountServiceAttachmentArgs
    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 MountServiceAttachmentArgs
    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 MountServiceAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MountServiceAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MountServiceAttachmentArgs
    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 mountServiceAttachmentResource = new Volcengine.Vepfs.MountServiceAttachment("mountServiceAttachmentResource", new()
    {
        FileSystemId = "string",
        MountServiceId = "string",
        CustomerPath = "string",
    });
    
    example, err := vepfs.NewMountServiceAttachment(ctx, "mountServiceAttachmentResource", &vepfs.MountServiceAttachmentArgs{
    	FileSystemId:   pulumi.String("string"),
    	MountServiceId: pulumi.String("string"),
    	CustomerPath:   pulumi.String("string"),
    })
    
    var mountServiceAttachmentResource = new MountServiceAttachment("mountServiceAttachmentResource", MountServiceAttachmentArgs.builder()
        .fileSystemId("string")
        .mountServiceId("string")
        .customerPath("string")
        .build());
    
    mount_service_attachment_resource = volcengine.vepfs.MountServiceAttachment("mountServiceAttachmentResource",
        file_system_id="string",
        mount_service_id="string",
        customer_path="string")
    
    const mountServiceAttachmentResource = new volcengine.vepfs.MountServiceAttachment("mountServiceAttachmentResource", {
        fileSystemId: "string",
        mountServiceId: "string",
        customerPath: "string",
    });
    
    type: volcengine:vepfs:MountServiceAttachment
    properties:
        customerPath: string
        fileSystemId: string
        mountServiceId: string
    

    MountServiceAttachment Resource Properties

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

    Inputs

    The MountServiceAttachment resource accepts the following input properties:

    FileSystemId string
    The id of the vepfs file system.
    MountServiceId string
    The id of the mount service.
    CustomerPath string
    The custom mount directory, the default value is file system id.
    FileSystemId string
    The id of the vepfs file system.
    MountServiceId string
    The id of the mount service.
    CustomerPath string
    The custom mount directory, the default value is file system id.
    fileSystemId String
    The id of the vepfs file system.
    mountServiceId String
    The id of the mount service.
    customerPath String
    The custom mount directory, the default value is file system id.
    fileSystemId string
    The id of the vepfs file system.
    mountServiceId string
    The id of the mount service.
    customerPath string
    The custom mount directory, the default value is file system id.
    file_system_id str
    The id of the vepfs file system.
    mount_service_id str
    The id of the mount service.
    customer_path str
    The custom mount directory, the default value is file system id.
    fileSystemId String
    The id of the vepfs file system.
    mountServiceId String
    The id of the mount service.
    customerPath String
    The custom mount directory, the default value is file system id.

    Outputs

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

    AttachStatus string
    The attach status of the vepfs file system.
    Id string
    The provider-assigned unique ID for this managed resource.
    AttachStatus string
    The attach status of the vepfs file system.
    Id string
    The provider-assigned unique ID for this managed resource.
    attachStatus String
    The attach status of the vepfs file system.
    id String
    The provider-assigned unique ID for this managed resource.
    attachStatus string
    The attach status of the vepfs file system.
    id string
    The provider-assigned unique ID for this managed resource.
    attach_status str
    The attach status of the vepfs file system.
    id str
    The provider-assigned unique ID for this managed resource.
    attachStatus String
    The attach status of the vepfs file system.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MountServiceAttachment Resource

    Get an existing MountServiceAttachment 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?: MountServiceAttachmentState, opts?: CustomResourceOptions): MountServiceAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            attach_status: Optional[str] = None,
            customer_path: Optional[str] = None,
            file_system_id: Optional[str] = None,
            mount_service_id: Optional[str] = None) -> MountServiceAttachment
    func GetMountServiceAttachment(ctx *Context, name string, id IDInput, state *MountServiceAttachmentState, opts ...ResourceOption) (*MountServiceAttachment, error)
    public static MountServiceAttachment Get(string name, Input<string> id, MountServiceAttachmentState? state, CustomResourceOptions? opts = null)
    public static MountServiceAttachment get(String name, Output<String> id, MountServiceAttachmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    AttachStatus string
    The attach status of the vepfs file system.
    CustomerPath string
    The custom mount directory, the default value is file system id.
    FileSystemId string
    The id of the vepfs file system.
    MountServiceId string
    The id of the mount service.
    AttachStatus string
    The attach status of the vepfs file system.
    CustomerPath string
    The custom mount directory, the default value is file system id.
    FileSystemId string
    The id of the vepfs file system.
    MountServiceId string
    The id of the mount service.
    attachStatus String
    The attach status of the vepfs file system.
    customerPath String
    The custom mount directory, the default value is file system id.
    fileSystemId String
    The id of the vepfs file system.
    mountServiceId String
    The id of the mount service.
    attachStatus string
    The attach status of the vepfs file system.
    customerPath string
    The custom mount directory, the default value is file system id.
    fileSystemId string
    The id of the vepfs file system.
    mountServiceId string
    The id of the mount service.
    attach_status str
    The attach status of the vepfs file system.
    customer_path str
    The custom mount directory, the default value is file system id.
    file_system_id str
    The id of the vepfs file system.
    mount_service_id str
    The id of the mount service.
    attachStatus String
    The attach status of the vepfs file system.
    customerPath String
    The custom mount directory, the default value is file system id.
    fileSystemId String
    The id of the vepfs file system.
    mountServiceId String
    The id of the mount service.

    Import

    VepfsMountServiceAttachment can be imported using the mount_service_id:file_system_id, e.g.

     $ pulumi import volcengine:vepfs/mountServiceAttachment:MountServiceAttachment default mount_service_id:file_system_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine