Google Cloud v9.4.0 published on Tuesday, Nov 4, 2025 by Pulumi
gcp.networkmanagement.getConnectivityTests
Start a Neo task
Explain and create a gcp.networkmanagement.getConnectivityTests resource
A connectivity test is a static analysis of your resource configurations that enables you to evaluate connectivity to and from Google Cloud resources in your Virtual Private Cloud (VPC) network. This data source allows you to list connectivity tests in a project.
To get more information about connectivity tests, see:
- API documentation
- How-to Guides
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const tests = gcp.networkmanagement.getConnectivityTests({
filter: "name:projects/project-id/locations/global/connectivityTests/my-tests",
});
import pulumi
import pulumi_gcp as gcp
tests = gcp.networkmanagement.get_connectivity_tests(filter="name:projects/project-id/locations/global/connectivityTests/my-tests")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/networkmanagement"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkmanagement.GetConnectivityTests(ctx, &networkmanagement.GetConnectivityTestsArgs{
Filter: pulumi.StringRef("name:projects/project-id/locations/global/connectivityTests/my-tests"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var tests = Gcp.NetworkManagement.GetConnectivityTests.Invoke(new()
{
Filter = "name:projects/project-id/locations/global/connectivityTests/my-tests",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkmanagement.NetworkmanagementFunctions;
import com.pulumi.gcp.networkmanagement.inputs.GetConnectivityTestsArgs;
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) {
final var tests = NetworkmanagementFunctions.getConnectivityTests(GetConnectivityTestsArgs.builder()
.filter("name:projects/project-id/locations/global/connectivityTests/my-tests")
.build());
}
}
variables:
tests:
fn::invoke:
function: gcp:networkmanagement:getConnectivityTests
arguments:
filter: name:projects/project-id/locations/global/connectivityTests/my-tests
Using getConnectivityTests
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getConnectivityTests(args: GetConnectivityTestsArgs, opts?: InvokeOptions): Promise<GetConnectivityTestsResult>
function getConnectivityTestsOutput(args: GetConnectivityTestsOutputArgs, opts?: InvokeOptions): Output<GetConnectivityTestsResult>def get_connectivity_tests(filter: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetConnectivityTestsResult
def get_connectivity_tests_output(filter: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetConnectivityTestsResult]func GetConnectivityTests(ctx *Context, args *GetConnectivityTestsArgs, opts ...InvokeOption) (*GetConnectivityTestsResult, error)
func GetConnectivityTestsOutput(ctx *Context, args *GetConnectivityTestsOutputArgs, opts ...InvokeOption) GetConnectivityTestsResultOutput> Note: This function is named GetConnectivityTests in the Go SDK.
public static class GetConnectivityTests
{
public static Task<GetConnectivityTestsResult> InvokeAsync(GetConnectivityTestsArgs args, InvokeOptions? opts = null)
public static Output<GetConnectivityTestsResult> Invoke(GetConnectivityTestsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetConnectivityTestsResult> getConnectivityTests(GetConnectivityTestsArgs args, InvokeOptions options)
public static Output<GetConnectivityTestsResult> getConnectivityTests(GetConnectivityTestsArgs args, InvokeOptions options)
fn::invoke:
function: gcp:networkmanagement/getConnectivityTests:getConnectivityTests
arguments:
# arguments dictionaryThe following arguments are supported:
- Filter string
- Lists the ConnectivityTests that match the filter expression. A filter expression filters the resources listed in the response.
- Project string
- The ID of the project.
- Filter string
- Lists the ConnectivityTests that match the filter expression. A filter expression filters the resources listed in the response.
- Project string
- The ID of the project.
- filter String
- Lists the ConnectivityTests that match the filter expression. A filter expression filters the resources listed in the response.
- project String
- The ID of the project.
- filter string
- Lists the ConnectivityTests that match the filter expression. A filter expression filters the resources listed in the response.
- project string
- The ID of the project.
- filter str
- Lists the ConnectivityTests that match the filter expression. A filter expression filters the resources listed in the response.
- project str
- The ID of the project.
- filter String
- Lists the ConnectivityTests that match the filter expression. A filter expression filters the resources listed in the response.
- project String
- The ID of the project.
getConnectivityTests Result
The following output properties are available:
- Connectivity
Tests List<GetConnectivity Tests Connectivity Test> - A list of connectivity tests in the selected project matching the filter. Structure is defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project string
- The ID of the project in which the resource belongs.
- Filter string
- Connectivity
Tests []GetConnectivity Tests Connectivity Test - A list of connectivity tests in the selected project matching the filter. Structure is defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project string
- The ID of the project in which the resource belongs.
- Filter string
- connectivity
Tests List<GetConnectivity Tests Connectivity Test> - A list of connectivity tests in the selected project matching the filter. Structure is defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- project String
- The ID of the project in which the resource belongs.
- filter String
- connectivity
Tests GetConnectivity Tests Connectivity Test[] - A list of connectivity tests in the selected project matching the filter. Structure is defined below.
- id string
- The provider-assigned unique ID for this managed resource.
- project string
- The ID of the project in which the resource belongs.
- filter string
- connectivity_
tests Sequence[GetConnectivity Tests Connectivity Test] - A list of connectivity tests in the selected project matching the filter. Structure is defined below.
- id str
- The provider-assigned unique ID for this managed resource.
- project str
- The ID of the project in which the resource belongs.
- filter str
- connectivity
Tests List<Property Map> - A list of connectivity tests in the selected project matching the filter. Structure is defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- project String
- The ID of the project in which the resource belongs.
- filter String
Supporting Types
GetConnectivityTestsConnectivityTest
- Bypass
Firewall boolChecks - Whether the analysis should skip firewall checking.
- Description string
- The user-supplied description of the Connectivity Test.
- Destinations
List<Get
Connectivity Tests Connectivity Test Destination> - Destination specification of the Connectivity Test. Structure is documented below.
- Effective
Labels Dictionary<string, string> - Labels Dictionary<string, string>
- Resource labels to represent user-provided metadata.
- Name string
- Unique name for the connectivity test.
- Project string
- The ID of the project.
- Protocol string
- IP Protocol of the test.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- List<string>
- Other projects that may be relevant for reachability analysis.
- Round
Trip bool - Whether run analysis for the return path from destination to source.
- Sources
List<Get
Connectivity Tests Connectivity Test Source> - Source specification of the Connectivity Test. Structure is documented below.
- Bypass
Firewall boolChecks - Whether the analysis should skip firewall checking.
- Description string
- The user-supplied description of the Connectivity Test.
- Destinations
[]Get
Connectivity Tests Connectivity Test Destination - Destination specification of the Connectivity Test. Structure is documented below.
- Effective
Labels map[string]string - Labels map[string]string
- Resource labels to represent user-provided metadata.
- Name string
- Unique name for the connectivity test.
- Project string
- The ID of the project.
- Protocol string
- IP Protocol of the test.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- []string
- Other projects that may be relevant for reachability analysis.
- Round
Trip bool - Whether run analysis for the return path from destination to source.
- Sources
[]Get
Connectivity Tests Connectivity Test Source - Source specification of the Connectivity Test. Structure is documented below.
- bypass
Firewall BooleanChecks - Whether the analysis should skip firewall checking.
- description String
- The user-supplied description of the Connectivity Test.
- destinations
List<Get
Connectivity Tests Connectivity Test Destination> - Destination specification of the Connectivity Test. Structure is documented below.
- effective
Labels Map<String,String> - labels Map<String,String>
- Resource labels to represent user-provided metadata.
- name String
- Unique name for the connectivity test.
- project String
- The ID of the project.
- protocol String
- IP Protocol of the test.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- List<String>
- Other projects that may be relevant for reachability analysis.
- round
Trip Boolean - Whether run analysis for the return path from destination to source.
- sources
List<Get
Connectivity Tests Connectivity Test Source> - Source specification of the Connectivity Test. Structure is documented below.
- bypass
Firewall booleanChecks - Whether the analysis should skip firewall checking.
- description string
- The user-supplied description of the Connectivity Test.
- destinations
Get
Connectivity Tests Connectivity Test Destination[] - Destination specification of the Connectivity Test. Structure is documented below.
- effective
Labels {[key: string]: string} - labels {[key: string]: string}
- Resource labels to represent user-provided metadata.
- name string
- Unique name for the connectivity test.
- project string
- The ID of the project.
- protocol string
- IP Protocol of the test.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- string[]
- Other projects that may be relevant for reachability analysis.
- round
Trip boolean - Whether run analysis for the return path from destination to source.
- sources
Get
Connectivity Tests Connectivity Test Source[] - Source specification of the Connectivity Test. Structure is documented below.
- bypass_
firewall_ boolchecks - Whether the analysis should skip firewall checking.
- description str
- The user-supplied description of the Connectivity Test.
- destinations
Sequence[Get
Connectivity Tests Connectivity Test Destination] - Destination specification of the Connectivity Test. Structure is documented below.
- effective_
labels Mapping[str, str] - labels Mapping[str, str]
- Resource labels to represent user-provided metadata.
- name str
- Unique name for the connectivity test.
- project str
- The ID of the project.
- protocol str
- IP Protocol of the test.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- Sequence[str]
- Other projects that may be relevant for reachability analysis.
- round_
trip bool - Whether run analysis for the return path from destination to source.
- sources
Sequence[Get
Connectivity Tests Connectivity Test Source] - Source specification of the Connectivity Test. Structure is documented below.
- bypass
Firewall BooleanChecks - Whether the analysis should skip firewall checking.
- description String
- The user-supplied description of the Connectivity Test.
- destinations List<Property Map>
- Destination specification of the Connectivity Test. Structure is documented below.
- effective
Labels Map<String> - labels Map<String>
- Resource labels to represent user-provided metadata.
- name String
- Unique name for the connectivity test.
- project String
- The ID of the project.
- protocol String
- IP Protocol of the test.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- List<String>
- Other projects that may be relevant for reachability analysis.
- round
Trip Boolean - Whether run analysis for the return path from destination to source.
- sources List<Property Map>
- Source specification of the Connectivity Test. Structure is documented below.
GetConnectivityTestsConnectivityTestDestination
- Cloud
Sql stringInstance - A Cloud SQL instance URI.
- Forwarding
Rule string - Forwarding rule URI. Forwarding rules are frontends for load balancers, PSC endpoints, and Protocol Forwarding.
- Fqdn string
- A DNS endpoint of Google Kubernetes Engine cluster control plane.
- Gke
Master stringCluster - A cluster URI for Google Kubernetes Engine cluster control plane.
- Instance string
- A Compute Engine instance URI.
- Ip
Address string - The IP address of the endpoint.
- Network string
- A VPC network URI.
- Port int
- The IP protocol port of the endpoint.
- Project
Id string - Project ID where the endpoint is located.
- Redis
Cluster string - A Redis Cluster URI.
- Redis
Instance string - A Redis Instance URI.
- Cloud
Sql stringInstance - A Cloud SQL instance URI.
- Forwarding
Rule string - Forwarding rule URI. Forwarding rules are frontends for load balancers, PSC endpoints, and Protocol Forwarding.
- Fqdn string
- A DNS endpoint of Google Kubernetes Engine cluster control plane.
- Gke
Master stringCluster - A cluster URI for Google Kubernetes Engine cluster control plane.
- Instance string
- A Compute Engine instance URI.
- Ip
Address string - The IP address of the endpoint.
- Network string
- A VPC network URI.
- Port int
- The IP protocol port of the endpoint.
- Project
Id string - Project ID where the endpoint is located.
- Redis
Cluster string - A Redis Cluster URI.
- Redis
Instance string - A Redis Instance URI.
- cloud
Sql StringInstance - A Cloud SQL instance URI.
- forwarding
Rule String - Forwarding rule URI. Forwarding rules are frontends for load balancers, PSC endpoints, and Protocol Forwarding.
- fqdn String
- A DNS endpoint of Google Kubernetes Engine cluster control plane.
- gke
Master StringCluster - A cluster URI for Google Kubernetes Engine cluster control plane.
- instance String
- A Compute Engine instance URI.
- ip
Address String - The IP address of the endpoint.
- network String
- A VPC network URI.
- port Integer
- The IP protocol port of the endpoint.
- project
Id String - Project ID where the endpoint is located.
- redis
Cluster String - A Redis Cluster URI.
- redis
Instance String - A Redis Instance URI.
- cloud
Sql stringInstance - A Cloud SQL instance URI.
- forwarding
Rule string - Forwarding rule URI. Forwarding rules are frontends for load balancers, PSC endpoints, and Protocol Forwarding.
- fqdn string
- A DNS endpoint of Google Kubernetes Engine cluster control plane.
- gke
Master stringCluster - A cluster URI for Google Kubernetes Engine cluster control plane.
- instance string
- A Compute Engine instance URI.
- ip
Address string - The IP address of the endpoint.
- network string
- A VPC network URI.
- port number
- The IP protocol port of the endpoint.
- project
Id string - Project ID where the endpoint is located.
- redis
Cluster string - A Redis Cluster URI.
- redis
Instance string - A Redis Instance URI.
- cloud_
sql_ strinstance - A Cloud SQL instance URI.
- forwarding_
rule str - Forwarding rule URI. Forwarding rules are frontends for load balancers, PSC endpoints, and Protocol Forwarding.
- fqdn str
- A DNS endpoint of Google Kubernetes Engine cluster control plane.
- gke_
master_ strcluster - A cluster URI for Google Kubernetes Engine cluster control plane.
- instance str
- A Compute Engine instance URI.
- ip_
address str - The IP address of the endpoint.
- network str
- A VPC network URI.
- port int
- The IP protocol port of the endpoint.
- project_
id str - Project ID where the endpoint is located.
- redis_
cluster str - A Redis Cluster URI.
- redis_
instance str - A Redis Instance URI.
- cloud
Sql StringInstance - A Cloud SQL instance URI.
- forwarding
Rule String - Forwarding rule URI. Forwarding rules are frontends for load balancers, PSC endpoints, and Protocol Forwarding.
- fqdn String
- A DNS endpoint of Google Kubernetes Engine cluster control plane.
- gke
Master StringCluster - A cluster URI for Google Kubernetes Engine cluster control plane.
- instance String
- A Compute Engine instance URI.
- ip
Address String - The IP address of the endpoint.
- network String
- A VPC network URI.
- port Number
- The IP protocol port of the endpoint.
- project
Id String - Project ID where the endpoint is located.
- redis
Cluster String - A Redis Cluster URI.
- redis
Instance String - A Redis Instance URI.
GetConnectivityTestsConnectivityTestSource
- App
Engine List<GetVersions Connectivity Tests Connectivity Test Source App Engine Version> - An App Engine service version. Structure is documented below.
- Cloud
Functions List<GetConnectivity Tests Connectivity Test Source Cloud Function> - A Cloud Function. Structure is documented below.
- Cloud
Run List<GetRevisions Connectivity Tests Connectivity Test Source Cloud Run Revision> - A Cloud Run revision. Structure is documented below.
- Cloud
Sql stringInstance - A Cloud SQL instance URI.
- Gke
Master stringCluster - A cluster URI for Google Kubernetes Engine cluster control plane.
- Instance string
- A Compute Engine instance URI.
- Ip
Address string - The IP address of the endpoint.
- Network string
- A VPC network URI.
- Network
Type string - Type of the network where the endpoint is located.
- Port int
- The IP protocol port of the endpoint.
- Project
Id string - Project ID where the endpoint is located.
- App
Engine []GetVersions Connectivity Tests Connectivity Test Source App Engine Version - An App Engine service version. Structure is documented below.
- Cloud
Functions []GetConnectivity Tests Connectivity Test Source Cloud Function - A Cloud Function. Structure is documented below.
- Cloud
Run []GetRevisions Connectivity Tests Connectivity Test Source Cloud Run Revision - A Cloud Run revision. Structure is documented below.
- Cloud
Sql stringInstance - A Cloud SQL instance URI.
- Gke
Master stringCluster - A cluster URI for Google Kubernetes Engine cluster control plane.
- Instance string
- A Compute Engine instance URI.
- Ip
Address string - The IP address of the endpoint.
- Network string
- A VPC network URI.
- Network
Type string - Type of the network where the endpoint is located.
- Port int
- The IP protocol port of the endpoint.
- Project
Id string - Project ID where the endpoint is located.
- app
Engine List<GetVersions Connectivity Tests Connectivity Test Source App Engine Version> - An App Engine service version. Structure is documented below.
- cloud
Functions List<GetConnectivity Tests Connectivity Test Source Cloud Function> - A Cloud Function. Structure is documented below.
- cloud
Run List<GetRevisions Connectivity Tests Connectivity Test Source Cloud Run Revision> - A Cloud Run revision. Structure is documented below.
- cloud
Sql StringInstance - A Cloud SQL instance URI.
- gke
Master StringCluster - A cluster URI for Google Kubernetes Engine cluster control plane.
- instance String
- A Compute Engine instance URI.
- ip
Address String - The IP address of the endpoint.
- network String
- A VPC network URI.
- network
Type String - Type of the network where the endpoint is located.
- port Integer
- The IP protocol port of the endpoint.
- project
Id String - Project ID where the endpoint is located.
- app
Engine GetVersions Connectivity Tests Connectivity Test Source App Engine Version[] - An App Engine service version. Structure is documented below.
- cloud
Functions GetConnectivity Tests Connectivity Test Source Cloud Function[] - A Cloud Function. Structure is documented below.
- cloud
Run GetRevisions Connectivity Tests Connectivity Test Source Cloud Run Revision[] - A Cloud Run revision. Structure is documented below.
- cloud
Sql stringInstance - A Cloud SQL instance URI.
- gke
Master stringCluster - A cluster URI for Google Kubernetes Engine cluster control plane.
- instance string
- A Compute Engine instance URI.
- ip
Address string - The IP address of the endpoint.
- network string
- A VPC network URI.
- network
Type string - Type of the network where the endpoint is located.
- port number
- The IP protocol port of the endpoint.
- project
Id string - Project ID where the endpoint is located.
- app_
engine_ Sequence[Getversions Connectivity Tests Connectivity Test Source App Engine Version] - An App Engine service version. Structure is documented below.
- cloud_
functions Sequence[GetConnectivity Tests Connectivity Test Source Cloud Function] - A Cloud Function. Structure is documented below.
- cloud_
run_ Sequence[Getrevisions Connectivity Tests Connectivity Test Source Cloud Run Revision] - A Cloud Run revision. Structure is documented below.
- cloud_
sql_ strinstance - A Cloud SQL instance URI.
- gke_
master_ strcluster - A cluster URI for Google Kubernetes Engine cluster control plane.
- instance str
- A Compute Engine instance URI.
- ip_
address str - The IP address of the endpoint.
- network str
- A VPC network URI.
- network_
type str - Type of the network where the endpoint is located.
- port int
- The IP protocol port of the endpoint.
- project_
id str - Project ID where the endpoint is located.
- app
Engine List<Property Map>Versions - An App Engine service version. Structure is documented below.
- cloud
Functions List<Property Map> - A Cloud Function. Structure is documented below.
- cloud
Run List<Property Map>Revisions - A Cloud Run revision. Structure is documented below.
- cloud
Sql StringInstance - A Cloud SQL instance URI.
- gke
Master StringCluster - A cluster URI for Google Kubernetes Engine cluster control plane.
- instance String
- A Compute Engine instance URI.
- ip
Address String - The IP address of the endpoint.
- network String
- A VPC network URI.
- network
Type String - Type of the network where the endpoint is located.
- port Number
- The IP protocol port of the endpoint.
- project
Id String - Project ID where the endpoint is located.
GetConnectivityTestsConnectivityTestSourceAppEngineVersion
- Uri string
- A Cloud Run revision URI.
- Uri string
- A Cloud Run revision URI.
- uri String
- A Cloud Run revision URI.
- uri string
- A Cloud Run revision URI.
- uri str
- A Cloud Run revision URI.
- uri String
- A Cloud Run revision URI.
GetConnectivityTestsConnectivityTestSourceCloudFunction
- Uri string
- A Cloud Run revision URI.
- Uri string
- A Cloud Run revision URI.
- uri String
- A Cloud Run revision URI.
- uri string
- A Cloud Run revision URI.
- uri str
- A Cloud Run revision URI.
- uri String
- A Cloud Run revision URI.
GetConnectivityTestsConnectivityTestSourceCloudRunRevision
- Uri string
- A Cloud Run revision URI.
- Uri string
- A Cloud Run revision URI.
- uri String
- A Cloud Run revision URI.
- uri string
- A Cloud Run revision URI.
- uri str
- A Cloud Run revision URI.
- uri String
- A Cloud Run revision URI.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
