1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ConnectivityDirectoryService
Cloudflare v6.12.0 published on Wednesday, Dec 24, 2025 by Pulumi
cloudflare logo
Cloudflare v6.12.0 published on Wednesday, Dec 24, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleConnectivityDirectoryService = new cloudflare.ConnectivityDirectoryService("example_connectivity_directory_service", {
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        host: {
            hostname: "api.example.com",
            resolverNetwork: {
                tunnelId: "0191dce4-9ab4-7fce-b660-8e5dec5172da",
                resolverIps: ["string"],
            },
        },
        name: "web-server",
        type: "http",
        httpPort: 8080,
        httpsPort: 8443,
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_connectivity_directory_service = cloudflare.ConnectivityDirectoryService("example_connectivity_directory_service",
        account_id="023e105f4ecef8ad9ca31a8372d0c353",
        host={
            "hostname": "api.example.com",
            "resolver_network": {
                "tunnel_id": "0191dce4-9ab4-7fce-b660-8e5dec5172da",
                "resolver_ips": ["string"],
            },
        },
        name="web-server",
        type="http",
        http_port=8080,
        https_port=8443)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewConnectivityDirectoryService(ctx, "example_connectivity_directory_service", &cloudflare.ConnectivityDirectoryServiceArgs{
    			AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
    			Host: &cloudflare.ConnectivityDirectoryServiceHostArgs{
    				Hostname: pulumi.String("api.example.com"),
    				ResolverNetwork: &cloudflare.ConnectivityDirectoryServiceHostResolverNetworkArgs{
    					TunnelId: pulumi.String("0191dce4-9ab4-7fce-b660-8e5dec5172da"),
    					ResolverIps: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    			Name:      pulumi.String("web-server"),
    			Type:      pulumi.String("http"),
    			HttpPort:  pulumi.Int(8080),
    			HttpsPort: pulumi.Int(8443),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleConnectivityDirectoryService = new Cloudflare.ConnectivityDirectoryService("example_connectivity_directory_service", new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            Host = new Cloudflare.Inputs.ConnectivityDirectoryServiceHostArgs
            {
                Hostname = "api.example.com",
                ResolverNetwork = new Cloudflare.Inputs.ConnectivityDirectoryServiceHostResolverNetworkArgs
                {
                    TunnelId = "0191dce4-9ab4-7fce-b660-8e5dec5172da",
                    ResolverIps = new[]
                    {
                        "string",
                    },
                },
            },
            Name = "web-server",
            Type = "http",
            HttpPort = 8080,
            HttpsPort = 8443,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.ConnectivityDirectoryService;
    import com.pulumi.cloudflare.ConnectivityDirectoryServiceArgs;
    import com.pulumi.cloudflare.inputs.ConnectivityDirectoryServiceHostArgs;
    import com.pulumi.cloudflare.inputs.ConnectivityDirectoryServiceHostResolverNetworkArgs;
    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 exampleConnectivityDirectoryService = new ConnectivityDirectoryService("exampleConnectivityDirectoryService", ConnectivityDirectoryServiceArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .host(ConnectivityDirectoryServiceHostArgs.builder()
                    .hostname("api.example.com")
                    .resolverNetwork(ConnectivityDirectoryServiceHostResolverNetworkArgs.builder()
                        .tunnelId("0191dce4-9ab4-7fce-b660-8e5dec5172da")
                        .resolverIps("string")
                        .build())
                    .build())
                .name("web-server")
                .type("http")
                .httpPort(8080)
                .httpsPort(8443)
                .build());
    
        }
    }
    
    resources:
      exampleConnectivityDirectoryService:
        type: cloudflare:ConnectivityDirectoryService
        name: example_connectivity_directory_service
        properties:
          accountId: 023e105f4ecef8ad9ca31a8372d0c353
          host:
            hostname: api.example.com
            resolverNetwork:
              tunnelId: 0191dce4-9ab4-7fce-b660-8e5dec5172da
              resolverIps:
                - string
          name: web-server
          type: http
          httpPort: 8080
          httpsPort: 8443
    

    Create ConnectivityDirectoryService Resource

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

    Constructor syntax

    new ConnectivityDirectoryService(name: string, args: ConnectivityDirectoryServiceArgs, opts?: CustomResourceOptions);
    @overload
    def ConnectivityDirectoryService(resource_name: str,
                                     args: ConnectivityDirectoryServiceArgs,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ConnectivityDirectoryService(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     account_id: Optional[str] = None,
                                     host: Optional[ConnectivityDirectoryServiceHostArgs] = None,
                                     name: Optional[str] = None,
                                     type: Optional[str] = None,
                                     http_port: Optional[int] = None,
                                     https_port: Optional[int] = None)
    func NewConnectivityDirectoryService(ctx *Context, name string, args ConnectivityDirectoryServiceArgs, opts ...ResourceOption) (*ConnectivityDirectoryService, error)
    public ConnectivityDirectoryService(string name, ConnectivityDirectoryServiceArgs args, CustomResourceOptions? opts = null)
    public ConnectivityDirectoryService(String name, ConnectivityDirectoryServiceArgs args)
    public ConnectivityDirectoryService(String name, ConnectivityDirectoryServiceArgs args, CustomResourceOptions options)
    
    type: cloudflare:ConnectivityDirectoryService
    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 ConnectivityDirectoryServiceArgs
    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 ConnectivityDirectoryServiceArgs
    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 ConnectivityDirectoryServiceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConnectivityDirectoryServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConnectivityDirectoryServiceArgs
    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 connectivityDirectoryServiceResource = new Cloudflare.ConnectivityDirectoryService("connectivityDirectoryServiceResource", new()
    {
        AccountId = "string",
        Host = new Cloudflare.Inputs.ConnectivityDirectoryServiceHostArgs
        {
            Hostname = "string",
            Ipv4 = "string",
            Ipv6 = "string",
            Network = new Cloudflare.Inputs.ConnectivityDirectoryServiceHostNetworkArgs
            {
                TunnelId = "string",
            },
            ResolverNetwork = new Cloudflare.Inputs.ConnectivityDirectoryServiceHostResolverNetworkArgs
            {
                TunnelId = "string",
                ResolverIps = new[]
                {
                    "string",
                },
            },
        },
        Name = "string",
        Type = "string",
        HttpPort = 0,
        HttpsPort = 0,
    });
    
    example, err := cloudflare.NewConnectivityDirectoryService(ctx, "connectivityDirectoryServiceResource", &cloudflare.ConnectivityDirectoryServiceArgs{
    	AccountId: pulumi.String("string"),
    	Host: &cloudflare.ConnectivityDirectoryServiceHostArgs{
    		Hostname: pulumi.String("string"),
    		Ipv4:     pulumi.String("string"),
    		Ipv6:     pulumi.String("string"),
    		Network: &cloudflare.ConnectivityDirectoryServiceHostNetworkArgs{
    			TunnelId: pulumi.String("string"),
    		},
    		ResolverNetwork: &cloudflare.ConnectivityDirectoryServiceHostResolverNetworkArgs{
    			TunnelId: pulumi.String("string"),
    			ResolverIps: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Name:      pulumi.String("string"),
    	Type:      pulumi.String("string"),
    	HttpPort:  pulumi.Int(0),
    	HttpsPort: pulumi.Int(0),
    })
    
    var connectivityDirectoryServiceResource = new ConnectivityDirectoryService("connectivityDirectoryServiceResource", ConnectivityDirectoryServiceArgs.builder()
        .accountId("string")
        .host(ConnectivityDirectoryServiceHostArgs.builder()
            .hostname("string")
            .ipv4("string")
            .ipv6("string")
            .network(ConnectivityDirectoryServiceHostNetworkArgs.builder()
                .tunnelId("string")
                .build())
            .resolverNetwork(ConnectivityDirectoryServiceHostResolverNetworkArgs.builder()
                .tunnelId("string")
                .resolverIps("string")
                .build())
            .build())
        .name("string")
        .type("string")
        .httpPort(0)
        .httpsPort(0)
        .build());
    
    connectivity_directory_service_resource = cloudflare.ConnectivityDirectoryService("connectivityDirectoryServiceResource",
        account_id="string",
        host={
            "hostname": "string",
            "ipv4": "string",
            "ipv6": "string",
            "network": {
                "tunnel_id": "string",
            },
            "resolver_network": {
                "tunnel_id": "string",
                "resolver_ips": ["string"],
            },
        },
        name="string",
        type="string",
        http_port=0,
        https_port=0)
    
    const connectivityDirectoryServiceResource = new cloudflare.ConnectivityDirectoryService("connectivityDirectoryServiceResource", {
        accountId: "string",
        host: {
            hostname: "string",
            ipv4: "string",
            ipv6: "string",
            network: {
                tunnelId: "string",
            },
            resolverNetwork: {
                tunnelId: "string",
                resolverIps: ["string"],
            },
        },
        name: "string",
        type: "string",
        httpPort: 0,
        httpsPort: 0,
    });
    
    type: cloudflare:ConnectivityDirectoryService
    properties:
        accountId: string
        host:
            hostname: string
            ipv4: string
            ipv6: string
            network:
                tunnelId: string
            resolverNetwork:
                resolverIps:
                    - string
                tunnelId: string
        httpPort: 0
        httpsPort: 0
        name: string
        type: string
    

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

    AccountId string
    Account identifier
    Host ConnectivityDirectoryServiceHost
    Name string
    Type string
    Available values: "http".
    HttpPort int
    HttpsPort int
    AccountId string
    Account identifier
    Host ConnectivityDirectoryServiceHostArgs
    Name string
    Type string
    Available values: "http".
    HttpPort int
    HttpsPort int
    accountId String
    Account identifier
    host ConnectivityDirectoryServiceHost
    name String
    type String
    Available values: "http".
    httpPort Integer
    httpsPort Integer
    accountId string
    Account identifier
    host ConnectivityDirectoryServiceHost
    name string
    type string
    Available values: "http".
    httpPort number
    httpsPort number
    account_id str
    Account identifier
    host ConnectivityDirectoryServiceHostArgs
    name str
    type str
    Available values: "http".
    http_port int
    https_port int
    accountId String
    Account identifier
    host Property Map
    name String
    type String
    Available values: "http".
    httpPort Number
    httpsPort Number

    Outputs

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

    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    ServiceId string
    UpdatedAt string
    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    ServiceId string
    UpdatedAt string
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    serviceId String
    updatedAt String
    createdAt string
    id string
    The provider-assigned unique ID for this managed resource.
    serviceId string
    updatedAt string
    created_at str
    id str
    The provider-assigned unique ID for this managed resource.
    service_id str
    updated_at str
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    serviceId String
    updatedAt String

    Look up Existing ConnectivityDirectoryService Resource

    Get an existing ConnectivityDirectoryService 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?: ConnectivityDirectoryServiceState, opts?: CustomResourceOptions): ConnectivityDirectoryService
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            created_at: Optional[str] = None,
            host: Optional[ConnectivityDirectoryServiceHostArgs] = None,
            http_port: Optional[int] = None,
            https_port: Optional[int] = None,
            name: Optional[str] = None,
            service_id: Optional[str] = None,
            type: Optional[str] = None,
            updated_at: Optional[str] = None) -> ConnectivityDirectoryService
    func GetConnectivityDirectoryService(ctx *Context, name string, id IDInput, state *ConnectivityDirectoryServiceState, opts ...ResourceOption) (*ConnectivityDirectoryService, error)
    public static ConnectivityDirectoryService Get(string name, Input<string> id, ConnectivityDirectoryServiceState? state, CustomResourceOptions? opts = null)
    public static ConnectivityDirectoryService get(String name, Output<String> id, ConnectivityDirectoryServiceState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:ConnectivityDirectoryService    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.
    The following state arguments are supported:
    AccountId string
    Account identifier
    CreatedAt string
    Host ConnectivityDirectoryServiceHost
    HttpPort int
    HttpsPort int
    Name string
    ServiceId string
    Type string
    Available values: "http".
    UpdatedAt string
    AccountId string
    Account identifier
    CreatedAt string
    Host ConnectivityDirectoryServiceHostArgs
    HttpPort int
    HttpsPort int
    Name string
    ServiceId string
    Type string
    Available values: "http".
    UpdatedAt string
    accountId String
    Account identifier
    createdAt String
    host ConnectivityDirectoryServiceHost
    httpPort Integer
    httpsPort Integer
    name String
    serviceId String
    type String
    Available values: "http".
    updatedAt String
    accountId string
    Account identifier
    createdAt string
    host ConnectivityDirectoryServiceHost
    httpPort number
    httpsPort number
    name string
    serviceId string
    type string
    Available values: "http".
    updatedAt string
    account_id str
    Account identifier
    created_at str
    host ConnectivityDirectoryServiceHostArgs
    http_port int
    https_port int
    name str
    service_id str
    type str
    Available values: "http".
    updated_at str
    accountId String
    Account identifier
    createdAt String
    host Property Map
    httpPort Number
    httpsPort Number
    name String
    serviceId String
    type String
    Available values: "http".
    updatedAt String

    Supporting Types

    ConnectivityDirectoryServiceHost, ConnectivityDirectoryServiceHostArgs

    ConnectivityDirectoryServiceHostNetwork, ConnectivityDirectoryServiceHostNetworkArgs

    TunnelId string
    TunnelId string
    tunnelId String
    tunnelId string
    tunnelId String

    ConnectivityDirectoryServiceHostResolverNetwork, ConnectivityDirectoryServiceHostResolverNetworkArgs

    TunnelId string
    ResolverIps List<string>
    TunnelId string
    ResolverIps []string
    tunnelId String
    resolverIps List<String>
    tunnelId string
    resolverIps string[]
    tunnel_id str
    resolver_ips Sequence[str]
    tunnelId String
    resolverIps List<String>

    Import

    $ pulumi import cloudflare:index/connectivityDirectoryService:ConnectivityDirectoryService example '<account_id>/<service_id>'
    

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

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.12.0 published on Wednesday, Dec 24, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate