1. Packages
  2. Scaleway
  3. API Docs
  4. DocumentdbPrivateNetworkEndpoint
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

scaleway.DocumentdbPrivateNetworkEndpoint

Explore with Pulumi AI

scaleway logo
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

    Creates and manages Scaleway Database Private Network Endpoint.

    Example Usage

    Example Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const pn = new scaleway.VpcPrivateNetwork("pn", {});
    const instance = new scaleway.DocumentdbInstance("instance", {
        nodeType: "docdb-play2-pico",
        engine: "FerretDB-1",
        userName: "my_initial_user",
        password: "thiZ_is_v&ry_s3cret",
        volumeSizeInGb: 20,
    });
    const main = new scaleway.DocumentdbPrivateNetworkEndpoint("main", {
        instanceId: instance.id,
        privateNetwork: {
            ipNet: "172.16.32.3/22",
            id: pn.id,
        },
    }, {
        dependsOn: [pn],
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    pn = scaleway.VpcPrivateNetwork("pn")
    instance = scaleway.DocumentdbInstance("instance",
        node_type="docdb-play2-pico",
        engine="FerretDB-1",
        user_name="my_initial_user",
        password="thiZ_is_v&ry_s3cret",
        volume_size_in_gb=20)
    main = scaleway.DocumentdbPrivateNetworkEndpoint("main",
        instance_id=instance.id,
        private_network=scaleway.DocumentdbPrivateNetworkEndpointPrivateNetworkArgs(
            ip_net="172.16.32.3/22",
            id=pn.id,
        ),
        opts = pulumi.ResourceOptions(depends_on=[pn]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		pn, err := scaleway.NewVpcPrivateNetwork(ctx, "pn", nil)
    		if err != nil {
    			return err
    		}
    		instance, err := scaleway.NewDocumentdbInstance(ctx, "instance", &scaleway.DocumentdbInstanceArgs{
    			NodeType:       pulumi.String("docdb-play2-pico"),
    			Engine:         pulumi.String("FerretDB-1"),
    			UserName:       pulumi.String("my_initial_user"),
    			Password:       pulumi.String("thiZ_is_v&ry_s3cret"),
    			VolumeSizeInGb: pulumi.Int(20),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewDocumentdbPrivateNetworkEndpoint(ctx, "main", &scaleway.DocumentdbPrivateNetworkEndpointArgs{
    			InstanceId: instance.ID(),
    			PrivateNetwork: &scaleway.DocumentdbPrivateNetworkEndpointPrivateNetworkArgs{
    				IpNet: pulumi.String("172.16.32.3/22"),
    				Id:    pn.ID(),
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			pn,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var pn = new Scaleway.VpcPrivateNetwork("pn");
    
        var instance = new Scaleway.DocumentdbInstance("instance", new()
        {
            NodeType = "docdb-play2-pico",
            Engine = "FerretDB-1",
            UserName = "my_initial_user",
            Password = "thiZ_is_v&ry_s3cret",
            VolumeSizeInGb = 20,
        });
    
        var main = new Scaleway.DocumentdbPrivateNetworkEndpoint("main", new()
        {
            InstanceId = instance.Id,
            PrivateNetwork = new Scaleway.Inputs.DocumentdbPrivateNetworkEndpointPrivateNetworkArgs
            {
                IpNet = "172.16.32.3/22",
                Id = pn.Id,
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                pn,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.VpcPrivateNetwork;
    import com.pulumi.scaleway.DocumentdbInstance;
    import com.pulumi.scaleway.DocumentdbInstanceArgs;
    import com.pulumi.scaleway.DocumentdbPrivateNetworkEndpoint;
    import com.pulumi.scaleway.DocumentdbPrivateNetworkEndpointArgs;
    import com.pulumi.scaleway.inputs.DocumentdbPrivateNetworkEndpointPrivateNetworkArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 pn = new VpcPrivateNetwork("pn");
    
            var instance = new DocumentdbInstance("instance", DocumentdbInstanceArgs.builder()
                .nodeType("docdb-play2-pico")
                .engine("FerretDB-1")
                .userName("my_initial_user")
                .password("thiZ_is_v&ry_s3cret")
                .volumeSizeInGb(20)
                .build());
    
            var main = new DocumentdbPrivateNetworkEndpoint("main", DocumentdbPrivateNetworkEndpointArgs.builder()
                .instanceId(instance.id())
                .privateNetwork(DocumentdbPrivateNetworkEndpointPrivateNetworkArgs.builder()
                    .ipNet("172.16.32.3/22")
                    .id(pn.id())
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(pn)
                    .build());
    
        }
    }
    
    resources:
      pn:
        type: scaleway:VpcPrivateNetwork
      instance:
        type: scaleway:DocumentdbInstance
        properties:
          nodeType: docdb-play2-pico
          engine: FerretDB-1
          userName: my_initial_user
          password: thiZ_is_v&ry_s3cret
          volumeSizeInGb: 20
      main:
        type: scaleway:DocumentdbPrivateNetworkEndpoint
        properties:
          instanceId: ${instance.id}
          privateNetwork:
            ipNet: 172.16.32.3/22
            id: ${pn.id}
        options:
          dependson:
            - ${pn}
    

    Create DocumentdbPrivateNetworkEndpoint Resource

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

    Constructor syntax

    new DocumentdbPrivateNetworkEndpoint(name: string, args: DocumentdbPrivateNetworkEndpointArgs, opts?: CustomResourceOptions);
    @overload
    def DocumentdbPrivateNetworkEndpoint(resource_name: str,
                                         args: DocumentdbPrivateNetworkEndpointArgs,
                                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def DocumentdbPrivateNetworkEndpoint(resource_name: str,
                                         opts: Optional[ResourceOptions] = None,
                                         instance_id: Optional[str] = None,
                                         private_network: Optional[DocumentdbPrivateNetworkEndpointPrivateNetworkArgs] = None,
                                         region: Optional[str] = None)
    func NewDocumentdbPrivateNetworkEndpoint(ctx *Context, name string, args DocumentdbPrivateNetworkEndpointArgs, opts ...ResourceOption) (*DocumentdbPrivateNetworkEndpoint, error)
    public DocumentdbPrivateNetworkEndpoint(string name, DocumentdbPrivateNetworkEndpointArgs args, CustomResourceOptions? opts = null)
    public DocumentdbPrivateNetworkEndpoint(String name, DocumentdbPrivateNetworkEndpointArgs args)
    public DocumentdbPrivateNetworkEndpoint(String name, DocumentdbPrivateNetworkEndpointArgs args, CustomResourceOptions options)
    
    type: scaleway:DocumentdbPrivateNetworkEndpoint
    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 DocumentdbPrivateNetworkEndpointArgs
    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 DocumentdbPrivateNetworkEndpointArgs
    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 DocumentdbPrivateNetworkEndpointArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DocumentdbPrivateNetworkEndpointArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DocumentdbPrivateNetworkEndpointArgs
    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 documentdbPrivateNetworkEndpointResource = new Scaleway.DocumentdbPrivateNetworkEndpoint("documentdbPrivateNetworkEndpointResource", new()
    {
        InstanceId = "string",
        PrivateNetwork = new Scaleway.Inputs.DocumentdbPrivateNetworkEndpointPrivateNetworkArgs
        {
            Id = "string",
            Hostname = "string",
            Ip = "string",
            IpNet = "string",
            Name = "string",
            Port = 0,
            Zone = "string",
        },
        Region = "string",
    });
    
    example, err := scaleway.NewDocumentdbPrivateNetworkEndpoint(ctx, "documentdbPrivateNetworkEndpointResource", &scaleway.DocumentdbPrivateNetworkEndpointArgs{
    	InstanceId: pulumi.String("string"),
    	PrivateNetwork: &scaleway.DocumentdbPrivateNetworkEndpointPrivateNetworkArgs{
    		Id:       pulumi.String("string"),
    		Hostname: pulumi.String("string"),
    		Ip:       pulumi.String("string"),
    		IpNet:    pulumi.String("string"),
    		Name:     pulumi.String("string"),
    		Port:     pulumi.Int(0),
    		Zone:     pulumi.String("string"),
    	},
    	Region: pulumi.String("string"),
    })
    
    var documentdbPrivateNetworkEndpointResource = new DocumentdbPrivateNetworkEndpoint("documentdbPrivateNetworkEndpointResource", DocumentdbPrivateNetworkEndpointArgs.builder()
        .instanceId("string")
        .privateNetwork(DocumentdbPrivateNetworkEndpointPrivateNetworkArgs.builder()
            .id("string")
            .hostname("string")
            .ip("string")
            .ipNet("string")
            .name("string")
            .port(0)
            .zone("string")
            .build())
        .region("string")
        .build());
    
    documentdb_private_network_endpoint_resource = scaleway.DocumentdbPrivateNetworkEndpoint("documentdbPrivateNetworkEndpointResource",
        instance_id="string",
        private_network=scaleway.DocumentdbPrivateNetworkEndpointPrivateNetworkArgs(
            id="string",
            hostname="string",
            ip="string",
            ip_net="string",
            name="string",
            port=0,
            zone="string",
        ),
        region="string")
    
    const documentdbPrivateNetworkEndpointResource = new scaleway.DocumentdbPrivateNetworkEndpoint("documentdbPrivateNetworkEndpointResource", {
        instanceId: "string",
        privateNetwork: {
            id: "string",
            hostname: "string",
            ip: "string",
            ipNet: "string",
            name: "string",
            port: 0,
            zone: "string",
        },
        region: "string",
    });
    
    type: scaleway:DocumentdbPrivateNetworkEndpoint
    properties:
        instanceId: string
        privateNetwork:
            hostname: string
            id: string
            ip: string
            ipNet: string
            name: string
            port: 0
            zone: string
        region: string
    

    DocumentdbPrivateNetworkEndpoint 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 DocumentdbPrivateNetworkEndpoint resource accepts the following input properties:

    InstanceId string
    UUID of the documentdb instance.
    PrivateNetwork Pulumiverse.Scaleway.Inputs.DocumentdbPrivateNetworkEndpointPrivateNetwork
    The private network specs details. This is a list with maximum one element and supports the following attributes:
    Region string

    The region of the endpoint.

    NOTE: Please calculate your host IP. using cirhost. Otherwise, lets IPAM service handle the host IP on the network.

    InstanceId string
    UUID of the documentdb instance.
    PrivateNetwork DocumentdbPrivateNetworkEndpointPrivateNetworkArgs
    The private network specs details. This is a list with maximum one element and supports the following attributes:
    Region string

    The region of the endpoint.

    NOTE: Please calculate your host IP. using cirhost. Otherwise, lets IPAM service handle the host IP on the network.

    instanceId String
    UUID of the documentdb instance.
    privateNetwork DocumentdbPrivateNetworkEndpointPrivateNetwork
    The private network specs details. This is a list with maximum one element and supports the following attributes:
    region String

    The region of the endpoint.

    NOTE: Please calculate your host IP. using cirhost. Otherwise, lets IPAM service handle the host IP on the network.

    instanceId string
    UUID of the documentdb instance.
    privateNetwork DocumentdbPrivateNetworkEndpointPrivateNetwork
    The private network specs details. This is a list with maximum one element and supports the following attributes:
    region string

    The region of the endpoint.

    NOTE: Please calculate your host IP. using cirhost. Otherwise, lets IPAM service handle the host IP on the network.

    instance_id str
    UUID of the documentdb instance.
    private_network DocumentdbPrivateNetworkEndpointPrivateNetworkArgs
    The private network specs details. This is a list with maximum one element and supports the following attributes:
    region str

    The region of the endpoint.

    NOTE: Please calculate your host IP. using cirhost. Otherwise, lets IPAM service handle the host IP on the network.

    instanceId String
    UUID of the documentdb instance.
    privateNetwork Property Map
    The private network specs details. This is a list with maximum one element and supports the following attributes:
    region String

    The region of the endpoint.

    NOTE: Please calculate your host IP. using cirhost. Otherwise, lets IPAM service handle the host IP on the network.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DocumentdbPrivateNetworkEndpoint Resource

    Get an existing DocumentdbPrivateNetworkEndpoint 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?: DocumentdbPrivateNetworkEndpointState, opts?: CustomResourceOptions): DocumentdbPrivateNetworkEndpoint
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            instance_id: Optional[str] = None,
            private_network: Optional[DocumentdbPrivateNetworkEndpointPrivateNetworkArgs] = None,
            region: Optional[str] = None) -> DocumentdbPrivateNetworkEndpoint
    func GetDocumentdbPrivateNetworkEndpoint(ctx *Context, name string, id IDInput, state *DocumentdbPrivateNetworkEndpointState, opts ...ResourceOption) (*DocumentdbPrivateNetworkEndpoint, error)
    public static DocumentdbPrivateNetworkEndpoint Get(string name, Input<string> id, DocumentdbPrivateNetworkEndpointState? state, CustomResourceOptions? opts = null)
    public static DocumentdbPrivateNetworkEndpoint get(String name, Output<String> id, DocumentdbPrivateNetworkEndpointState 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:
    InstanceId string
    UUID of the documentdb instance.
    PrivateNetwork Pulumiverse.Scaleway.Inputs.DocumentdbPrivateNetworkEndpointPrivateNetwork
    The private network specs details. This is a list with maximum one element and supports the following attributes:
    Region string

    The region of the endpoint.

    NOTE: Please calculate your host IP. using cirhost. Otherwise, lets IPAM service handle the host IP on the network.

    InstanceId string
    UUID of the documentdb instance.
    PrivateNetwork DocumentdbPrivateNetworkEndpointPrivateNetworkArgs
    The private network specs details. This is a list with maximum one element and supports the following attributes:
    Region string

    The region of the endpoint.

    NOTE: Please calculate your host IP. using cirhost. Otherwise, lets IPAM service handle the host IP on the network.

    instanceId String
    UUID of the documentdb instance.
    privateNetwork DocumentdbPrivateNetworkEndpointPrivateNetwork
    The private network specs details. This is a list with maximum one element and supports the following attributes:
    region String

    The region of the endpoint.

    NOTE: Please calculate your host IP. using cirhost. Otherwise, lets IPAM service handle the host IP on the network.

    instanceId string
    UUID of the documentdb instance.
    privateNetwork DocumentdbPrivateNetworkEndpointPrivateNetwork
    The private network specs details. This is a list with maximum one element and supports the following attributes:
    region string

    The region of the endpoint.

    NOTE: Please calculate your host IP. using cirhost. Otherwise, lets IPAM service handle the host IP on the network.

    instance_id str
    UUID of the documentdb instance.
    private_network DocumentdbPrivateNetworkEndpointPrivateNetworkArgs
    The private network specs details. This is a list with maximum one element and supports the following attributes:
    region str

    The region of the endpoint.

    NOTE: Please calculate your host IP. using cirhost. Otherwise, lets IPAM service handle the host IP on the network.

    instanceId String
    UUID of the documentdb instance.
    privateNetwork Property Map
    The private network specs details. This is a list with maximum one element and supports the following attributes:
    region String

    The region of the endpoint.

    NOTE: Please calculate your host IP. using cirhost. Otherwise, lets IPAM service handle the host IP on the network.

    Supporting Types

    DocumentdbPrivateNetworkEndpointPrivateNetwork, DocumentdbPrivateNetworkEndpointPrivateNetworkArgs

    Id string
    The private network ID.
    Hostname string
    The hostname of your endpoint.
    Ip string
    The IP of your private network service.
    IpNet string
    The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation. The IP network address within the private subnet is determined by the IP Address Management (IPAM) service if not set.
    Name string
    The name of your private service.
    Port int
    The port of your private service.
    Zone string
    The zone of your endpoint.
    Id string
    The private network ID.
    Hostname string
    The hostname of your endpoint.
    Ip string
    The IP of your private network service.
    IpNet string
    The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation. The IP network address within the private subnet is determined by the IP Address Management (IPAM) service if not set.
    Name string
    The name of your private service.
    Port int
    The port of your private service.
    Zone string
    The zone of your endpoint.
    id String
    The private network ID.
    hostname String
    The hostname of your endpoint.
    ip String
    The IP of your private network service.
    ipNet String
    The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation. The IP network address within the private subnet is determined by the IP Address Management (IPAM) service if not set.
    name String
    The name of your private service.
    port Integer
    The port of your private service.
    zone String
    The zone of your endpoint.
    id string
    The private network ID.
    hostname string
    The hostname of your endpoint.
    ip string
    The IP of your private network service.
    ipNet string
    The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation. The IP network address within the private subnet is determined by the IP Address Management (IPAM) service if not set.
    name string
    The name of your private service.
    port number
    The port of your private service.
    zone string
    The zone of your endpoint.
    id str
    The private network ID.
    hostname str
    The hostname of your endpoint.
    ip str
    The IP of your private network service.
    ip_net str
    The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation. The IP network address within the private subnet is determined by the IP Address Management (IPAM) service if not set.
    name str
    The name of your private service.
    port int
    The port of your private service.
    zone str
    The zone of your endpoint.
    id String
    The private network ID.
    hostname String
    The hostname of your endpoint.
    ip String
    The IP of your private network service.
    ipNet String
    The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation. The IP network address within the private subnet is determined by the IP Address Management (IPAM) service if not set.
    name String
    The name of your private service.
    port Number
    The port of your private service.
    zone String
    The zone of your endpoint.

    Import

    Database Instance Endpoint can be imported using the {region}/{endpoint_id}, e.g.

    bash

    $ pulumi import scaleway:index/documentdbPrivateNetworkEndpoint:DocumentdbPrivateNetworkEndpoint end fr-par/11111111-1111-1111-1111-111111111111
    

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

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse