com.pulumi.cloudflare.kotlin.TunnelVirtualNetworkArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.cloudflare.TunnelVirtualNetworkArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Provides a resource, that manages Cloudflare tunnel virtual networks
* for Zero Trust. Tunnel virtual networks are used for segregation of
* Tunnel IP Routes via Virtualized Networks to handle overlapping
* private IPs in your origins.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = new cloudflare.TunnelVirtualNetwork("example", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "vnet-for-documentation",
* comment: "New tunnel virtual network for documentation",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.TunnelVirtualNetwork("example",
* account_id="f037e56e89293a057740de681ac9abbe",
* name="vnet-for-documentation",
* comment="New tunnel virtual network for documentation")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = new Cloudflare.TunnelVirtualNetwork("example", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "vnet-for-documentation",
* Comment = "New tunnel virtual network for documentation",
* });
* });
* ```
* ```go
* 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.NewTunnelVirtualNetwork(ctx, "example", &cloudflare.TunnelVirtualNetworkArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Name: pulumi.String("vnet-for-documentation"),
* Comment: pulumi.String("New tunnel virtual network for documentation"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.TunnelVirtualNetwork;
* import com.pulumi.cloudflare.TunnelVirtualNetworkArgs;
* 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 TunnelVirtualNetwork("example", TunnelVirtualNetworkArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("vnet-for-documentation")
* .comment("New tunnel virtual network for documentation")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:TunnelVirtualNetwork
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* name: vnet-for-documentation
* comment: New tunnel virtual network for documentation
* ```
*
* ## Import
* ```sh
* $ pulumi import cloudflare:index/tunnelVirtualNetwork:TunnelVirtualNetwork example /
* ```
* @property accountId The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
* @property comment Description of the tunnel virtual network.
* @property isDefaultNetwork Whether this virtual network is the default one for the account. This means IP Routes belong to this virtual network and Teams Clients in the account route through this virtual network, unless specified otherwise for each case.
* @property name A user-friendly name chosen when the virtual network is created.
*/
public data class TunnelVirtualNetworkArgs(
public val accountId: Output? = null,
public val comment: Output? = null,
public val isDefaultNetwork: Output? = null,
public val name: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.TunnelVirtualNetworkArgs =
com.pulumi.cloudflare.TunnelVirtualNetworkArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.comment(comment?.applyValue({ args0 -> args0 }))
.isDefaultNetwork(isDefaultNetwork?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [TunnelVirtualNetworkArgs].
*/
@PulumiTagMarker
public class TunnelVirtualNetworkArgsBuilder internal constructor() {
private var accountId: Output? = null
private var comment: Output? = null
private var isDefaultNetwork: Output? = null
private var name: Output? = null
/**
* @param value The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("mxlqacgnqsmdxmmu")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value Description of the tunnel virtual network.
*/
@JvmName("eotwqjvaysxgrxmm")
public suspend fun comment(`value`: Output) {
this.comment = value
}
/**
* @param value Whether this virtual network is the default one for the account. This means IP Routes belong to this virtual network and Teams Clients in the account route through this virtual network, unless specified otherwise for each case.
*/
@JvmName("nmafrxiafetvllbj")
public suspend fun isDefaultNetwork(`value`: Output) {
this.isDefaultNetwork = value
}
/**
* @param value A user-friendly name chosen when the virtual network is created.
*/
@JvmName("crkgotppiffbdfjm")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("xlxaphtwccwgeeer")
public suspend fun accountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountId = mapped
}
/**
* @param value Description of the tunnel virtual network.
*/
@JvmName("taasooklwliatxbj")
public suspend fun comment(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.comment = mapped
}
/**
* @param value Whether this virtual network is the default one for the account. This means IP Routes belong to this virtual network and Teams Clients in the account route through this virtual network, unless specified otherwise for each case.
*/
@JvmName("njdgutdngergocga")
public suspend fun isDefaultNetwork(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.isDefaultNetwork = mapped
}
/**
* @param value A user-friendly name chosen when the virtual network is created.
*/
@JvmName("ujnivyuarumcwpio")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
internal fun build(): TunnelVirtualNetworkArgs = TunnelVirtualNetworkArgs(
accountId = accountId,
comment = comment,
isDefaultNetwork = isDefaultNetwork,
name = name,
)
}