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:
- account_
id str - Account identifier
- host
Connectivity
Directory Service Host Args - name str
- type str
- Available values: "http".
- http_
port int - https_
port int
Outputs
All input properties are implicitly available as output properties. Additionally, the ConnectivityDirectoryService resource produces the following output properties:
- created_
at str - id str
- The provider-assigned unique ID for this managed resource.
- service_
id str - updated_
at str
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) -> ConnectivityDirectoryServicefunc 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.
- account_
id str - Account identifier
- created_
at str - host
Connectivity
Directory Service Host Args - http_
port int - https_
port int - name str
- service_
id str - type str
- Available values: "http".
- updated_
at str
Supporting Types
ConnectivityDirectoryServiceHost, ConnectivityDirectoryServiceHostArgs
- hostname String
- ipv4 String
- ipv6 String
- network Property Map
- resolver
Network Property Map
ConnectivityDirectoryServiceHostNetwork, ConnectivityDirectoryServiceHostNetworkArgs
- Tunnel
Id string
- Tunnel
Id string
- tunnel
Id String
- tunnel
Id string
- tunnel_
id str
- tunnel
Id String
ConnectivityDirectoryServiceHostResolverNetwork, ConnectivityDirectoryServiceHostResolverNetworkArgs
- Tunnel
Id string - Resolver
Ips List<string>
- Tunnel
Id string - Resolver
Ips []string
- tunnel
Id String - resolver
Ips List<String>
- tunnel
Id string - resolver
Ips string[]
- tunnel_
id str - resolver_
ips Sequence[str]
- tunnel
Id String - resolver
Ips 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
cloudflareTerraform Provider.
