1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ZeroTrustAccessInfrastructureTarget
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.ZeroTrustAccessInfrastructureTarget

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    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",
            },
        },
    });
    
    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",
            },
        })
    
    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
    	})
    }
    
    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",
                },
            },
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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 string
    The unique name of the resource.
    args ZeroTrustAccessInfrastructureTargetArgs
    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 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 string
    The unique name of the resource.
    args ZeroTrustAccessInfrastructureTargetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ZeroTrustAccessInfrastructureTargetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
            },
        },
    });
    
    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"),
    		},
    	},
    })
    
    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());
    
    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",
            },
        })
    
    const zeroTrustAccessInfrastructureTargetResource = new cloudflare.ZeroTrustAccessInfrastructureTarget("zeroTrustAccessInfrastructureTargetResource", {
        accountId: "string",
        hostname: "string",
        ip: {
            ipv4: {
                ipAddr: "string",
                virtualNetworkId: "string",
            },
            ipv6: {
                ipAddr: "string",
                virtualNetworkId: "string",
            },
        },
    });
    
    type: cloudflare:ZeroTrustAccessInfrastructureTarget
    properties:
        accountId: string
        hostname: string
        ip:
            ipv4:
                ipAddr: string
                virtualNetworkId: string
            ipv6:
                ipAddr: string
                virtualNetworkId: string
    

    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 string
    Account identifier
    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
    AccountId string
    Account identifier
    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
    accountId String
    Account identifier
    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
    accountId string
    Account identifier
    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
    account_id str
    Account identifier
    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
    accountId String
    Account identifier
    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

    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
    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
    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>'
    

    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.1.2 published on Monday, Apr 28, 2025 by Pulumi