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

com.pulumi.gcp.iap.kotlin.TunnelDestGroupArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.iap.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.iap.TunnelDestGroupArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Tunnel destination groups represent resources that have the same tunnel access restrictions.
 * To get more information about TunnelDestGroup, see:
 * * [API documentation](https://cloud.google.com/iap/docs/reference/rest/v1/projects.iap_tunnel.locations.destGroups)
 * * How-to Guides
 *     * [Set up IAP TCP forwarding with an IP address or hostname in a Google Cloud or non-Google Cloud environment](https://cloud.google.com/iap/docs/tcp-by-host)
 * ## Example Usage
 * ### Iap Destgroup
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const destGroup = new gcp.iap.TunnelDestGroup("dest_group", {
 *     region: "us-central1",
 *     groupName: "testgroup_2605",
 *     cidrs: [
 *         "10.1.0.0/16",
 *         "192.168.10.0/24",
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * dest_group = gcp.iap.TunnelDestGroup("dest_group",
 *     region="us-central1",
 *     group_name="testgroup_2605",
 *     cidrs=[
 *         "10.1.0.0/16",
 *         "192.168.10.0/24",
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var destGroup = new Gcp.Iap.TunnelDestGroup("dest_group", new()
 *     {
 *         Region = "us-central1",
 *         GroupName = "testgroup_2605",
 *         Cidrs = new[]
 *         {
 *             "10.1.0.0/16",
 *             "192.168.10.0/24",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/iap"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := iap.NewTunnelDestGroup(ctx, "dest_group", &iap.TunnelDestGroupArgs{
 * 			Region:    pulumi.String("us-central1"),
 * 			GroupName: pulumi.String("testgroup_2605"),
 * 			Cidrs: pulumi.StringArray{
 * 				pulumi.String("10.1.0.0/16"),
 * 				pulumi.String("192.168.10.0/24"),
 * 			},
 * 		})
 * 		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.gcp.iap.TunnelDestGroup;
 * import com.pulumi.gcp.iap.TunnelDestGroupArgs;
 * 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 destGroup = new TunnelDestGroup("destGroup", TunnelDestGroupArgs.builder()
 *             .region("us-central1")
 *             .groupName("testgroup_2605")
 *             .cidrs(
 *                 "10.1.0.0/16",
 *                 "192.168.10.0/24")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   destGroup:
 *     type: gcp:iap:TunnelDestGroup
 *     name: dest_group
 *     properties:
 *       region: us-central1
 *       groupName: testgroup_2605
 *       cidrs:
 *         - 10.1.0.0/16
 *         - 192.168.10.0/24
 * ```
 * 
 * ## Import
 * TunnelDestGroup can be imported using any of these accepted formats:
 * * `projects/{{project}}/iap_tunnel/locations/{{region}}/destGroups/{{group_name}}`
 * * `{{project}}/iap_tunnel/locations/{{region}}/destGroups/{{group_name}}`
 * * `{{project}}/{{region}}/{{group_name}}`
 * * `{{region}}/destGroups/{{group_name}}`
 * * `{{region}}/{{group_name}}`
 * * `{{group_name}}`
 * When using the `pulumi import` command, TunnelDestGroup can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:iap/tunnelDestGroup:TunnelDestGroup default projects/{{project}}/iap_tunnel/locations/{{region}}/destGroups/{{group_name}}
 * ```
 * ```sh
 * $ pulumi import gcp:iap/tunnelDestGroup:TunnelDestGroup default {{project}}/iap_tunnel/locations/{{region}}/destGroups/{{group_name}}
 * ```
 * ```sh
 * $ pulumi import gcp:iap/tunnelDestGroup:TunnelDestGroup default {{project}}/{{region}}/{{group_name}}
 * ```
 * ```sh
 * $ pulumi import gcp:iap/tunnelDestGroup:TunnelDestGroup default {{region}}/destGroups/{{group_name}}
 * ```
 * ```sh
 * $ pulumi import gcp:iap/tunnelDestGroup:TunnelDestGroup default {{region}}/{{group_name}}
 * ```
 * ```sh
 * $ pulumi import gcp:iap/tunnelDestGroup:TunnelDestGroup default {{group_name}}
 * ```
 * @property cidrs List of CIDRs that this group applies to.
 * @property fqdns List of FQDNs that this group applies to.
 * @property groupName Unique tunnel destination group name.
 * - - -
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property region The region of the tunnel group. Must be the same as the network resources in the group.
 */
public data class TunnelDestGroupArgs(
    public val cidrs: Output>? = null,
    public val fqdns: Output>? = null,
    public val groupName: Output? = null,
    public val project: Output? = null,
    public val region: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.iap.TunnelDestGroupArgs =
        com.pulumi.gcp.iap.TunnelDestGroupArgs.builder()
            .cidrs(cidrs?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .fqdns(fqdns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .groupName(groupName?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .region(region?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TunnelDestGroupArgs].
 */
@PulumiTagMarker
public class TunnelDestGroupArgsBuilder internal constructor() {
    private var cidrs: Output>? = null

    private var fqdns: Output>? = null

    private var groupName: Output? = null

    private var project: Output? = null

    private var region: Output? = null

    /**
     * @param value List of CIDRs that this group applies to.
     */
    @JvmName("cgotyijrhsvgoyst")
    public suspend fun cidrs(`value`: Output>) {
        this.cidrs = value
    }

    @JvmName("ufuwbhjhfuaxsocp")
    public suspend fun cidrs(vararg values: Output) {
        this.cidrs = Output.all(values.asList())
    }

    /**
     * @param values List of CIDRs that this group applies to.
     */
    @JvmName("xofjqyqsqyhjiqxs")
    public suspend fun cidrs(values: List>) {
        this.cidrs = Output.all(values)
    }

    /**
     * @param value List of FQDNs that this group applies to.
     */
    @JvmName("ccfcsxpwywcrngmp")
    public suspend fun fqdns(`value`: Output>) {
        this.fqdns = value
    }

    @JvmName("mgfwjimxlwudvrpk")
    public suspend fun fqdns(vararg values: Output) {
        this.fqdns = Output.all(values.asList())
    }

    /**
     * @param values List of FQDNs that this group applies to.
     */
    @JvmName("lqlmdsheropvxaon")
    public suspend fun fqdns(values: List>) {
        this.fqdns = Output.all(values)
    }

    /**
     * @param value Unique tunnel destination group name.
     * - - -
     */
    @JvmName("vayedoarrusjwnar")
    public suspend fun groupName(`value`: Output) {
        this.groupName = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("werfssewamdwqkcj")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The region of the tunnel group. Must be the same as the network resources in the group.
     */
    @JvmName("petvrgmonpxpdkcl")
    public suspend fun region(`value`: Output) {
        this.region = value
    }

    /**
     * @param value List of CIDRs that this group applies to.
     */
    @JvmName("yafxviokeprsjyfs")
    public suspend fun cidrs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cidrs = mapped
    }

    /**
     * @param values List of CIDRs that this group applies to.
     */
    @JvmName("uwddxxsqvjrgcpqr")
    public suspend fun cidrs(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.cidrs = mapped
    }

    /**
     * @param value List of FQDNs that this group applies to.
     */
    @JvmName("ndrrijyshuxpufjf")
    public suspend fun fqdns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fqdns = mapped
    }

    /**
     * @param values List of FQDNs that this group applies to.
     */
    @JvmName("ruhlgbecehlbnfxu")
    public suspend fun fqdns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.fqdns = mapped
    }

    /**
     * @param value Unique tunnel destination group name.
     * - - -
     */
    @JvmName("atsvxtvbwqptksew")
    public suspend fun groupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groupName = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("xjxxoxqykgvqnblb")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value The region of the tunnel group. Must be the same as the network resources in the group.
     */
    @JvmName("fqqvvspgustvqjvj")
    public suspend fun region(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.region = mapped
    }

    internal fun build(): TunnelDestGroupArgs = TunnelDestGroupArgs(
        cidrs = cidrs,
        fqdns = fqdns,
        groupName = groupName,
        project = project,
        region = region,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy