![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.cloudflare.kotlin.ZeroTrustTunnelRoute.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.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [ZeroTrustTunnelRoute].
*/
@PulumiTagMarker
public class ZeroTrustTunnelRouteResourceBuilder internal constructor() {
public var name: String? = null
public var args: ZeroTrustTunnelRouteArgs = ZeroTrustTunnelRouteArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend ZeroTrustTunnelRouteArgsBuilder.() -> Unit) {
val builder = ZeroTrustTunnelRouteArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): ZeroTrustTunnelRoute {
val builtJavaResource = com.pulumi.cloudflare.ZeroTrustTunnelRoute(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ZeroTrustTunnelRoute(builtJavaResource)
}
}
/**
* Provides a resource, that manages Cloudflare tunnel routes for Zero
* Trust. Tunnel routes are used to direct IP traffic through
* Cloudflare Tunnels.
* ## Import
* ```sh
* $ pulumi import cloudflare:index/zeroTrustTunnelRoute:ZeroTrustTunnelRoute example //
* ```
*/
public class ZeroTrustTunnelRoute internal constructor(
override val javaResource: com.pulumi.cloudflare.ZeroTrustTunnelRoute,
) : KotlinCustomResource(javaResource, ZeroTrustTunnelRouteMapper) {
/**
* The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
public val accountId: Output
get() = javaResource.accountId().applyValue({ args0 -> args0 })
/**
* Description of the tunnel route.
*/
public val comment: Output?
get() = javaResource.comment().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
*/
public val network: Output
get() = javaResource.network().applyValue({ args0 -> args0 })
/**
* The ID of the tunnel that will service the tunnel route.
*/
public val tunnelId: Output
get() = javaResource.tunnelId().applyValue({ args0 -> args0 })
/**
* The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. **Modifying this attribute will force creation of a new resource.**
*/
public val virtualNetworkId: Output?
get() = javaResource.virtualNetworkId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object ZeroTrustTunnelRouteMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.cloudflare.ZeroTrustTunnelRoute::class == javaResource::class
override fun map(javaResource: Resource): ZeroTrustTunnelRoute = ZeroTrustTunnelRoute(
javaResource
as com.pulumi.cloudflare.ZeroTrustTunnelRoute,
)
}
/**
* @see [ZeroTrustTunnelRoute].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ZeroTrustTunnelRoute].
*/
public suspend fun zeroTrustTunnelRoute(
name: String,
block: suspend ZeroTrustTunnelRouteResourceBuilder.() -> Unit,
): ZeroTrustTunnelRoute {
val builder = ZeroTrustTunnelRouteResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ZeroTrustTunnelRoute].
* @param name The _unique_ name of the resulting resource.
*/
public fun zeroTrustTunnelRoute(name: String): ZeroTrustTunnelRoute {
val builder = ZeroTrustTunnelRouteResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy