1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ZeroTrustAccessInfrastructureTarget
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

cloudflare.ZeroTrustAccessInfrastructureTarget

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const exampleZeroTrustAccessInfrastructureTarget = new cloudflare.ZeroTrustAccessInfrastructureTarget("example_zero_trust_access_infrastructure_target", {
    accountId: "023e105f4ecef8ad9ca31a8372d0c353",
    hostname: "infra-access-target",
    ip: {
        ipv4: {
            ipAddr: "187.26.29.249",
            virtualNetworkId: "c77b744e-acc8-428f-9257-6878c046ed55",
        },
        ipv6: {
            ipAddr: "64c0:64e8:f0b4:8dbf:7104:72b0:ec8f:f5e0",
            virtualNetworkId: "c77b744e-acc8-428f-9257-6878c046ed55",
        },
    },
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_zero_trust_access_infrastructure_target = cloudflare.ZeroTrustAccessInfrastructureTarget("example_zero_trust_access_infrastructure_target",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
    hostname="infra-access-target",
    ip={
        "ipv4": {
            "ip_addr": "187.26.29.249",
            "virtual_network_id": "c77b744e-acc8-428f-9257-6878c046ed55",
        },
        "ipv6": {
            "ip_addr": "64c0:64e8:f0b4:8dbf:7104:72b0:ec8f:f5e0",
            "virtual_network_id": "c77b744e-acc8-428f-9257-6878c046ed55",
        },
    })
Copy
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.NewZeroTrustAccessInfrastructureTarget(ctx, "example_zero_trust_access_infrastructure_target", &cloudflare.ZeroTrustAccessInfrastructureTargetArgs{
			AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
			Hostname:  pulumi.String("infra-access-target"),
			Ip: &cloudflare.ZeroTrustAccessInfrastructureTargetIpArgs{
				Ipv4: &cloudflare.ZeroTrustAccessInfrastructureTargetIpIpv4Args{
					IpAddr:           pulumi.String("187.26.29.249"),
					VirtualNetworkId: pulumi.String("c77b744e-acc8-428f-9257-6878c046ed55"),
				},
				Ipv6: &cloudflare.ZeroTrustAccessInfrastructureTargetIpIpv6Args{
					IpAddr:           pulumi.String("64c0:64e8:f0b4:8dbf:7104:72b0:ec8f:f5e0"),
					VirtualNetworkId: pulumi.String("c77b744e-acc8-428f-9257-6878c046ed55"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var exampleZeroTrustAccessInfrastructureTarget = new Cloudflare.ZeroTrustAccessInfrastructureTarget("example_zero_trust_access_infrastructure_target", new()
    {
        AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
        Hostname = "infra-access-target",
        Ip = new Cloudflare.Inputs.ZeroTrustAccessInfrastructureTargetIpArgs
        {
            Ipv4 = new Cloudflare.Inputs.ZeroTrustAccessInfrastructureTargetIpIpv4Args
            {
                IpAddr = "187.26.29.249",
                VirtualNetworkId = "c77b744e-acc8-428f-9257-6878c046ed55",
            },
            Ipv6 = new Cloudflare.Inputs.ZeroTrustAccessInfrastructureTargetIpIpv6Args
            {
                IpAddr = "64c0:64e8:f0b4:8dbf:7104:72b0:ec8f:f5e0",
                VirtualNetworkId = "c77b744e-acc8-428f-9257-6878c046ed55",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZeroTrustAccessInfrastructureTarget;
import com.pulumi.cloudflare.ZeroTrustAccessInfrastructureTargetArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustAccessInfrastructureTargetIpArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustAccessInfrastructureTargetIpIpv4Args;
import com.pulumi.cloudflare.inputs.ZeroTrustAccessInfrastructureTargetIpIpv6Args;
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 exampleZeroTrustAccessInfrastructureTarget = new ZeroTrustAccessInfrastructureTarget("exampleZeroTrustAccessInfrastructureTarget", ZeroTrustAccessInfrastructureTargetArgs.builder()
            .accountId("023e105f4ecef8ad9ca31a8372d0c353")
            .hostname("infra-access-target")
            .ip(ZeroTrustAccessInfrastructureTargetIpArgs.builder()
                .ipv4(ZeroTrustAccessInfrastructureTargetIpIpv4Args.builder()
                    .ipAddr("187.26.29.249")
                    .virtualNetworkId("c77b744e-acc8-428f-9257-6878c046ed55")
                    .build())
                .ipv6(ZeroTrustAccessInfrastructureTargetIpIpv6Args.builder()
                    .ipAddr("64c0:64e8:f0b4:8dbf:7104:72b0:ec8f:f5e0")
                    .virtualNetworkId("c77b744e-acc8-428f-9257-6878c046ed55")
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  exampleZeroTrustAccessInfrastructureTarget:
    type: cloudflare:ZeroTrustAccessInfrastructureTarget
    name: example_zero_trust_access_infrastructure_target
    properties:
      accountId: 023e105f4ecef8ad9ca31a8372d0c353
      hostname: infra-access-target
      ip:
        ipv4:
          ipAddr: 187.26.29.249
          virtualNetworkId: c77b744e-acc8-428f-9257-6878c046ed55
        ipv6:
          ipAddr: 64c0:64e8:f0b4:8dbf:7104:72b0:ec8f:f5e0
          virtualNetworkId: c77b744e-acc8-428f-9257-6878c046ed55
Copy

Create ZeroTrustAccessInfrastructureTarget Resource

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

Constructor syntax

new ZeroTrustAccessInfrastructureTarget(name: string, args: ZeroTrustAccessInfrastructureTargetArgs, opts?: CustomResourceOptions);
@overload
def ZeroTrustAccessInfrastructureTarget(resource_name: str,
                                        args: ZeroTrustAccessInfrastructureTargetArgs,
                                        opts: Optional[ResourceOptions] = None)

@overload
def ZeroTrustAccessInfrastructureTarget(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        account_id: Optional[str] = None,
                                        hostname: Optional[str] = None,
                                        ip: Optional[ZeroTrustAccessInfrastructureTargetIpArgs] = None)
func NewZeroTrustAccessInfrastructureTarget(ctx *Context, name string, args ZeroTrustAccessInfrastructureTargetArgs, opts ...ResourceOption) (*ZeroTrustAccessInfrastructureTarget, error)
public ZeroTrustAccessInfrastructureTarget(string name, ZeroTrustAccessInfrastructureTargetArgs args, CustomResourceOptions? opts = null)
public ZeroTrustAccessInfrastructureTarget(String name, ZeroTrustAccessInfrastructureTargetArgs args)
public ZeroTrustAccessInfrastructureTarget(String name, ZeroTrustAccessInfrastructureTargetArgs args, CustomResourceOptions options)
type: cloudflare:ZeroTrustAccessInfrastructureTarget
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ZeroTrustAccessInfrastructureTargetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ZeroTrustAccessInfrastructureTargetArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ZeroTrustAccessInfrastructureTargetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ZeroTrustAccessInfrastructureTargetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ZeroTrustAccessInfrastructureTargetArgs
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 zeroTrustAccessInfrastructureTargetResource = new Cloudflare.ZeroTrustAccessInfrastructureTarget("zeroTrustAccessInfrastructureTargetResource", new()
{
    AccountId = "string",
    Hostname = "string",
    Ip = new Cloudflare.Inputs.ZeroTrustAccessInfrastructureTargetIpArgs
    {
        Ipv4 = new Cloudflare.Inputs.ZeroTrustAccessInfrastructureTargetIpIpv4Args
        {
            IpAddr = "string",
            VirtualNetworkId = "string",
        },
        Ipv6 = new Cloudflare.Inputs.ZeroTrustAccessInfrastructureTargetIpIpv6Args
        {
            IpAddr = "string",
            VirtualNetworkId = "string",
        },
    },
});
Copy
example, err := cloudflare.NewZeroTrustAccessInfrastructureTarget(ctx, "zeroTrustAccessInfrastructureTargetResource", &cloudflare.ZeroTrustAccessInfrastructureTargetArgs{
	AccountId: pulumi.String("string"),
	Hostname:  pulumi.String("string"),
	Ip: &cloudflare.ZeroTrustAccessInfrastructureTargetIpArgs{
		Ipv4: &cloudflare.ZeroTrustAccessInfrastructureTargetIpIpv4Args{
			IpAddr:           pulumi.String("string"),
			VirtualNetworkId: pulumi.String("string"),
		},
		Ipv6: &cloudflare.ZeroTrustAccessInfrastructureTargetIpIpv6Args{
			IpAddr:           pulumi.String("string"),
			VirtualNetworkId: pulumi.String("string"),
		},
	},
})
Copy
var zeroTrustAccessInfrastructureTargetResource = new ZeroTrustAccessInfrastructureTarget("zeroTrustAccessInfrastructureTargetResource", ZeroTrustAccessInfrastructureTargetArgs.builder()
    .accountId("string")
    .hostname("string")
    .ip(ZeroTrustAccessInfrastructureTargetIpArgs.builder()
        .ipv4(ZeroTrustAccessInfrastructureTargetIpIpv4Args.builder()
            .ipAddr("string")
            .virtualNetworkId("string")
            .build())
        .ipv6(ZeroTrustAccessInfrastructureTargetIpIpv6Args.builder()
            .ipAddr("string")
            .virtualNetworkId("string")
            .build())
        .build())
    .build());
Copy
zero_trust_access_infrastructure_target_resource = cloudflare.ZeroTrustAccessInfrastructureTarget("zeroTrustAccessInfrastructureTargetResource",
    account_id="string",
    hostname="string",
    ip={
        "ipv4": {
            "ip_addr": "string",
            "virtual_network_id": "string",
        },
        "ipv6": {
            "ip_addr": "string",
            "virtual_network_id": "string",
        },
    })
Copy
const zeroTrustAccessInfrastructureTargetResource = new cloudflare.ZeroTrustAccessInfrastructureTarget("zeroTrustAccessInfrastructureTargetResource", {
    accountId: "string",
    hostname: "string",
    ip: {
        ipv4: {
            ipAddr: "string",
            virtualNetworkId: "string",
        },
        ipv6: {
            ipAddr: "string",
            virtualNetworkId: "string",
        },
    },
});
Copy
type: cloudflare:ZeroTrustAccessInfrastructureTarget
properties:
    accountId: string
    hostname: string
    ip:
        ipv4:
            ipAddr: string
            virtualNetworkId: string
        ipv6:
            ipAddr: string
            virtualNetworkId: string
Copy

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

AccountId This property is required. string
Account identifier
Hostname This property is required. string
A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.
Ip This property is required. ZeroTrustAccessInfrastructureTargetIp
The IPv4/IPv6 address that identifies where to reach a target
AccountId This property is required. string
Account identifier
Hostname This property is required. string
A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.
Ip This property is required. ZeroTrustAccessInfrastructureTargetIpArgs
The IPv4/IPv6 address that identifies where to reach a target
accountId This property is required. String
Account identifier
hostname This property is required. String
A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.
ip This property is required. ZeroTrustAccessInfrastructureTargetIp
The IPv4/IPv6 address that identifies where to reach a target
accountId This property is required. string
Account identifier
hostname This property is required. string
A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.
ip This property is required. ZeroTrustAccessInfrastructureTargetIp
The IPv4/IPv6 address that identifies where to reach a target
account_id This property is required. str
Account identifier
hostname This property is required. str
A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.
ip This property is required. ZeroTrustAccessInfrastructureTargetIpArgs
The IPv4/IPv6 address that identifies where to reach a target
accountId This property is required. String
Account identifier
hostname This property is required. String
A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.
ip This property is required. Property Map
The IPv4/IPv6 address that identifies where to reach a target

Outputs

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

CreatedAt string
Date and time at which the target was created
Id string
The provider-assigned unique ID for this managed resource.
ModifiedAt string
Date and time at which the target was modified
CreatedAt string
Date and time at which the target was created
Id string
The provider-assigned unique ID for this managed resource.
ModifiedAt string
Date and time at which the target was modified
createdAt String
Date and time at which the target was created
id String
The provider-assigned unique ID for this managed resource.
modifiedAt String
Date and time at which the target was modified
createdAt string
Date and time at which the target was created
id string
The provider-assigned unique ID for this managed resource.
modifiedAt string
Date and time at which the target was modified
created_at str
Date and time at which the target was created
id str
The provider-assigned unique ID for this managed resource.
modified_at str
Date and time at which the target was modified
createdAt String
Date and time at which the target was created
id String
The provider-assigned unique ID for this managed resource.
modifiedAt String
Date and time at which the target was modified

Look up Existing ZeroTrustAccessInfrastructureTarget Resource

Get an existing ZeroTrustAccessInfrastructureTarget 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?: ZeroTrustAccessInfrastructureTargetState, opts?: CustomResourceOptions): ZeroTrustAccessInfrastructureTarget
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        created_at: Optional[str] = None,
        hostname: Optional[str] = None,
        ip: Optional[ZeroTrustAccessInfrastructureTargetIpArgs] = None,
        modified_at: Optional[str] = None) -> ZeroTrustAccessInfrastructureTarget
func GetZeroTrustAccessInfrastructureTarget(ctx *Context, name string, id IDInput, state *ZeroTrustAccessInfrastructureTargetState, opts ...ResourceOption) (*ZeroTrustAccessInfrastructureTarget, error)
public static ZeroTrustAccessInfrastructureTarget Get(string name, Input<string> id, ZeroTrustAccessInfrastructureTargetState? state, CustomResourceOptions? opts = null)
public static ZeroTrustAccessInfrastructureTarget get(String name, Output<String> id, ZeroTrustAccessInfrastructureTargetState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:ZeroTrustAccessInfrastructureTarget    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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
Date and time at which the target was created
Hostname string
A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.
Ip ZeroTrustAccessInfrastructureTargetIp
The IPv4/IPv6 address that identifies where to reach a target
ModifiedAt string
Date and time at which the target was modified
AccountId string
Account identifier
CreatedAt string
Date and time at which the target was created
Hostname string
A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.
Ip ZeroTrustAccessInfrastructureTargetIpArgs
The IPv4/IPv6 address that identifies where to reach a target
ModifiedAt string
Date and time at which the target was modified
accountId String
Account identifier
createdAt String
Date and time at which the target was created
hostname String
A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.
ip ZeroTrustAccessInfrastructureTargetIp
The IPv4/IPv6 address that identifies where to reach a target
modifiedAt String
Date and time at which the target was modified
accountId string
Account identifier
createdAt string
Date and time at which the target was created
hostname string
A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.
ip ZeroTrustAccessInfrastructureTargetIp
The IPv4/IPv6 address that identifies where to reach a target
modifiedAt string
Date and time at which the target was modified
account_id str
Account identifier
created_at str
Date and time at which the target was created
hostname str
A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.
ip ZeroTrustAccessInfrastructureTargetIpArgs
The IPv4/IPv6 address that identifies where to reach a target
modified_at str
Date and time at which the target was modified
accountId String
Account identifier
createdAt String
Date and time at which the target was created
hostname String
A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.
ip Property Map
The IPv4/IPv6 address that identifies where to reach a target
modifiedAt String
Date and time at which the target was modified

Supporting Types

ZeroTrustAccessInfrastructureTargetIp
, ZeroTrustAccessInfrastructureTargetIpArgs

ipv4 Property Map
The target's IPv4 address
ipv6 Property Map
The target's IPv6 address

ZeroTrustAccessInfrastructureTargetIpIpv4
, ZeroTrustAccessInfrastructureTargetIpIpv4Args

IpAddr string
IP address of the target
VirtualNetworkId string
(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.
IpAddr string
IP address of the target
VirtualNetworkId string
(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.
ipAddr String
IP address of the target
virtualNetworkId String
(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.
ipAddr string
IP address of the target
virtualNetworkId string
(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.
ip_addr str
IP address of the target
virtual_network_id str
(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.
ipAddr String
IP address of the target
virtualNetworkId String
(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.

ZeroTrustAccessInfrastructureTargetIpIpv6
, ZeroTrustAccessInfrastructureTargetIpIpv6Args

IpAddr string
IP address of the target
VirtualNetworkId string
(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.
IpAddr string
IP address of the target
VirtualNetworkId string
(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.
ipAddr String
IP address of the target
virtualNetworkId String
(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.
ipAddr string
IP address of the target
virtualNetworkId string
(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.
ip_addr str
IP address of the target
virtual_network_id str
(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.
ipAddr String
IP address of the target
virtualNetworkId String
(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.

Import

$ pulumi import cloudflare:index/zeroTrustAccessInfrastructureTarget:ZeroTrustAccessInfrastructureTarget example '<account_id>/<target_id>'
Copy

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.