cloudflare.ZeroTrustInfrastructureAccessTarget
Explore with Pulumi AI
The Infrastructure Access Target resource allows you to configure Infrastructure Access Targets for an account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const example = new cloudflare.ZeroTrustInfrastructureAccessTarget("example", {
accountId: "f037e56e89293a057740de681ac9abbe",
hostname: "example-target",
ip: {
ipv4: {
ipAddr: "198.51.100.1",
virtualNetworkId: "238dccd1-149b-463d-8228-560ab83a54fd",
},
ipv6: {
ipAddr: "2001:db8::",
virtualNetworkId: "238dccd1-149b-463d-8228-560ab83a54fd",
},
},
});
const ipv4OnlyExample = new cloudflare.ZeroTrustInfrastructureAccessTarget("ipv4_only_example", {
accountId: "f037e56e89293a057740de681ac9abbe",
hostname: "example-ipv4-only",
ip: {
ipv4: {
ipAddr: "198.51.100.1",
virtualNetworkId: "238dccd1-149b-463d-8228-560ab83a54fd",
},
},
});
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.ZeroTrustInfrastructureAccessTarget("example",
account_id="f037e56e89293a057740de681ac9abbe",
hostname="example-target",
ip={
"ipv4": {
"ip_addr": "198.51.100.1",
"virtual_network_id": "238dccd1-149b-463d-8228-560ab83a54fd",
},
"ipv6": {
"ip_addr": "2001:db8::",
"virtual_network_id": "238dccd1-149b-463d-8228-560ab83a54fd",
},
})
ipv4_only_example = cloudflare.ZeroTrustInfrastructureAccessTarget("ipv4_only_example",
account_id="f037e56e89293a057740de681ac9abbe",
hostname="example-ipv4-only",
ip={
"ipv4": {
"ip_addr": "198.51.100.1",
"virtual_network_id": "238dccd1-149b-463d-8228-560ab83a54fd",
},
})
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 {
_, err := cloudflare.NewZeroTrustInfrastructureAccessTarget(ctx, "example", &cloudflare.ZeroTrustInfrastructureAccessTargetArgs{
AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
Hostname: pulumi.String("example-target"),
Ip: &cloudflare.ZeroTrustInfrastructureAccessTargetIpArgs{
Ipv4: &cloudflare.ZeroTrustInfrastructureAccessTargetIpIpv4Args{
IpAddr: pulumi.String("198.51.100.1"),
VirtualNetworkId: pulumi.String("238dccd1-149b-463d-8228-560ab83a54fd"),
},
Ipv6: &cloudflare.ZeroTrustInfrastructureAccessTargetIpIpv6Args{
IpAddr: pulumi.String("2001:db8::"),
VirtualNetworkId: pulumi.String("238dccd1-149b-463d-8228-560ab83a54fd"),
},
},
})
if err != nil {
return err
}
_, err = cloudflare.NewZeroTrustInfrastructureAccessTarget(ctx, "ipv4_only_example", &cloudflare.ZeroTrustInfrastructureAccessTargetArgs{
AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
Hostname: pulumi.String("example-ipv4-only"),
Ip: &cloudflare.ZeroTrustInfrastructureAccessTargetIpArgs{
Ipv4: &cloudflare.ZeroTrustInfrastructureAccessTargetIpIpv4Args{
IpAddr: pulumi.String("198.51.100.1"),
VirtualNetworkId: pulumi.String("238dccd1-149b-463d-8228-560ab83a54fd"),
},
},
})
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 example = new Cloudflare.ZeroTrustInfrastructureAccessTarget("example", new()
{
AccountId = "f037e56e89293a057740de681ac9abbe",
Hostname = "example-target",
Ip = new Cloudflare.Inputs.ZeroTrustInfrastructureAccessTargetIpArgs
{
Ipv4 = new Cloudflare.Inputs.ZeroTrustInfrastructureAccessTargetIpIpv4Args
{
IpAddr = "198.51.100.1",
VirtualNetworkId = "238dccd1-149b-463d-8228-560ab83a54fd",
},
Ipv6 = new Cloudflare.Inputs.ZeroTrustInfrastructureAccessTargetIpIpv6Args
{
IpAddr = "2001:db8::",
VirtualNetworkId = "238dccd1-149b-463d-8228-560ab83a54fd",
},
},
});
var ipv4OnlyExample = new Cloudflare.ZeroTrustInfrastructureAccessTarget("ipv4_only_example", new()
{
AccountId = "f037e56e89293a057740de681ac9abbe",
Hostname = "example-ipv4-only",
Ip = new Cloudflare.Inputs.ZeroTrustInfrastructureAccessTargetIpArgs
{
Ipv4 = new Cloudflare.Inputs.ZeroTrustInfrastructureAccessTargetIpIpv4Args
{
IpAddr = "198.51.100.1",
VirtualNetworkId = "238dccd1-149b-463d-8228-560ab83a54fd",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZeroTrustInfrastructureAccessTarget;
import com.pulumi.cloudflare.ZeroTrustInfrastructureAccessTargetArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustInfrastructureAccessTargetIpArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustInfrastructureAccessTargetIpIpv4Args;
import com.pulumi.cloudflare.inputs.ZeroTrustInfrastructureAccessTargetIpIpv6Args;
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 example = new ZeroTrustInfrastructureAccessTarget("example", ZeroTrustInfrastructureAccessTargetArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.hostname("example-target")
.ip(ZeroTrustInfrastructureAccessTargetIpArgs.builder()
.ipv4(ZeroTrustInfrastructureAccessTargetIpIpv4Args.builder()
.ipAddr("198.51.100.1")
.virtualNetworkId("238dccd1-149b-463d-8228-560ab83a54fd")
.build())
.ipv6(ZeroTrustInfrastructureAccessTargetIpIpv6Args.builder()
.ipAddr("2001:db8::")
.virtualNetworkId("238dccd1-149b-463d-8228-560ab83a54fd")
.build())
.build())
.build());
var ipv4OnlyExample = new ZeroTrustInfrastructureAccessTarget("ipv4OnlyExample", ZeroTrustInfrastructureAccessTargetArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.hostname("example-ipv4-only")
.ip(ZeroTrustInfrastructureAccessTargetIpArgs.builder()
.ipv4(ZeroTrustInfrastructureAccessTargetIpIpv4Args.builder()
.ipAddr("198.51.100.1")
.virtualNetworkId("238dccd1-149b-463d-8228-560ab83a54fd")
.build())
.build())
.build());
}
}
resources:
example:
type: cloudflare:ZeroTrustInfrastructureAccessTarget
properties:
accountId: f037e56e89293a057740de681ac9abbe
hostname: example-target
ip:
ipv4:
ipAddr: 198.51.100.1
virtualNetworkId: 238dccd1-149b-463d-8228-560ab83a54fd
ipv6:
ipAddr: '2001:db8::'
virtualNetworkId: 238dccd1-149b-463d-8228-560ab83a54fd
ipv4OnlyExample:
type: cloudflare:ZeroTrustInfrastructureAccessTarget
name: ipv4_only_example
properties:
accountId: f037e56e89293a057740de681ac9abbe
hostname: example-ipv4-only
ip:
ipv4:
ipAddr: 198.51.100.1
virtualNetworkId: 238dccd1-149b-463d-8228-560ab83a54fd
Create ZeroTrustInfrastructureAccessTarget Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZeroTrustInfrastructureAccessTarget(name: string, args: ZeroTrustInfrastructureAccessTargetArgs, opts?: CustomResourceOptions);
@overload
def ZeroTrustInfrastructureAccessTarget(resource_name: str,
args: ZeroTrustInfrastructureAccessTargetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ZeroTrustInfrastructureAccessTarget(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
hostname: Optional[str] = None,
ip: Optional[ZeroTrustInfrastructureAccessTargetIpArgs] = None)
func NewZeroTrustInfrastructureAccessTarget(ctx *Context, name string, args ZeroTrustInfrastructureAccessTargetArgs, opts ...ResourceOption) (*ZeroTrustInfrastructureAccessTarget, error)
public ZeroTrustInfrastructureAccessTarget(string name, ZeroTrustInfrastructureAccessTargetArgs args, CustomResourceOptions? opts = null)
public ZeroTrustInfrastructureAccessTarget(String name, ZeroTrustInfrastructureAccessTargetArgs args)
public ZeroTrustInfrastructureAccessTarget(String name, ZeroTrustInfrastructureAccessTargetArgs args, CustomResourceOptions options)
type: cloudflare:ZeroTrustInfrastructureAccessTarget
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 ZeroTrustInfrastructureAccessTargetArgs
- 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 ZeroTrustInfrastructureAccessTargetArgs
- 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 ZeroTrustInfrastructureAccessTargetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZeroTrustInfrastructureAccessTargetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZeroTrustInfrastructureAccessTargetArgs
- 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 zeroTrustInfrastructureAccessTargetResource = new Cloudflare.ZeroTrustInfrastructureAccessTarget("zeroTrustInfrastructureAccessTargetResource", new()
{
AccountId = "string",
Hostname = "string",
Ip = new Cloudflare.Inputs.ZeroTrustInfrastructureAccessTargetIpArgs
{
Ipv4 = new Cloudflare.Inputs.ZeroTrustInfrastructureAccessTargetIpIpv4Args
{
IpAddr = "string",
VirtualNetworkId = "string",
},
Ipv6 = new Cloudflare.Inputs.ZeroTrustInfrastructureAccessTargetIpIpv6Args
{
IpAddr = "string",
VirtualNetworkId = "string",
},
},
});
example, err := cloudflare.NewZeroTrustInfrastructureAccessTarget(ctx, "zeroTrustInfrastructureAccessTargetResource", &cloudflare.ZeroTrustInfrastructureAccessTargetArgs{
AccountId: pulumi.String("string"),
Hostname: pulumi.String("string"),
Ip: &cloudflare.ZeroTrustInfrastructureAccessTargetIpArgs{
Ipv4: &cloudflare.ZeroTrustInfrastructureAccessTargetIpIpv4Args{
IpAddr: pulumi.String("string"),
VirtualNetworkId: pulumi.String("string"),
},
Ipv6: &cloudflare.ZeroTrustInfrastructureAccessTargetIpIpv6Args{
IpAddr: pulumi.String("string"),
VirtualNetworkId: pulumi.String("string"),
},
},
})
var zeroTrustInfrastructureAccessTargetResource = new ZeroTrustInfrastructureAccessTarget("zeroTrustInfrastructureAccessTargetResource", ZeroTrustInfrastructureAccessTargetArgs.builder()
.accountId("string")
.hostname("string")
.ip(ZeroTrustInfrastructureAccessTargetIpArgs.builder()
.ipv4(ZeroTrustInfrastructureAccessTargetIpIpv4Args.builder()
.ipAddr("string")
.virtualNetworkId("string")
.build())
.ipv6(ZeroTrustInfrastructureAccessTargetIpIpv6Args.builder()
.ipAddr("string")
.virtualNetworkId("string")
.build())
.build())
.build());
zero_trust_infrastructure_access_target_resource = cloudflare.ZeroTrustInfrastructureAccessTarget("zeroTrustInfrastructureAccessTargetResource",
account_id="string",
hostname="string",
ip={
"ipv4": {
"ip_addr": "string",
"virtual_network_id": "string",
},
"ipv6": {
"ip_addr": "string",
"virtual_network_id": "string",
},
})
const zeroTrustInfrastructureAccessTargetResource = new cloudflare.ZeroTrustInfrastructureAccessTarget("zeroTrustInfrastructureAccessTargetResource", {
accountId: "string",
hostname: "string",
ip: {
ipv4: {
ipAddr: "string",
virtualNetworkId: "string",
},
ipv6: {
ipAddr: "string",
virtualNetworkId: "string",
},
},
});
type: cloudflare:ZeroTrustInfrastructureAccessTarget
properties:
accountId: string
hostname: string
ip:
ipv4:
ipAddr: string
virtualNetworkId: string
ipv6:
ipAddr: string
virtualNetworkId: string
ZeroTrustInfrastructureAccessTarget 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 ZeroTrustInfrastructureAccessTarget resource accepts the following input properties:
- Account
Id string - The account identifier to target for the resource.
- Hostname string
- A non-unique field that refers to a target.
- Ip
Zero
Trust Infrastructure Access Target Ip - The IPv4/IPv6 address that identifies where to reach a target.
- Account
Id string - The account identifier to target for the resource.
- Hostname string
- A non-unique field that refers to a target.
- Ip
Zero
Trust Infrastructure Access Target Ip Args - The IPv4/IPv6 address that identifies where to reach a target.
- account
Id String - The account identifier to target for the resource.
- hostname String
- A non-unique field that refers to a target.
- ip
Zero
Trust Infrastructure Access Target Ip - The IPv4/IPv6 address that identifies where to reach a target.
- account
Id string - The account identifier to target for the resource.
- hostname string
- A non-unique field that refers to a target.
- ip
Zero
Trust Infrastructure Access Target Ip - The IPv4/IPv6 address that identifies where to reach a target.
- account_
id str - The account identifier to target for the resource.
- hostname str
- A non-unique field that refers to a target.
- ip
Zero
Trust Infrastructure Access Target Ip Args - The IPv4/IPv6 address that identifies where to reach a target.
- account
Id String - The account identifier to target for the resource.
- hostname String
- A non-unique field that refers to a target.
- 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 ZeroTrustInfrastructureAccessTarget resource produces the following output properties:
- Created
At string - The date and time at which the target was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
At string - The date and time at which the target was last modified.
- Created
At string - The date and time at which the target was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
At string - The date and time at which the target was last modified.
- created
At String - The date and time at which the target was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
At String - The date and time at which the target was last modified.
- created
At string - The date and time at which the target was created.
- id string
- The provider-assigned unique ID for this managed resource.
- modified
At string - The date and time at which the target was last modified.
- created_
at str - The date and time at which the target was created.
- id str
- The provider-assigned unique ID for this managed resource.
- modified_
at str - The date and time at which the target was last modified.
- created
At String - The date and time at which the target was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
At String - The date and time at which the target was last modified.
Look up Existing ZeroTrustInfrastructureAccessTarget Resource
Get an existing ZeroTrustInfrastructureAccessTarget 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?: ZeroTrustInfrastructureAccessTargetState, opts?: CustomResourceOptions): ZeroTrustInfrastructureAccessTarget
@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[ZeroTrustInfrastructureAccessTargetIpArgs] = None,
modified_at: Optional[str] = None) -> ZeroTrustInfrastructureAccessTarget
func GetZeroTrustInfrastructureAccessTarget(ctx *Context, name string, id IDInput, state *ZeroTrustInfrastructureAccessTargetState, opts ...ResourceOption) (*ZeroTrustInfrastructureAccessTarget, error)
public static ZeroTrustInfrastructureAccessTarget Get(string name, Input<string> id, ZeroTrustInfrastructureAccessTargetState? state, CustomResourceOptions? opts = null)
public static ZeroTrustInfrastructureAccessTarget get(String name, Output<String> id, ZeroTrustInfrastructureAccessTargetState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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 string - The account identifier to target for the resource.
- Created
At string - The date and time at which the target was created.
- Hostname string
- A non-unique field that refers to a target.
- Ip
Zero
Trust Infrastructure Access Target Ip - The IPv4/IPv6 address that identifies where to reach a target.
- Modified
At string - The date and time at which the target was last modified.
- Account
Id string - The account identifier to target for the resource.
- Created
At string - The date and time at which the target was created.
- Hostname string
- A non-unique field that refers to a target.
- Ip
Zero
Trust Infrastructure Access Target Ip Args - The IPv4/IPv6 address that identifies where to reach a target.
- Modified
At string - The date and time at which the target was last modified.
- account
Id String - The account identifier to target for the resource.
- created
At String - The date and time at which the target was created.
- hostname String
- A non-unique field that refers to a target.
- ip
Zero
Trust Infrastructure Access Target Ip - The IPv4/IPv6 address that identifies where to reach a target.
- modified
At String - The date and time at which the target was last modified.
- account
Id string - The account identifier to target for the resource.
- created
At string - The date and time at which the target was created.
- hostname string
- A non-unique field that refers to a target.
- ip
Zero
Trust Infrastructure Access Target Ip - The IPv4/IPv6 address that identifies where to reach a target.
- modified
At string - The date and time at which the target was last modified.
- account_
id str - The account identifier to target for the resource.
- created_
at str - The date and time at which the target was created.
- hostname str
- A non-unique field that refers to a target.
- ip
Zero
Trust Infrastructure Access Target Ip Args - The IPv4/IPv6 address that identifies where to reach a target.
- modified_
at str - The date and time at which the target was last modified.
- account
Id String - The account identifier to target for the resource.
- created
At String - The date and time at which the target was created.
- hostname String
- A non-unique field that refers to a target.
- ip Property Map
- The IPv4/IPv6 address that identifies where to reach a target.
- modified
At String - The date and time at which the target was last modified.
Supporting Types
ZeroTrustInfrastructureAccessTargetIp, ZeroTrustInfrastructureAccessTargetIpArgs
- Ipv4
Zero
Trust Infrastructure Access Target Ip Ipv4 - The target's IPv4 address.
- Ipv6
Zero
Trust Infrastructure Access Target Ip Ipv6 - The target's IPv6 address.
- Ipv4
Zero
Trust Infrastructure Access Target Ip Ipv4 - The target's IPv4 address.
- Ipv6
Zero
Trust Infrastructure Access Target Ip Ipv6 - The target's IPv6 address.
- ipv4
Zero
Trust Infrastructure Access Target Ip Ipv4 - The target's IPv4 address.
- ipv6
Zero
Trust Infrastructure Access Target Ip Ipv6 - The target's IPv6 address.
- ipv4
Zero
Trust Infrastructure Access Target Ip Ipv4 - The target's IPv4 address.
- ipv6
Zero
Trust Infrastructure Access Target Ip Ipv6 - The target's IPv6 address.
- ipv4
Zero
Trust Infrastructure Access Target Ip Ipv4 - The target's IPv4 address.
- ipv6
Zero
Trust Infrastructure Access Target Ip Ipv6 - The target's IPv6 address.
- ipv4 Property Map
- The target's IPv4 address.
- ipv6 Property Map
- The target's IPv6 address.
ZeroTrustInfrastructureAccessTargetIpIpv4, ZeroTrustInfrastructureAccessTargetIpIpv4Args
- Ip
Addr string - The IP address of the target.
- Virtual
Network stringId - The private virtual network identifier for the target.
- Ip
Addr string - The IP address of the target.
- Virtual
Network stringId - The private virtual network identifier for the target.
- ip
Addr String - The IP address of the target.
- virtual
Network StringId - The private virtual network identifier for the target.
- ip
Addr string - The IP address of the target.
- virtual
Network stringId - The private virtual network identifier for the target.
- ip_
addr str - The IP address of the target.
- virtual_
network_ strid - The private virtual network identifier for the target.
- ip
Addr String - The IP address of the target.
- virtual
Network StringId - The private virtual network identifier for the target.
ZeroTrustInfrastructureAccessTargetIpIpv6, ZeroTrustInfrastructureAccessTargetIpIpv6Args
- Ip
Addr string - The IP address of the target.
- Virtual
Network stringId - The private virtual network identifier for the target.
- Ip
Addr string - The IP address of the target.
- Virtual
Network stringId - The private virtual network identifier for the target.
- ip
Addr String - The IP address of the target.
- virtual
Network StringId - The private virtual network identifier for the target.
- ip
Addr string - The IP address of the target.
- virtual
Network stringId - The private virtual network identifier for the target.
- ip_
addr str - The IP address of the target.
- virtual_
network_ strid - The private virtual network identifier for the target.
- ip
Addr String - The IP address of the target.
- virtual
Network StringId - The private virtual network identifier for the target.
Import
$ pulumi import cloudflare:index/zeroTrustInfrastructureAccessTarget:ZeroTrustInfrastructureAccessTarget example <account_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.