1. Packages
  2. OVH
  3. API Docs
  4. Hosting
  5. PrivateDatabaseAllowlist
OVHCloud v0.40.1 published on Tuesday, Mar 26, 2024 by OVHcloud

ovh.Hosting.PrivateDatabaseAllowlist

Explore with Pulumi AI

ovh logo
OVHCloud v0.40.1 published on Tuesday, Mar 26, 2024 by OVHcloud

    Create a new IP whitelist on your private cloud database instance.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const ip = new ovh.hosting.PrivateDatabaseAllowlist("ip", {
        ip: "1.2.3.4",
        service: true,
        serviceName: "XXXXXX",
        sftp: true,
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    ip = ovh.hosting.PrivateDatabaseAllowlist("ip",
        ip="1.2.3.4",
        service=True,
        service_name="XXXXXX",
        sftp=True)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/Hosting"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Hosting.NewPrivateDatabaseAllowlist(ctx, "ip", &Hosting.PrivateDatabaseAllowlistArgs{
    			Ip:          pulumi.String("1.2.3.4"),
    			Service:     pulumi.Bool(true),
    			ServiceName: pulumi.String("XXXXXX"),
    			Sftp:        pulumi.Bool(true),
    		})
    		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 ip = new Ovh.Hosting.PrivateDatabaseAllowlist("ip", new()
        {
            Ip = "1.2.3.4",
            Service = true,
            ServiceName = "XXXXXX",
            Sftp = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Hosting.PrivateDatabaseAllowlist;
    import com.pulumi.ovh.Hosting.PrivateDatabaseAllowlistArgs;
    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 ip = new PrivateDatabaseAllowlist("ip", PrivateDatabaseAllowlistArgs.builder()        
                .ip("1.2.3.4")
                .service(true)
                .serviceName("XXXXXX")
                .sftp(true)
                .build());
    
        }
    }
    
    resources:
      ip:
        type: ovh:Hosting:PrivateDatabaseAllowlist
        properties:
          ip: 1.2.3.4
          service: true
          serviceName: XXXXXX
          sftp: true
    

    Create PrivateDatabaseAllowlist Resource

    new PrivateDatabaseAllowlist(name: string, args: PrivateDatabaseAllowlistArgs, opts?: CustomResourceOptions);
    @overload
    def PrivateDatabaseAllowlist(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 ip: Optional[str] = None,
                                 name: Optional[str] = None,
                                 service: Optional[bool] = None,
                                 service_name: Optional[str] = None,
                                 sftp: Optional[bool] = None)
    @overload
    def PrivateDatabaseAllowlist(resource_name: str,
                                 args: PrivateDatabaseAllowlistArgs,
                                 opts: Optional[ResourceOptions] = None)
    func NewPrivateDatabaseAllowlist(ctx *Context, name string, args PrivateDatabaseAllowlistArgs, opts ...ResourceOption) (*PrivateDatabaseAllowlist, error)
    public PrivateDatabaseAllowlist(string name, PrivateDatabaseAllowlistArgs args, CustomResourceOptions? opts = null)
    public PrivateDatabaseAllowlist(String name, PrivateDatabaseAllowlistArgs args)
    public PrivateDatabaseAllowlist(String name, PrivateDatabaseAllowlistArgs args, CustomResourceOptions options)
    
    type: ovh:Hosting:PrivateDatabaseAllowlist
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args PrivateDatabaseAllowlistArgs
    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 PrivateDatabaseAllowlistArgs
    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 PrivateDatabaseAllowlistArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrivateDatabaseAllowlistArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrivateDatabaseAllowlistArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Ip string
    The whitelisted IP in your instance.
    Service bool
    Authorize this IP to access service port. Values can be true or false
    ServiceName string
    The internal name of your private database.
    Sftp bool
    Authorize this IP to access SFTP port. Values can be true or false
    Name string
    Custom name for your Whitelisted IP.
    Ip string
    The whitelisted IP in your instance.
    Service bool
    Authorize this IP to access service port. Values can be true or false
    ServiceName string
    The internal name of your private database.
    Sftp bool
    Authorize this IP to access SFTP port. Values can be true or false
    Name string
    Custom name for your Whitelisted IP.
    ip String
    The whitelisted IP in your instance.
    service Boolean
    Authorize this IP to access service port. Values can be true or false
    serviceName String
    The internal name of your private database.
    sftp Boolean
    Authorize this IP to access SFTP port. Values can be true or false
    name String
    Custom name for your Whitelisted IP.
    ip string
    The whitelisted IP in your instance.
    service boolean
    Authorize this IP to access service port. Values can be true or false
    serviceName string
    The internal name of your private database.
    sftp boolean
    Authorize this IP to access SFTP port. Values can be true or false
    name string
    Custom name for your Whitelisted IP.
    ip str
    The whitelisted IP in your instance.
    service bool
    Authorize this IP to access service port. Values can be true or false
    service_name str
    The internal name of your private database.
    sftp bool
    Authorize this IP to access SFTP port. Values can be true or false
    name str
    Custom name for your Whitelisted IP.
    ip String
    The whitelisted IP in your instance.
    service Boolean
    Authorize this IP to access service port. Values can be true or false
    serviceName String
    The internal name of your private database.
    sftp Boolean
    Authorize this IP to access SFTP port. Values can be true or false
    name String
    Custom name for your Whitelisted IP.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PrivateDatabaseAllowlist 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 PrivateDatabaseAllowlist Resource

    Get an existing PrivateDatabaseAllowlist 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?: PrivateDatabaseAllowlistState, opts?: CustomResourceOptions): PrivateDatabaseAllowlist
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ip: Optional[str] = None,
            name: Optional[str] = None,
            service: Optional[bool] = None,
            service_name: Optional[str] = None,
            sftp: Optional[bool] = None) -> PrivateDatabaseAllowlist
    func GetPrivateDatabaseAllowlist(ctx *Context, name string, id IDInput, state *PrivateDatabaseAllowlistState, opts ...ResourceOption) (*PrivateDatabaseAllowlist, error)
    public static PrivateDatabaseAllowlist Get(string name, Input<string> id, PrivateDatabaseAllowlistState? state, CustomResourceOptions? opts = null)
    public static PrivateDatabaseAllowlist get(String name, Output<String> id, PrivateDatabaseAllowlistState 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:
    Ip string
    The whitelisted IP in your instance.
    Name string
    Custom name for your Whitelisted IP.
    Service bool
    Authorize this IP to access service port. Values can be true or false
    ServiceName string
    The internal name of your private database.
    Sftp bool
    Authorize this IP to access SFTP port. Values can be true or false
    Ip string
    The whitelisted IP in your instance.
    Name string
    Custom name for your Whitelisted IP.
    Service bool
    Authorize this IP to access service port. Values can be true or false
    ServiceName string
    The internal name of your private database.
    Sftp bool
    Authorize this IP to access SFTP port. Values can be true or false
    ip String
    The whitelisted IP in your instance.
    name String
    Custom name for your Whitelisted IP.
    service Boolean
    Authorize this IP to access service port. Values can be true or false
    serviceName String
    The internal name of your private database.
    sftp Boolean
    Authorize this IP to access SFTP port. Values can be true or false
    ip string
    The whitelisted IP in your instance.
    name string
    Custom name for your Whitelisted IP.
    service boolean
    Authorize this IP to access service port. Values can be true or false
    serviceName string
    The internal name of your private database.
    sftp boolean
    Authorize this IP to access SFTP port. Values can be true or false
    ip str
    The whitelisted IP in your instance.
    name str
    Custom name for your Whitelisted IP.
    service bool
    Authorize this IP to access service port. Values can be true or false
    service_name str
    The internal name of your private database.
    sftp bool
    Authorize this IP to access SFTP port. Values can be true or false
    ip String
    The whitelisted IP in your instance.
    name String
    Custom name for your Whitelisted IP.
    service Boolean
    Authorize this IP to access service port. Values can be true or false
    serviceName String
    The internal name of your private database.
    sftp Boolean
    Authorize this IP to access SFTP port. Values can be true or false

    Import

    OVHcloud database whitelist can be imported using the service_name and the ip, separated by “/” E.g.,

    $ pulumi import ovh:Hosting/privateDatabaseAllowlist:PrivateDatabaseAllowlist ip service_name/ip
    

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v0.40.1 published on Tuesday, Mar 26, 2024 by OVHcloud