All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.cloudflare.kotlin.IpsecTunnelArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin

import com.pulumi.cloudflare.IpsecTunnelArgs.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 IPsec tunnels for Magic Transit.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.IpsecTunnel("example", {
 *     accountId: "f037e56e89293a057740de681ac9abbe",
 *     name: "IPsec_1",
 *     customerEndpoint: "203.0.113.1",
 *     cloudflareEndpoint: "203.0.113.1",
 *     interfaceAddress: "192.0.2.0/31",
 *     description: "Tunnel for ISP X",
 *     healthCheckEnabled: true,
 *     healthCheckTarget: "203.0.113.1",
 *     healthCheckType: "reply",
 *     psk: "asdf12341234",
 *     allowNullCipher: false,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.IpsecTunnel("example",
 *     account_id="f037e56e89293a057740de681ac9abbe",
 *     name="IPsec_1",
 *     customer_endpoint="203.0.113.1",
 *     cloudflare_endpoint="203.0.113.1",
 *     interface_address="192.0.2.0/31",
 *     description="Tunnel for ISP X",
 *     health_check_enabled=True,
 *     health_check_target="203.0.113.1",
 *     health_check_type="reply",
 *     psk="asdf12341234",
 *     allow_null_cipher=False)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.IpsecTunnel("example", new()
 *     {
 *         AccountId = "f037e56e89293a057740de681ac9abbe",
 *         Name = "IPsec_1",
 *         CustomerEndpoint = "203.0.113.1",
 *         CloudflareEndpoint = "203.0.113.1",
 *         InterfaceAddress = "192.0.2.0/31",
 *         Description = "Tunnel for ISP X",
 *         HealthCheckEnabled = true,
 *         HealthCheckTarget = "203.0.113.1",
 *         HealthCheckType = "reply",
 *         Psk = "asdf12341234",
 *         AllowNullCipher = false,
 *     });
 * });
 * ```
 * ```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.NewIpsecTunnel(ctx, "example", &cloudflare.IpsecTunnelArgs{
 * 			AccountId:          pulumi.String("f037e56e89293a057740de681ac9abbe"),
 * 			Name:               pulumi.String("IPsec_1"),
 * 			CustomerEndpoint:   pulumi.String("203.0.113.1"),
 * 			CloudflareEndpoint: pulumi.String("203.0.113.1"),
 * 			InterfaceAddress:   pulumi.String("192.0.2.0/31"),
 * 			Description:        pulumi.String("Tunnel for ISP X"),
 * 			HealthCheckEnabled: pulumi.Bool(true),
 * 			HealthCheckTarget:  pulumi.String("203.0.113.1"),
 * 			HealthCheckType:    pulumi.String("reply"),
 * 			Psk:                pulumi.String("asdf12341234"),
 * 			AllowNullCipher:    pulumi.Bool(false),
 * 		})
 * 		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.IpsecTunnel;
 * import com.pulumi.cloudflare.IpsecTunnelArgs;
 * 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 IpsecTunnel("example", IpsecTunnelArgs.builder()
 *             .accountId("f037e56e89293a057740de681ac9abbe")
 *             .name("IPsec_1")
 *             .customerEndpoint("203.0.113.1")
 *             .cloudflareEndpoint("203.0.113.1")
 *             .interfaceAddress("192.0.2.0/31")
 *             .description("Tunnel for ISP X")
 *             .healthCheckEnabled(true)
 *             .healthCheckTarget("203.0.113.1")
 *             .healthCheckType("reply")
 *             .psk("asdf12341234")
 *             .allowNullCipher(false)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:IpsecTunnel
 *     properties:
 *       accountId: f037e56e89293a057740de681ac9abbe
 *       name: IPsec_1
 *       customerEndpoint: 203.0.113.1
 *       cloudflareEndpoint: 203.0.113.1
 *       interfaceAddress: 192.0.2.0/31
 *       description: Tunnel for ISP X
 *       healthCheckEnabled: true
 *       healthCheckTarget: 203.0.113.1
 *       healthCheckType: reply
 *       psk: asdf12341234
 *       allowNullCipher: false
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/ipsecTunnel:IpsecTunnel example /
 * ```
 * @property accountId The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
 * @property allowNullCipher Specifies if this tunnel may use a null cipher (ENCR_NULL) in Phase 2. Defaults to `false`.
 * @property cloudflareEndpoint IP address assigned to the Cloudflare side of the IPsec tunnel.
 * @property customerEndpoint IP address assigned to the customer side of the IPsec tunnel.
 * @property description An optional description of the IPsec tunnel.
 * @property fqdnId `remote_id` in the form of a fqdn. This value is generated by cloudflare.
 * @property healthCheckDirection Specifies the direction for the health check. Available values: `unidirectional`, `bidirectional` Default: `unidirectional`.
 * @property healthCheckEnabled Specifies if ICMP tunnel health checks are enabled. Default: `true`.
 * @property healthCheckRate Specifies the ICMP rate for the health check. Available values: `low`, `mid`, `high` Default: `mid`.
 * @property healthCheckTarget The IP address of the customer endpoint that will receive tunnel health checks. Default: ``.
 * @property healthCheckType Specifies the ICMP echo type for the health check (`request` or `reply`). Available values: `request`, `reply` Default: `reply`.
 * @property hexId `remote_id` as a hex string. This value is generated by cloudflare.
 * @property interfaceAddress 31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
 * @property name Name of the IPsec tunnel.
 * @property psk Pre shared key to be used with the IPsec tunnel. If left unset, it will be autogenerated.
 * @property remoteId ID to be used while setting up the IPsec tunnel. This value is generated by cloudflare.
 * @property replayProtection Specifies if replay protection is enabled. Defaults to `false`.
 * @property userId `remote_id` in the form of an email address. This value is generated by cloudflare.
 */
public data class IpsecTunnelArgs(
    public val accountId: Output? = null,
    public val allowNullCipher: Output? = null,
    public val cloudflareEndpoint: Output? = null,
    public val customerEndpoint: Output? = null,
    public val description: Output? = null,
    public val fqdnId: Output? = null,
    public val healthCheckDirection: Output? = null,
    public val healthCheckEnabled: Output? = null,
    public val healthCheckRate: Output? = null,
    public val healthCheckTarget: Output? = null,
    public val healthCheckType: Output? = null,
    public val hexId: Output? = null,
    public val interfaceAddress: Output? = null,
    public val name: Output? = null,
    public val psk: Output? = null,
    public val remoteId: Output? = null,
    public val replayProtection: Output? = null,
    public val userId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.IpsecTunnelArgs =
        com.pulumi.cloudflare.IpsecTunnelArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .allowNullCipher(allowNullCipher?.applyValue({ args0 -> args0 }))
            .cloudflareEndpoint(cloudflareEndpoint?.applyValue({ args0 -> args0 }))
            .customerEndpoint(customerEndpoint?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .fqdnId(fqdnId?.applyValue({ args0 -> args0 }))
            .healthCheckDirection(healthCheckDirection?.applyValue({ args0 -> args0 }))
            .healthCheckEnabled(healthCheckEnabled?.applyValue({ args0 -> args0 }))
            .healthCheckRate(healthCheckRate?.applyValue({ args0 -> args0 }))
            .healthCheckTarget(healthCheckTarget?.applyValue({ args0 -> args0 }))
            .healthCheckType(healthCheckType?.applyValue({ args0 -> args0 }))
            .hexId(hexId?.applyValue({ args0 -> args0 }))
            .interfaceAddress(interfaceAddress?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .psk(psk?.applyValue({ args0 -> args0 }))
            .remoteId(remoteId?.applyValue({ args0 -> args0 }))
            .replayProtection(replayProtection?.applyValue({ args0 -> args0 }))
            .userId(userId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [IpsecTunnelArgs].
 */
@PulumiTagMarker
public class IpsecTunnelArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var allowNullCipher: Output? = null

    private var cloudflareEndpoint: Output? = null

    private var customerEndpoint: Output? = null

    private var description: Output? = null

    private var fqdnId: Output? = null

    private var healthCheckDirection: Output? = null

    private var healthCheckEnabled: Output? = null

    private var healthCheckRate: Output? = null

    private var healthCheckTarget: Output? = null

    private var healthCheckType: Output? = null

    private var hexId: Output? = null

    private var interfaceAddress: Output? = null

    private var name: Output? = null

    private var psk: Output? = null

    private var remoteId: Output? = null

    private var replayProtection: Output? = null

    private var userId: Output? = null

    /**
     * @param value The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("vnafttxcawntyucu")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

    /**
     * @param value Specifies if this tunnel may use a null cipher (ENCR_NULL) in Phase 2. Defaults to `false`.
     */
    @JvmName("thiupiumigcfblna")
    public suspend fun allowNullCipher(`value`: Output) {
        this.allowNullCipher = value
    }

    /**
     * @param value IP address assigned to the Cloudflare side of the IPsec tunnel.
     */
    @JvmName("mvmewemgkvdsjxpg")
    public suspend fun cloudflareEndpoint(`value`: Output) {
        this.cloudflareEndpoint = value
    }

    /**
     * @param value IP address assigned to the customer side of the IPsec tunnel.
     */
    @JvmName("efphegurfpvuneog")
    public suspend fun customerEndpoint(`value`: Output) {
        this.customerEndpoint = value
    }

    /**
     * @param value An optional description of the IPsec tunnel.
     */
    @JvmName("iaasdimnofxjllyn")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value `remote_id` in the form of a fqdn. This value is generated by cloudflare.
     */
    @JvmName("ajlpihvabksaxovb")
    public suspend fun fqdnId(`value`: Output) {
        this.fqdnId = value
    }

    /**
     * @param value Specifies the direction for the health check. Available values: `unidirectional`, `bidirectional` Default: `unidirectional`.
     */
    @JvmName("hsldwdfgdgobcolt")
    public suspend fun healthCheckDirection(`value`: Output) {
        this.healthCheckDirection = value
    }

    /**
     * @param value Specifies if ICMP tunnel health checks are enabled. Default: `true`.
     */
    @JvmName("tqqfuawyxmrbplmt")
    public suspend fun healthCheckEnabled(`value`: Output) {
        this.healthCheckEnabled = value
    }

    /**
     * @param value Specifies the ICMP rate for the health check. Available values: `low`, `mid`, `high` Default: `mid`.
     */
    @JvmName("bnjjpjrrsahsigxo")
    public suspend fun healthCheckRate(`value`: Output) {
        this.healthCheckRate = value
    }

    /**
     * @param value The IP address of the customer endpoint that will receive tunnel health checks. Default: ``.
     */
    @JvmName("wdlnbocrswkoaest")
    public suspend fun healthCheckTarget(`value`: Output) {
        this.healthCheckTarget = value
    }

    /**
     * @param value Specifies the ICMP echo type for the health check (`request` or `reply`). Available values: `request`, `reply` Default: `reply`.
     */
    @JvmName("kuhttafkqkkpobcu")
    public suspend fun healthCheckType(`value`: Output) {
        this.healthCheckType = value
    }

    /**
     * @param value `remote_id` as a hex string. This value is generated by cloudflare.
     */
    @JvmName("ybgvfaieqfwccqeq")
    public suspend fun hexId(`value`: Output) {
        this.hexId = value
    }

    /**
     * @param value 31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
     */
    @JvmName("gqvvouwonlrrebxh")
    public suspend fun interfaceAddress(`value`: Output) {
        this.interfaceAddress = value
    }

    /**
     * @param value Name of the IPsec tunnel.
     */
    @JvmName("abqfeldunjbersda")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Pre shared key to be used with the IPsec tunnel. If left unset, it will be autogenerated.
     */
    @JvmName("kyhabqimogfuxdph")
    public suspend fun psk(`value`: Output) {
        this.psk = value
    }

    /**
     * @param value ID to be used while setting up the IPsec tunnel. This value is generated by cloudflare.
     */
    @JvmName("kjtxasohremtrjxq")
    public suspend fun remoteId(`value`: Output) {
        this.remoteId = value
    }

    /**
     * @param value Specifies if replay protection is enabled. Defaults to `false`.
     */
    @JvmName("pdcbejylyfwphqyn")
    public suspend fun replayProtection(`value`: Output) {
        this.replayProtection = value
    }

    /**
     * @param value `remote_id` in the form of an email address. This value is generated by cloudflare.
     */
    @JvmName("idpjwcsthegavgra")
    public suspend fun userId(`value`: Output) {
        this.userId = value
    }

    /**
     * @param value The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("etqbfopxoacfgmcn")
    public suspend fun accountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountId = mapped
    }

    /**
     * @param value Specifies if this tunnel may use a null cipher (ENCR_NULL) in Phase 2. Defaults to `false`.
     */
    @JvmName("wsgxescvwugfddlf")
    public suspend fun allowNullCipher(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowNullCipher = mapped
    }

    /**
     * @param value IP address assigned to the Cloudflare side of the IPsec tunnel.
     */
    @JvmName("xlqrnamadwqqsesa")
    public suspend fun cloudflareEndpoint(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cloudflareEndpoint = mapped
    }

    /**
     * @param value IP address assigned to the customer side of the IPsec tunnel.
     */
    @JvmName("dhjtxoqpetfeinei")
    public suspend fun customerEndpoint(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customerEndpoint = mapped
    }

    /**
     * @param value An optional description of the IPsec tunnel.
     */
    @JvmName("hdcpswlanfuorueu")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value `remote_id` in the form of a fqdn. This value is generated by cloudflare.
     */
    @JvmName("xdytyvjexblfdruo")
    public suspend fun fqdnId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fqdnId = mapped
    }

    /**
     * @param value Specifies the direction for the health check. Available values: `unidirectional`, `bidirectional` Default: `unidirectional`.
     */
    @JvmName("sqxievmshiwyebav")
    public suspend fun healthCheckDirection(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthCheckDirection = mapped
    }

    /**
     * @param value Specifies if ICMP tunnel health checks are enabled. Default: `true`.
     */
    @JvmName("rhanidcqthuwbwmn")
    public suspend fun healthCheckEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthCheckEnabled = mapped
    }

    /**
     * @param value Specifies the ICMP rate for the health check. Available values: `low`, `mid`, `high` Default: `mid`.
     */
    @JvmName("ttlefoiwcdohlvfd")
    public suspend fun healthCheckRate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthCheckRate = mapped
    }

    /**
     * @param value The IP address of the customer endpoint that will receive tunnel health checks. Default: ``.
     */
    @JvmName("viqacmqeemhlhqws")
    public suspend fun healthCheckTarget(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthCheckTarget = mapped
    }

    /**
     * @param value Specifies the ICMP echo type for the health check (`request` or `reply`). Available values: `request`, `reply` Default: `reply`.
     */
    @JvmName("jgbgreaklbmxukpj")
    public suspend fun healthCheckType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthCheckType = mapped
    }

    /**
     * @param value `remote_id` as a hex string. This value is generated by cloudflare.
     */
    @JvmName("tetqrffyiwuutcwf")
    public suspend fun hexId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hexId = mapped
    }

    /**
     * @param value 31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
     */
    @JvmName("ahfdoevkyarxatgx")
    public suspend fun interfaceAddress(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.interfaceAddress = mapped
    }

    /**
     * @param value Name of the IPsec tunnel.
     */
    @JvmName("rsmahcopvjjcfwkx")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Pre shared key to be used with the IPsec tunnel. If left unset, it will be autogenerated.
     */
    @JvmName("emocrdooknierhsa")
    public suspend fun psk(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.psk = mapped
    }

    /**
     * @param value ID to be used while setting up the IPsec tunnel. This value is generated by cloudflare.
     */
    @JvmName("iluiejborsvvxvlp")
    public suspend fun remoteId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.remoteId = mapped
    }

    /**
     * @param value Specifies if replay protection is enabled. Defaults to `false`.
     */
    @JvmName("aodibdotecpsqjwg")
    public suspend fun replayProtection(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replayProtection = mapped
    }

    /**
     * @param value `remote_id` in the form of an email address. This value is generated by cloudflare.
     */
    @JvmName("qcnpmfpdkfnugnfb")
    public suspend fun userId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userId = mapped
    }

    internal fun build(): IpsecTunnelArgs = IpsecTunnelArgs(
        accountId = accountId,
        allowNullCipher = allowNullCipher,
        cloudflareEndpoint = cloudflareEndpoint,
        customerEndpoint = customerEndpoint,
        description = description,
        fqdnId = fqdnId,
        healthCheckDirection = healthCheckDirection,
        healthCheckEnabled = healthCheckEnabled,
        healthCheckRate = healthCheckRate,
        healthCheckTarget = healthCheckTarget,
        healthCheckType = healthCheckType,
        hexId = hexId,
        interfaceAddress = interfaceAddress,
        name = name,
        psk = psk,
        remoteId = remoteId,
        replayProtection = replayProtection,
        userId = userId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy