1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getZeroTrustInfrastructureAccessTargets
Cloudflare v5.49.1 published on Tuesday, Feb 18, 2025 by Pulumi

cloudflare.getZeroTrustInfrastructureAccessTargets

Explore with Pulumi AI

Use this data source to retrieve all Infrastructure Access Targets.

Example Usage

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

const example = cloudflare.getZeroTrustInfrastructureAccessTargets({
    accountId: "f037e56e89293a057740de681ac9abbe",
    hostnameContains: "example",
    ipv4: "198.51.100.1",
});
export const targets = example.then(example => example.targets);
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example = cloudflare.get_zero_trust_infrastructure_access_targets(account_id="f037e56e89293a057740de681ac9abbe",
    hostname_contains="example",
    ipv4="198.51.100.1")
pulumi.export("targets", example.targets)
Copy
package main

import (
	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := cloudflare.GetZeroTrustInfrastructureAccessTargets(ctx, &cloudflare.GetZeroTrustInfrastructureAccessTargetsArgs{
			AccountId:        "f037e56e89293a057740de681ac9abbe",
			HostnameContains: pulumi.StringRef("example"),
			Ipv4:             pulumi.StringRef("198.51.100.1"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("targets", example.Targets)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var example = Cloudflare.GetZeroTrustInfrastructureAccessTargets.Invoke(new()
    {
        AccountId = "f037e56e89293a057740de681ac9abbe",
        HostnameContains = "example",
        Ipv4 = "198.51.100.1",
    });

    return new Dictionary<string, object?>
    {
        ["targets"] = example.Apply(getZeroTrustInfrastructureAccessTargetsResult => getZeroTrustInfrastructureAccessTargetsResult.Targets),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetZeroTrustInfrastructureAccessTargetsArgs;
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) {
        final var example = CloudflareFunctions.getZeroTrustInfrastructureAccessTargets(GetZeroTrustInfrastructureAccessTargetsArgs.builder()
            .accountId("f037e56e89293a057740de681ac9abbe")
            .hostnameContains("example")
            .ipv4("198.51.100.1")
            .build());

        ctx.export("targets", example.applyValue(getZeroTrustInfrastructureAccessTargetsResult -> getZeroTrustInfrastructureAccessTargetsResult.targets()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: cloudflare:getZeroTrustInfrastructureAccessTargets
      arguments:
        accountId: f037e56e89293a057740de681ac9abbe
        hostnameContains: example
        ipv4: 198.51.100.1
outputs:
  # output the list of targets the data source contains
  targets: ${example.targets}
Copy

Using getZeroTrustInfrastructureAccessTargets

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getZeroTrustInfrastructureAccessTargets(args: GetZeroTrustInfrastructureAccessTargetsArgs, opts?: InvokeOptions): Promise<GetZeroTrustInfrastructureAccessTargetsResult>
function getZeroTrustInfrastructureAccessTargetsOutput(args: GetZeroTrustInfrastructureAccessTargetsOutputArgs, opts?: InvokeOptions): Output<GetZeroTrustInfrastructureAccessTargetsResult>
Copy
def get_zero_trust_infrastructure_access_targets(account_id: Optional[str] = None,
                                                 created_after: Optional[str] = None,
                                                 hostname: Optional[str] = None,
                                                 hostname_contains: Optional[str] = None,
                                                 ipv4: Optional[str] = None,
                                                 ipv6: Optional[str] = None,
                                                 modified_after: Optional[str] = None,
                                                 virtual_network_id: Optional[str] = None,
                                                 opts: Optional[InvokeOptions] = None) -> GetZeroTrustInfrastructureAccessTargetsResult
def get_zero_trust_infrastructure_access_targets_output(account_id: Optional[pulumi.Input[str]] = None,
                                                 created_after: Optional[pulumi.Input[str]] = None,
                                                 hostname: Optional[pulumi.Input[str]] = None,
                                                 hostname_contains: Optional[pulumi.Input[str]] = None,
                                                 ipv4: Optional[pulumi.Input[str]] = None,
                                                 ipv6: Optional[pulumi.Input[str]] = None,
                                                 modified_after: Optional[pulumi.Input[str]] = None,
                                                 virtual_network_id: Optional[pulumi.Input[str]] = None,
                                                 opts: Optional[InvokeOptions] = None) -> Output[GetZeroTrustInfrastructureAccessTargetsResult]
Copy
func GetZeroTrustInfrastructureAccessTargets(ctx *Context, args *GetZeroTrustInfrastructureAccessTargetsArgs, opts ...InvokeOption) (*GetZeroTrustInfrastructureAccessTargetsResult, error)
func GetZeroTrustInfrastructureAccessTargetsOutput(ctx *Context, args *GetZeroTrustInfrastructureAccessTargetsOutputArgs, opts ...InvokeOption) GetZeroTrustInfrastructureAccessTargetsResultOutput
Copy

> Note: This function is named GetZeroTrustInfrastructureAccessTargets in the Go SDK.

public static class GetZeroTrustInfrastructureAccessTargets 
{
    public static Task<GetZeroTrustInfrastructureAccessTargetsResult> InvokeAsync(GetZeroTrustInfrastructureAccessTargetsArgs args, InvokeOptions? opts = null)
    public static Output<GetZeroTrustInfrastructureAccessTargetsResult> Invoke(GetZeroTrustInfrastructureAccessTargetsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetZeroTrustInfrastructureAccessTargetsResult> getZeroTrustInfrastructureAccessTargets(GetZeroTrustInfrastructureAccessTargetsArgs args, InvokeOptions options)
public static Output<GetZeroTrustInfrastructureAccessTargetsResult> getZeroTrustInfrastructureAccessTargets(GetZeroTrustInfrastructureAccessTargetsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: cloudflare:index/getZeroTrustInfrastructureAccessTargets:getZeroTrustInfrastructureAccessTargets
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AccountId This property is required. string
The account identifier to target for the resource.
CreatedAfter string
A date and time after a target was created to filter on.
Hostname string
The hostname of the target.
HostnameContains string
Partial match to the hostname of a target
Ipv4 string
The target's IPv4 address.
Ipv6 string
The target's IPv6 address.
ModifiedAfter string
A date and time after a target was modified to filter on.
VirtualNetworkId string
The private virtual network identifier for the target.
AccountId This property is required. string
The account identifier to target for the resource.
CreatedAfter string
A date and time after a target was created to filter on.
Hostname string
The hostname of the target.
HostnameContains string
Partial match to the hostname of a target
Ipv4 string
The target's IPv4 address.
Ipv6 string
The target's IPv6 address.
ModifiedAfter string
A date and time after a target was modified to filter on.
VirtualNetworkId string
The private virtual network identifier for the target.
accountId This property is required. String
The account identifier to target for the resource.
createdAfter String
A date and time after a target was created to filter on.
hostname String
The hostname of the target.
hostnameContains String
Partial match to the hostname of a target
ipv4 String
The target's IPv4 address.
ipv6 String
The target's IPv6 address.
modifiedAfter String
A date and time after a target was modified to filter on.
virtualNetworkId String
The private virtual network identifier for the target.
accountId This property is required. string
The account identifier to target for the resource.
createdAfter string
A date and time after a target was created to filter on.
hostname string
The hostname of the target.
hostnameContains string
Partial match to the hostname of a target
ipv4 string
The target's IPv4 address.
ipv6 string
The target's IPv6 address.
modifiedAfter string
A date and time after a target was modified to filter on.
virtualNetworkId string
The private virtual network identifier for the target.
account_id This property is required. str
The account identifier to target for the resource.
created_after str
A date and time after a target was created to filter on.
hostname str
The hostname of the target.
hostname_contains str
Partial match to the hostname of a target
ipv4 str
The target's IPv4 address.
ipv6 str
The target's IPv6 address.
modified_after str
A date and time after a target was modified to filter on.
virtual_network_id str
The private virtual network identifier for the target.
accountId This property is required. String
The account identifier to target for the resource.
createdAfter String
A date and time after a target was created to filter on.
hostname String
The hostname of the target.
hostnameContains String
Partial match to the hostname of a target
ipv4 String
The target's IPv4 address.
ipv6 String
The target's IPv6 address.
modifiedAfter String
A date and time after a target was modified to filter on.
virtualNetworkId String
The private virtual network identifier for the target.

getZeroTrustInfrastructureAccessTargets Result

The following output properties are available:

AccountId string
The account identifier to target for the resource.
Id string
The provider-assigned unique ID for this managed resource.
Targets List<GetZeroTrustInfrastructureAccessTargetsTarget>
CreatedAfter string
A date and time after a target was created to filter on.
Hostname string
The hostname of the target.
HostnameContains string
Partial match to the hostname of a target
Ipv4 string
The target's IPv4 address.
Ipv6 string
The target's IPv6 address.
ModifiedAfter string
A date and time after a target was modified to filter on.
VirtualNetworkId string
The private virtual network identifier for the target.
AccountId string
The account identifier to target for the resource.
Id string
The provider-assigned unique ID for this managed resource.
Targets []GetZeroTrustInfrastructureAccessTargetsTarget
CreatedAfter string
A date and time after a target was created to filter on.
Hostname string
The hostname of the target.
HostnameContains string
Partial match to the hostname of a target
Ipv4 string
The target's IPv4 address.
Ipv6 string
The target's IPv6 address.
ModifiedAfter string
A date and time after a target was modified to filter on.
VirtualNetworkId string
The private virtual network identifier for the target.
accountId String
The account identifier to target for the resource.
id String
The provider-assigned unique ID for this managed resource.
targets List<GetZeroTrustInfrastructureAccessTargetsTarget>
createdAfter String
A date and time after a target was created to filter on.
hostname String
The hostname of the target.
hostnameContains String
Partial match to the hostname of a target
ipv4 String
The target's IPv4 address.
ipv6 String
The target's IPv6 address.
modifiedAfter String
A date and time after a target was modified to filter on.
virtualNetworkId String
The private virtual network identifier for the target.
accountId string
The account identifier to target for the resource.
id string
The provider-assigned unique ID for this managed resource.
targets GetZeroTrustInfrastructureAccessTargetsTarget[]
createdAfter string
A date and time after a target was created to filter on.
hostname string
The hostname of the target.
hostnameContains string
Partial match to the hostname of a target
ipv4 string
The target's IPv4 address.
ipv6 string
The target's IPv6 address.
modifiedAfter string
A date and time after a target was modified to filter on.
virtualNetworkId string
The private virtual network identifier for the target.
account_id str
The account identifier to target for the resource.
id str
The provider-assigned unique ID for this managed resource.
targets Sequence[GetZeroTrustInfrastructureAccessTargetsTarget]
created_after str
A date and time after a target was created to filter on.
hostname str
The hostname of the target.
hostname_contains str
Partial match to the hostname of a target
ipv4 str
The target's IPv4 address.
ipv6 str
The target's IPv6 address.
modified_after str
A date and time after a target was modified to filter on.
virtual_network_id str
The private virtual network identifier for the target.
accountId String
The account identifier to target for the resource.
id String
The provider-assigned unique ID for this managed resource.
targets List<Property Map>
createdAfter String
A date and time after a target was created to filter on.
hostname String
The hostname of the target.
hostnameContains String
Partial match to the hostname of a target
ipv4 String
The target's IPv4 address.
ipv6 String
The target's IPv6 address.
modifiedAfter String
A date and time after a target was modified to filter on.
virtualNetworkId String
The private virtual network identifier for the target.

Supporting Types

GetZeroTrustInfrastructureAccessTargetsTarget

AccountId This property is required. string
The account identifier to target for the resource.
CreatedAt This property is required. string
The date and time at which the target was created.
Hostname This property is required. string
A non-unique field that refers to a target.
Id This property is required. string
The identifier of this resource. This is target's unique identifier.
Ip This property is required. GetZeroTrustInfrastructureAccessTargetsTargetIp
The IPv4/IPv6 address that identifies where to reach a target.
ModifiedAt This property is required. string
The date and time at which the target was last modified.
AccountId This property is required. string
The account identifier to target for the resource.
CreatedAt This property is required. string
The date and time at which the target was created.
Hostname This property is required. string
A non-unique field that refers to a target.
Id This property is required. string
The identifier of this resource. This is target's unique identifier.
Ip This property is required. GetZeroTrustInfrastructureAccessTargetsTargetIp
The IPv4/IPv6 address that identifies where to reach a target.
ModifiedAt This property is required. string
The date and time at which the target was last modified.
accountId This property is required. String
The account identifier to target for the resource.
createdAt This property is required. String
The date and time at which the target was created.
hostname This property is required. String
A non-unique field that refers to a target.
id This property is required. String
The identifier of this resource. This is target's unique identifier.
ip This property is required. GetZeroTrustInfrastructureAccessTargetsTargetIp
The IPv4/IPv6 address that identifies where to reach a target.
modifiedAt This property is required. String
The date and time at which the target was last modified.
accountId This property is required. string
The account identifier to target for the resource.
createdAt This property is required. string
The date and time at which the target was created.
hostname This property is required. string
A non-unique field that refers to a target.
id This property is required. string
The identifier of this resource. This is target's unique identifier.
ip This property is required. GetZeroTrustInfrastructureAccessTargetsTargetIp
The IPv4/IPv6 address that identifies where to reach a target.
modifiedAt This property is required. string
The date and time at which the target was last modified.
account_id This property is required. str
The account identifier to target for the resource.
created_at This property is required. str
The date and time at which the target was created.
hostname This property is required. str
A non-unique field that refers to a target.
id This property is required. str
The identifier of this resource. This is target's unique identifier.
ip This property is required. GetZeroTrustInfrastructureAccessTargetsTargetIp
The IPv4/IPv6 address that identifies where to reach a target.
modified_at This property is required. str
The date and time at which the target was last modified.
accountId This property is required. String
The account identifier to target for the resource.
createdAt This property is required. String
The date and time at which the target was created.
hostname This property is required. String
A non-unique field that refers to a target.
id This property is required. String
The identifier of this resource. This is target's unique identifier.
ip This property is required. Property Map
The IPv4/IPv6 address that identifies where to reach a target.
modifiedAt This property is required. String
The date and time at which the target was last modified.

GetZeroTrustInfrastructureAccessTargetsTargetIp

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

GetZeroTrustInfrastructureAccessTargetsTargetIpIpv4

IpAddr This property is required. string
The IP address of the target.
VirtualNetworkId This property is required. string
The private virtual network identifier for the target.
IpAddr This property is required. string
The IP address of the target.
VirtualNetworkId This property is required. string
The private virtual network identifier for the target.
ipAddr This property is required. String
The IP address of the target.
virtualNetworkId This property is required. String
The private virtual network identifier for the target.
ipAddr This property is required. string
The IP address of the target.
virtualNetworkId This property is required. string
The private virtual network identifier for the target.
ip_addr This property is required. str
The IP address of the target.
virtual_network_id This property is required. str
The private virtual network identifier for the target.
ipAddr This property is required. String
The IP address of the target.
virtualNetworkId This property is required. String
The private virtual network identifier for the target.

GetZeroTrustInfrastructureAccessTargetsTargetIpIpv6

IpAddr This property is required. string
The IP address of the target.
VirtualNetworkId This property is required. string
The private virtual network identifier for the target.
IpAddr This property is required. string
The IP address of the target.
VirtualNetworkId This property is required. string
The private virtual network identifier for the target.
ipAddr This property is required. String
The IP address of the target.
virtualNetworkId This property is required. String
The private virtual network identifier for the target.
ipAddr This property is required. string
The IP address of the target.
virtualNetworkId This property is required. string
The private virtual network identifier for the target.
ip_addr This property is required. str
The IP address of the target.
virtual_network_id This property is required. str
The private virtual network identifier for the target.
ipAddr This property is required. String
The IP address of the target.
virtualNetworkId This property is required. String
The private virtual network identifier for the target.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.