1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. iap
  5. TunnelDestGroup
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.iap.TunnelDestGroup

Explore with Pulumi AI

Tunnel destination groups represent resources that have the same tunnel access restrictions.

To get more information about TunnelDestGroup, see:

Example Usage

Iap Destgroup

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_79169",
    cidrs: [
        "10.1.0.0/16",
        "192.168.10.0/24",
    ],
});
Copy
import pulumi
import pulumi_gcp as gcp

dest_group = gcp.iap.TunnelDestGroup("dest_group",
    region="us-central1",
    group_name="testgroup_79169",
    cidrs=[
        "10.1.0.0/16",
        "192.168.10.0/24",
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/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_79169"),
			Cidrs: pulumi.StringArray{
				pulumi.String("10.1.0.0/16"),
				pulumi.String("192.168.10.0/24"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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_79169",
        Cidrs = new[]
        {
            "10.1.0.0/16",
            "192.168.10.0/24",
        },
    });

});
Copy
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_79169")
            .cidrs(            
                "10.1.0.0/16",
                "192.168.10.0/24")
            .build());

    }
}
Copy
resources:
  destGroup:
    type: gcp:iap:TunnelDestGroup
    name: dest_group
    properties:
      region: us-central1
      groupName: testgroup_79169
      cidrs:
        - 10.1.0.0/16
        - 192.168.10.0/24
Copy

Create TunnelDestGroup Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new TunnelDestGroup(name: string, args: TunnelDestGroupArgs, opts?: CustomResourceOptions);
@overload
def TunnelDestGroup(resource_name: str,
                    args: TunnelDestGroupArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def TunnelDestGroup(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    group_name: Optional[str] = None,
                    cidrs: Optional[Sequence[str]] = None,
                    fqdns: Optional[Sequence[str]] = None,
                    project: Optional[str] = None,
                    region: Optional[str] = None)
func NewTunnelDestGroup(ctx *Context, name string, args TunnelDestGroupArgs, opts ...ResourceOption) (*TunnelDestGroup, error)
public TunnelDestGroup(string name, TunnelDestGroupArgs args, CustomResourceOptions? opts = null)
public TunnelDestGroup(String name, TunnelDestGroupArgs args)
public TunnelDestGroup(String name, TunnelDestGroupArgs args, CustomResourceOptions options)
type: gcp:iap:TunnelDestGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TunnelDestGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TunnelDestGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TunnelDestGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TunnelDestGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TunnelDestGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var tunnelDestGroupResource = new Gcp.Iap.TunnelDestGroup("tunnelDestGroupResource", new()
{
    GroupName = "string",
    Cidrs = new[]
    {
        "string",
    },
    Fqdns = new[]
    {
        "string",
    },
    Project = "string",
    Region = "string",
});
Copy
example, err := iap.NewTunnelDestGroup(ctx, "tunnelDestGroupResource", &iap.TunnelDestGroupArgs{
	GroupName: pulumi.String("string"),
	Cidrs: pulumi.StringArray{
		pulumi.String("string"),
	},
	Fqdns: pulumi.StringArray{
		pulumi.String("string"),
	},
	Project: pulumi.String("string"),
	Region:  pulumi.String("string"),
})
Copy
var tunnelDestGroupResource = new TunnelDestGroup("tunnelDestGroupResource", TunnelDestGroupArgs.builder()
    .groupName("string")
    .cidrs("string")
    .fqdns("string")
    .project("string")
    .region("string")
    .build());
Copy
tunnel_dest_group_resource = gcp.iap.TunnelDestGroup("tunnelDestGroupResource",
    group_name="string",
    cidrs=["string"],
    fqdns=["string"],
    project="string",
    region="string")
Copy
const tunnelDestGroupResource = new gcp.iap.TunnelDestGroup("tunnelDestGroupResource", {
    groupName: "string",
    cidrs: ["string"],
    fqdns: ["string"],
    project: "string",
    region: "string",
});
Copy
type: gcp:iap:TunnelDestGroup
properties:
    cidrs:
        - string
    fqdns:
        - string
    groupName: string
    project: string
    region: string
Copy

TunnelDestGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The TunnelDestGroup resource accepts the following input properties:

GroupName
This property is required.
Changes to this property will trigger replacement.
string
Unique tunnel destination group name.


Cidrs List<string>
List of CIDRs that this group applies to.
Fqdns List<string>
List of FQDNs that this group applies to.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Region Changes to this property will trigger replacement. string
The region of the tunnel group. Must be the same as the network resources in the group.
GroupName
This property is required.
Changes to this property will trigger replacement.
string
Unique tunnel destination group name.


Cidrs []string
List of CIDRs that this group applies to.
Fqdns []string
List of FQDNs that this group applies to.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Region Changes to this property will trigger replacement. string
The region of the tunnel group. Must be the same as the network resources in the group.
groupName
This property is required.
Changes to this property will trigger replacement.
String
Unique tunnel destination group name.


cidrs List<String>
List of CIDRs that this group applies to.
fqdns List<String>
List of FQDNs that this group applies to.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. String
The region of the tunnel group. Must be the same as the network resources in the group.
groupName
This property is required.
Changes to this property will trigger replacement.
string
Unique tunnel destination group name.


cidrs string[]
List of CIDRs that this group applies to.
fqdns string[]
List of FQDNs that this group applies to.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. string
The region of the tunnel group. Must be the same as the network resources in the group.
group_name
This property is required.
Changes to this property will trigger replacement.
str
Unique tunnel destination group name.


cidrs Sequence[str]
List of CIDRs that this group applies to.
fqdns Sequence[str]
List of FQDNs that this group applies to.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. str
The region of the tunnel group. Must be the same as the network resources in the group.
groupName
This property is required.
Changes to this property will trigger replacement.
String
Unique tunnel destination group name.


cidrs List<String>
List of CIDRs that this group applies to.
fqdns List<String>
List of FQDNs that this group applies to.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. String
The region of the tunnel group. Must be the same as the network resources in the group.

Outputs

All input properties are implicitly available as output properties. Additionally, the TunnelDestGroup resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
Full resource name.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Full resource name.
id String
The provider-assigned unique ID for this managed resource.
name String
Full resource name.
id string
The provider-assigned unique ID for this managed resource.
name string
Full resource name.
id str
The provider-assigned unique ID for this managed resource.
name str
Full resource name.
id String
The provider-assigned unique ID for this managed resource.
name String
Full resource name.

Look up Existing TunnelDestGroup Resource

Get an existing TunnelDestGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TunnelDestGroupState, opts?: CustomResourceOptions): TunnelDestGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cidrs: Optional[Sequence[str]] = None,
        fqdns: Optional[Sequence[str]] = None,
        group_name: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        region: Optional[str] = None) -> TunnelDestGroup
func GetTunnelDestGroup(ctx *Context, name string, id IDInput, state *TunnelDestGroupState, opts ...ResourceOption) (*TunnelDestGroup, error)
public static TunnelDestGroup Get(string name, Input<string> id, TunnelDestGroupState? state, CustomResourceOptions? opts = null)
public static TunnelDestGroup get(String name, Output<String> id, TunnelDestGroupState state, CustomResourceOptions options)
resources:  _:    type: gcp:iap:TunnelDestGroup    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Cidrs List<string>
List of CIDRs that this group applies to.
Fqdns List<string>
List of FQDNs that this group applies to.
GroupName Changes to this property will trigger replacement. string
Unique tunnel destination group name.


Name string
Full resource name.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Region Changes to this property will trigger replacement. string
The region of the tunnel group. Must be the same as the network resources in the group.
Cidrs []string
List of CIDRs that this group applies to.
Fqdns []string
List of FQDNs that this group applies to.
GroupName Changes to this property will trigger replacement. string
Unique tunnel destination group name.


Name string
Full resource name.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Region Changes to this property will trigger replacement. string
The region of the tunnel group. Must be the same as the network resources in the group.
cidrs List<String>
List of CIDRs that this group applies to.
fqdns List<String>
List of FQDNs that this group applies to.
groupName Changes to this property will trigger replacement. String
Unique tunnel destination group name.


name String
Full resource name.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. String
The region of the tunnel group. Must be the same as the network resources in the group.
cidrs string[]
List of CIDRs that this group applies to.
fqdns string[]
List of FQDNs that this group applies to.
groupName Changes to this property will trigger replacement. string
Unique tunnel destination group name.


name string
Full resource name.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. string
The region of the tunnel group. Must be the same as the network resources in the group.
cidrs Sequence[str]
List of CIDRs that this group applies to.
fqdns Sequence[str]
List of FQDNs that this group applies to.
group_name Changes to this property will trigger replacement. str
Unique tunnel destination group name.


name str
Full resource name.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. str
The region of the tunnel group. Must be the same as the network resources in the group.
cidrs List<String>
List of CIDRs that this group applies to.
fqdns List<String>
List of FQDNs that this group applies to.
groupName Changes to this property will trigger replacement. String
Unique tunnel destination group name.


name String
Full resource name.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. String
The region of the tunnel group. Must be the same as the network resources in the group.

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:

$ pulumi import gcp:iap/tunnelDestGroup:TunnelDestGroup default projects/{{project}}/iap_tunnel/locations/{{region}}/destGroups/{{group_name}}
Copy
$ pulumi import gcp:iap/tunnelDestGroup:TunnelDestGroup default {{project}}/iap_tunnel/locations/{{region}}/destGroups/{{group_name}}
Copy
$ pulumi import gcp:iap/tunnelDestGroup:TunnelDestGroup default {{project}}/{{region}}/{{group_name}}
Copy
$ pulumi import gcp:iap/tunnelDestGroup:TunnelDestGroup default {{region}}/destGroups/{{group_name}}
Copy
$ pulumi import gcp:iap/tunnelDestGroup:TunnelDestGroup default {{region}}/{{group_name}}
Copy
$ pulumi import gcp:iap/tunnelDestGroup:TunnelDestGroup default {{group_name}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.