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

com.pulumi.cloudflare.kotlin.MagicWanGreTunnelArgs.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.MagicWanGreTunnelArgs.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Provides a resource, that manages GRE tunnels for Magic Transit.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.MagicWanGreTunnel("example", {
 *     accountId: "f037e56e89293a057740de681ac9abbe",
 *     name: "GRE_1",
 *     customerGreEndpoint: "203.0.113.1",
 *     cloudflareGreEndpoint: "203.0.113.2",
 *     interfaceAddress: "192.0.2.0/31",
 *     description: "Tunnel for ISP X",
 *     ttl: 64,
 *     mtu: 1476,
 *     healthCheckEnabled: true,
 *     healthCheckTarget: "203.0.113.1",
 *     healthCheckType: "reply",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.MagicWanGreTunnel("example",
 *     account_id="f037e56e89293a057740de681ac9abbe",
 *     name="GRE_1",
 *     customer_gre_endpoint="203.0.113.1",
 *     cloudflare_gre_endpoint="203.0.113.2",
 *     interface_address="192.0.2.0/31",
 *     description="Tunnel for ISP X",
 *     ttl=64,
 *     mtu=1476,
 *     health_check_enabled=True,
 *     health_check_target="203.0.113.1",
 *     health_check_type="reply")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.MagicWanGreTunnel("example", new()
 *     {
 *         AccountId = "f037e56e89293a057740de681ac9abbe",
 *         Name = "GRE_1",
 *         CustomerGreEndpoint = "203.0.113.1",
 *         CloudflareGreEndpoint = "203.0.113.2",
 *         InterfaceAddress = "192.0.2.0/31",
 *         Description = "Tunnel for ISP X",
 *         Ttl = 64,
 *         Mtu = 1476,
 *         HealthCheckEnabled = true,
 *         HealthCheckTarget = "203.0.113.1",
 *         HealthCheckType = "reply",
 *     });
 * });
 * ```
 * ```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.NewMagicWanGreTunnel(ctx, "example", &cloudflare.MagicWanGreTunnelArgs{
 * 			AccountId:             pulumi.String("f037e56e89293a057740de681ac9abbe"),
 * 			Name:                  pulumi.String("GRE_1"),
 * 			CustomerGreEndpoint:   pulumi.String("203.0.113.1"),
 * 			CloudflareGreEndpoint: pulumi.String("203.0.113.2"),
 * 			InterfaceAddress:      pulumi.String("192.0.2.0/31"),
 * 			Description:           pulumi.String("Tunnel for ISP X"),
 * 			Ttl:                   pulumi.Int(64),
 * 			Mtu:                   pulumi.Int(1476),
 * 			HealthCheckEnabled:    pulumi.Bool(true),
 * 			HealthCheckTarget:     pulumi.String("203.0.113.1"),
 * 			HealthCheckType:       pulumi.String("reply"),
 * 		})
 * 		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.MagicWanGreTunnel;
 * import com.pulumi.cloudflare.MagicWanGreTunnelArgs;
 * 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 MagicWanGreTunnel("example", MagicWanGreTunnelArgs.builder()
 *             .accountId("f037e56e89293a057740de681ac9abbe")
 *             .name("GRE_1")
 *             .customerGreEndpoint("203.0.113.1")
 *             .cloudflareGreEndpoint("203.0.113.2")
 *             .interfaceAddress("192.0.2.0/31")
 *             .description("Tunnel for ISP X")
 *             .ttl(64)
 *             .mtu(1476)
 *             .healthCheckEnabled(true)
 *             .healthCheckTarget("203.0.113.1")
 *             .healthCheckType("reply")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:MagicWanGreTunnel
 *     properties:
 *       accountId: f037e56e89293a057740de681ac9abbe
 *       name: GRE_1
 *       customerGreEndpoint: 203.0.113.1
 *       cloudflareGreEndpoint: 203.0.113.2
 *       interfaceAddress: 192.0.2.0/31
 *       description: Tunnel for ISP X
 *       ttl: 64
 *       mtu: 1476
 *       healthCheckEnabled: true
 *       healthCheckTarget: 203.0.113.1
 *       healthCheckType: reply
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/magicWanGreTunnel:MagicWanGreTunnel example /
 * ```
 * @property accountId The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
 * @property cloudflareGreEndpoint The IP address assigned to the Cloudflare side of the GRE tunnel.
 * @property customerGreEndpoint The IP address assigned to the customer side of the GRE tunnel.
 * @property description Description of the GRE tunnel intent.
 * @property healthCheckEnabled Specifies if ICMP tunnel health checks are enabled.
 * @property healthCheckTarget The IP address of the customer endpoint that will receive tunnel health checks.
 * @property healthCheckType Specifies the ICMP echo type for the health check. Available values: `request`, `reply`.
 * @property interfaceAddress 31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
 * @property mtu Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
 * @property name Name of the GRE tunnel.
 * @property ttl Time To Live (TTL) in number of hops of the GRE tunnel.
 */
public data class MagicWanGreTunnelArgs(
    public val accountId: Output? = null,
    public val cloudflareGreEndpoint: Output? = null,
    public val customerGreEndpoint: Output? = null,
    public val description: Output? = null,
    public val healthCheckEnabled: Output? = null,
    public val healthCheckTarget: Output? = null,
    public val healthCheckType: Output? = null,
    public val interfaceAddress: Output? = null,
    public val mtu: Output? = null,
    public val name: Output? = null,
    public val ttl: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.MagicWanGreTunnelArgs =
        com.pulumi.cloudflare.MagicWanGreTunnelArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .cloudflareGreEndpoint(cloudflareGreEndpoint?.applyValue({ args0 -> args0 }))
            .customerGreEndpoint(customerGreEndpoint?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .healthCheckEnabled(healthCheckEnabled?.applyValue({ args0 -> args0 }))
            .healthCheckTarget(healthCheckTarget?.applyValue({ args0 -> args0 }))
            .healthCheckType(healthCheckType?.applyValue({ args0 -> args0 }))
            .interfaceAddress(interfaceAddress?.applyValue({ args0 -> args0 }))
            .mtu(mtu?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .ttl(ttl?.applyValue({ args0 -> args0 })).build()
}

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

    private var cloudflareGreEndpoint: Output? = null

    private var customerGreEndpoint: Output? = null

    private var description: Output? = null

    private var healthCheckEnabled: Output? = null

    private var healthCheckTarget: Output? = null

    private var healthCheckType: Output? = null

    private var interfaceAddress: Output? = null

    private var mtu: Output? = null

    private var name: Output? = null

    private var ttl: Output? = null

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

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

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

    /**
     * @param value Description of the GRE tunnel intent.
     */
    @JvmName("wbvjnpttsdbokwyj")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

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

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

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

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

    /**
     * @param value Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
     */
    @JvmName("rggoogcvytjncdqs")
    public suspend fun mtu(`value`: Output) {
        this.mtu = value
    }

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

    /**
     * @param value Time To Live (TTL) in number of hops of the GRE tunnel.
     */
    @JvmName("ksbfykpcwmslmdff")
    public suspend fun ttl(`value`: Output) {
        this.ttl = value
    }

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

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

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

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

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

    /**
     * @param value The IP address of the customer endpoint that will receive tunnel health checks.
     */
    @JvmName("ekxcwixbjmiulwqa")
    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. Available values: `request`, `reply`.
     */
    @JvmName("kflswgfalkrmujbc")
    public suspend fun healthCheckType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthCheckType = mapped
    }

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

    /**
     * @param value Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
     */
    @JvmName("opmbknbubgunxvnf")
    public suspend fun mtu(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mtu = mapped
    }

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

    /**
     * @param value Time To Live (TTL) in number of hops of the GRE tunnel.
     */
    @JvmName("dbibnqvgaclyiewu")
    public suspend fun ttl(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ttl = mapped
    }

    internal fun build(): MagicWanGreTunnelArgs = MagicWanGreTunnelArgs(
        accountId = accountId,
        cloudflareGreEndpoint = cloudflareGreEndpoint,
        customerGreEndpoint = customerGreEndpoint,
        description = description,
        healthCheckEnabled = healthCheckEnabled,
        healthCheckTarget = healthCheckTarget,
        healthCheckType = healthCheckType,
        interfaceAddress = interfaceAddress,
        mtu = mtu,
        name = name,
        ttl = ttl,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy