1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. networkmanagement
  5. ConnectivityTest
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.networkmanagement.ConnectivityTest

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    A connectivity test are 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.

    To get more information about ConnectivityTest, see:

    Example Usage

    Network Management Connectivity Test Instances

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const vpc = new gcp.compute.Network("vpc", {name: "conn-test-net"});
    const debian9 = gcp.compute.getImage({
        family: "debian-11",
        project: "debian-cloud",
    });
    const source = new gcp.compute.Instance("source", {
        networkInterfaces: [{
            accessConfigs: [{}],
            network: vpc.id,
        }],
        name: "source-vm",
        machineType: "e2-medium",
        bootDisk: {
            initializeParams: {
                image: debian9.then(debian9 => debian9.id),
            },
        },
    });
    const destination = new gcp.compute.Instance("destination", {
        networkInterfaces: [{
            accessConfigs: [{}],
            network: vpc.id,
        }],
        name: "dest-vm",
        machineType: "e2-medium",
        bootDisk: {
            initializeParams: {
                image: debian9.then(debian9 => debian9.id),
            },
        },
    });
    const instance_test = new gcp.networkmanagement.ConnectivityTest("instance-test", {
        name: "conn-test-instances",
        source: {
            instance: source.id,
        },
        destination: {
            instance: destination.id,
        },
        protocol: "TCP",
        labels: {
            env: "test",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    vpc = gcp.compute.Network("vpc", name="conn-test-net")
    debian9 = gcp.compute.get_image(family="debian-11",
        project="debian-cloud")
    source = gcp.compute.Instance("source",
        network_interfaces=[{
            "access_configs": [{}],
            "network": vpc.id,
        }],
        name="source-vm",
        machine_type="e2-medium",
        boot_disk={
            "initialize_params": {
                "image": debian9.id,
            },
        })
    destination = gcp.compute.Instance("destination",
        network_interfaces=[{
            "access_configs": [{}],
            "network": vpc.id,
        }],
        name="dest-vm",
        machine_type="e2-medium",
        boot_disk={
            "initialize_params": {
                "image": debian9.id,
            },
        })
    instance_test = gcp.networkmanagement.ConnectivityTest("instance-test",
        name="conn-test-instances",
        source={
            "instance": source.id,
        },
        destination={
            "instance": destination.id,
        },
        protocol="TCP",
        labels={
            "env": "test",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkmanagement"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		vpc, err := compute.NewNetwork(ctx, "vpc", &compute.NetworkArgs{
    			Name: pulumi.String("conn-test-net"),
    		})
    		if err != nil {
    			return err
    		}
    		debian9, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
    			Family:  pulumi.StringRef("debian-11"),
    			Project: pulumi.StringRef("debian-cloud"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		source, err := compute.NewInstance(ctx, "source", &compute.InstanceArgs{
    			NetworkInterfaces: compute.InstanceNetworkInterfaceArray{
    				&compute.InstanceNetworkInterfaceArgs{
    					AccessConfigs: compute.InstanceNetworkInterfaceAccessConfigArray{
    						&compute.InstanceNetworkInterfaceAccessConfigArgs{},
    					},
    					Network: vpc.ID(),
    				},
    			},
    			Name:        pulumi.String("source-vm"),
    			MachineType: pulumi.String("e2-medium"),
    			BootDisk: &compute.InstanceBootDiskArgs{
    				InitializeParams: &compute.InstanceBootDiskInitializeParamsArgs{
    					Image: pulumi.String(debian9.Id),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		destination, err := compute.NewInstance(ctx, "destination", &compute.InstanceArgs{
    			NetworkInterfaces: compute.InstanceNetworkInterfaceArray{
    				&compute.InstanceNetworkInterfaceArgs{
    					AccessConfigs: compute.InstanceNetworkInterfaceAccessConfigArray{
    						&compute.InstanceNetworkInterfaceAccessConfigArgs{},
    					},
    					Network: vpc.ID(),
    				},
    			},
    			Name:        pulumi.String("dest-vm"),
    			MachineType: pulumi.String("e2-medium"),
    			BootDisk: &compute.InstanceBootDiskArgs{
    				InitializeParams: &compute.InstanceBootDiskInitializeParamsArgs{
    					Image: pulumi.String(debian9.Id),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networkmanagement.NewConnectivityTest(ctx, "instance-test", &networkmanagement.ConnectivityTestArgs{
    			Name: pulumi.String("conn-test-instances"),
    			Source: &networkmanagement.ConnectivityTestSourceArgs{
    				Instance: source.ID(),
    			},
    			Destination: &networkmanagement.ConnectivityTestDestinationArgs{
    				Instance: destination.ID(),
    			},
    			Protocol: pulumi.String("TCP"),
    			Labels: pulumi.StringMap{
    				"env": pulumi.String("test"),
    			},
    		})
    		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 vpc = new Gcp.Compute.Network("vpc", new()
        {
            Name = "conn-test-net",
        });
    
        var debian9 = Gcp.Compute.GetImage.Invoke(new()
        {
            Family = "debian-11",
            Project = "debian-cloud",
        });
    
        var source = new Gcp.Compute.Instance("source", new()
        {
            NetworkInterfaces = new[]
            {
                new Gcp.Compute.Inputs.InstanceNetworkInterfaceArgs
                {
                    AccessConfigs = new[]
                    {
                        null,
                    },
                    Network = vpc.Id,
                },
            },
            Name = "source-vm",
            MachineType = "e2-medium",
            BootDisk = new Gcp.Compute.Inputs.InstanceBootDiskArgs
            {
                InitializeParams = new Gcp.Compute.Inputs.InstanceBootDiskInitializeParamsArgs
                {
                    Image = debian9.Apply(getImageResult => getImageResult.Id),
                },
            },
        });
    
        var destination = new Gcp.Compute.Instance("destination", new()
        {
            NetworkInterfaces = new[]
            {
                new Gcp.Compute.Inputs.InstanceNetworkInterfaceArgs
                {
                    AccessConfigs = new[]
                    {
                        null,
                    },
                    Network = vpc.Id,
                },
            },
            Name = "dest-vm",
            MachineType = "e2-medium",
            BootDisk = new Gcp.Compute.Inputs.InstanceBootDiskArgs
            {
                InitializeParams = new Gcp.Compute.Inputs.InstanceBootDiskInitializeParamsArgs
                {
                    Image = debian9.Apply(getImageResult => getImageResult.Id),
                },
            },
        });
    
        var instance_test = new Gcp.NetworkManagement.ConnectivityTest("instance-test", new()
        {
            Name = "conn-test-instances",
            Source = new Gcp.NetworkManagement.Inputs.ConnectivityTestSourceArgs
            {
                Instance = source.Id,
            },
            Destination = new Gcp.NetworkManagement.Inputs.ConnectivityTestDestinationArgs
            {
                Instance = destination.Id,
            },
            Protocol = "TCP",
            Labels = 
            {
                { "env", "test" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.compute.ComputeFunctions;
    import com.pulumi.gcp.compute.inputs.GetImageArgs;
    import com.pulumi.gcp.compute.Instance;
    import com.pulumi.gcp.compute.InstanceArgs;
    import com.pulumi.gcp.compute.inputs.InstanceNetworkInterfaceArgs;
    import com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs;
    import com.pulumi.gcp.compute.inputs.InstanceBootDiskInitializeParamsArgs;
    import com.pulumi.gcp.networkmanagement.ConnectivityTest;
    import com.pulumi.gcp.networkmanagement.ConnectivityTestArgs;
    import com.pulumi.gcp.networkmanagement.inputs.ConnectivityTestSourceArgs;
    import com.pulumi.gcp.networkmanagement.inputs.ConnectivityTestDestinationArgs;
    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 vpc = new Network("vpc", NetworkArgs.builder()
                .name("conn-test-net")
                .build());
    
            final var debian9 = ComputeFunctions.getImage(GetImageArgs.builder()
                .family("debian-11")
                .project("debian-cloud")
                .build());
    
            var source = new Instance("source", InstanceArgs.builder()
                .networkInterfaces(InstanceNetworkInterfaceArgs.builder()
                    .accessConfigs()
                    .network(vpc.id())
                    .build())
                .name("source-vm")
                .machineType("e2-medium")
                .bootDisk(InstanceBootDiskArgs.builder()
                    .initializeParams(InstanceBootDiskInitializeParamsArgs.builder()
                        .image(debian9.applyValue(getImageResult -> getImageResult.id()))
                        .build())
                    .build())
                .build());
    
            var destination = new Instance("destination", InstanceArgs.builder()
                .networkInterfaces(InstanceNetworkInterfaceArgs.builder()
                    .accessConfigs()
                    .network(vpc.id())
                    .build())
                .name("dest-vm")
                .machineType("e2-medium")
                .bootDisk(InstanceBootDiskArgs.builder()
                    .initializeParams(InstanceBootDiskInitializeParamsArgs.builder()
                        .image(debian9.applyValue(getImageResult -> getImageResult.id()))
                        .build())
                    .build())
                .build());
    
            var instance_test = new ConnectivityTest("instance-test", ConnectivityTestArgs.builder()
                .name("conn-test-instances")
                .source(ConnectivityTestSourceArgs.builder()
                    .instance(source.id())
                    .build())
                .destination(ConnectivityTestDestinationArgs.builder()
                    .instance(destination.id())
                    .build())
                .protocol("TCP")
                .labels(Map.of("env", "test"))
                .build());
    
        }
    }
    
    resources:
      instance-test:
        type: gcp:networkmanagement:ConnectivityTest
        properties:
          name: conn-test-instances
          source:
            instance: ${source.id}
          destination:
            instance: ${destination.id}
          protocol: TCP
          labels:
            env: test
      source:
        type: gcp:compute:Instance
        properties:
          networkInterfaces:
            - accessConfigs:
                - {}
              network: ${vpc.id}
          name: source-vm
          machineType: e2-medium
          bootDisk:
            initializeParams:
              image: ${debian9.id}
      destination:
        type: gcp:compute:Instance
        properties:
          networkInterfaces:
            - accessConfigs:
                - {}
              network: ${vpc.id}
          name: dest-vm
          machineType: e2-medium
          bootDisk:
            initializeParams:
              image: ${debian9.id}
      vpc:
        type: gcp:compute:Network
        properties:
          name: conn-test-net
    variables:
      debian9:
        fn::invoke:
          Function: gcp:compute:getImage
          Arguments:
            family: debian-11
            project: debian-cloud
    

    Network Management Connectivity Test Addresses

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const vpc = new gcp.compute.Network("vpc", {name: "connectivity-vpc"});
    const subnet = new gcp.compute.Subnetwork("subnet", {
        name: "connectivity-vpc-subnet",
        ipCidrRange: "10.0.0.0/16",
        region: "us-central1",
        network: vpc.id,
    });
    const source_addr = new gcp.compute.Address("source-addr", {
        name: "src-addr",
        subnetwork: subnet.id,
        addressType: "INTERNAL",
        address: "10.0.42.42",
        region: "us-central1",
    });
    const dest_addr = new gcp.compute.Address("dest-addr", {
        name: "dest-addr",
        subnetwork: subnet.id,
        addressType: "INTERNAL",
        address: "10.0.43.43",
        region: "us-central1",
    });
    const address_test = new gcp.networkmanagement.ConnectivityTest("address-test", {
        name: "conn-test-addr",
        source: {
            ipAddress: source_addr.address,
            projectId: source_addr.project,
            network: vpc.id,
            networkType: "GCP_NETWORK",
        },
        destination: {
            ipAddress: dest_addr.address,
            projectId: dest_addr.project,
            network: vpc.id,
        },
        protocol: "UDP",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    vpc = gcp.compute.Network("vpc", name="connectivity-vpc")
    subnet = gcp.compute.Subnetwork("subnet",
        name="connectivity-vpc-subnet",
        ip_cidr_range="10.0.0.0/16",
        region="us-central1",
        network=vpc.id)
    source_addr = gcp.compute.Address("source-addr",
        name="src-addr",
        subnetwork=subnet.id,
        address_type="INTERNAL",
        address="10.0.42.42",
        region="us-central1")
    dest_addr = gcp.compute.Address("dest-addr",
        name="dest-addr",
        subnetwork=subnet.id,
        address_type="INTERNAL",
        address="10.0.43.43",
        region="us-central1")
    address_test = gcp.networkmanagement.ConnectivityTest("address-test",
        name="conn-test-addr",
        source={
            "ip_address": source_addr.address,
            "project_id": source_addr.project,
            "network": vpc.id,
            "network_type": "GCP_NETWORK",
        },
        destination={
            "ip_address": dest_addr.address,
            "project_id": dest_addr.project,
            "network": vpc.id,
        },
        protocol="UDP")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkmanagement"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		vpc, err := compute.NewNetwork(ctx, "vpc", &compute.NetworkArgs{
    			Name: pulumi.String("connectivity-vpc"),
    		})
    		if err != nil {
    			return err
    		}
    		subnet, err := compute.NewSubnetwork(ctx, "subnet", &compute.SubnetworkArgs{
    			Name:        pulumi.String("connectivity-vpc-subnet"),
    			IpCidrRange: pulumi.String("10.0.0.0/16"),
    			Region:      pulumi.String("us-central1"),
    			Network:     vpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewAddress(ctx, "source-addr", &compute.AddressArgs{
    			Name:        pulumi.String("src-addr"),
    			Subnetwork:  subnet.ID(),
    			AddressType: pulumi.String("INTERNAL"),
    			Address:     pulumi.String("10.0.42.42"),
    			Region:      pulumi.String("us-central1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewAddress(ctx, "dest-addr", &compute.AddressArgs{
    			Name:        pulumi.String("dest-addr"),
    			Subnetwork:  subnet.ID(),
    			AddressType: pulumi.String("INTERNAL"),
    			Address:     pulumi.String("10.0.43.43"),
    			Region:      pulumi.String("us-central1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networkmanagement.NewConnectivityTest(ctx, "address-test", &networkmanagement.ConnectivityTestArgs{
    			Name: pulumi.String("conn-test-addr"),
    			Source: &networkmanagement.ConnectivityTestSourceArgs{
    				IpAddress:   source_addr.Address,
    				ProjectId:   source_addr.Project,
    				Network:     vpc.ID(),
    				NetworkType: pulumi.String("GCP_NETWORK"),
    			},
    			Destination: &networkmanagement.ConnectivityTestDestinationArgs{
    				IpAddress: dest_addr.Address,
    				ProjectId: dest_addr.Project,
    				Network:   vpc.ID(),
    			},
    			Protocol: pulumi.String("UDP"),
    		})
    		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 vpc = new Gcp.Compute.Network("vpc", new()
        {
            Name = "connectivity-vpc",
        });
    
        var subnet = new Gcp.Compute.Subnetwork("subnet", new()
        {
            Name = "connectivity-vpc-subnet",
            IpCidrRange = "10.0.0.0/16",
            Region = "us-central1",
            Network = vpc.Id,
        });
    
        var source_addr = new Gcp.Compute.Address("source-addr", new()
        {
            Name = "src-addr",
            Subnetwork = subnet.Id,
            AddressType = "INTERNAL",
            IPAddress = "10.0.42.42",
            Region = "us-central1",
        });
    
        var dest_addr = new Gcp.Compute.Address("dest-addr", new()
        {
            Name = "dest-addr",
            Subnetwork = subnet.Id,
            AddressType = "INTERNAL",
            IPAddress = "10.0.43.43",
            Region = "us-central1",
        });
    
        var address_test = new Gcp.NetworkManagement.ConnectivityTest("address-test", new()
        {
            Name = "conn-test-addr",
            Source = new Gcp.NetworkManagement.Inputs.ConnectivityTestSourceArgs
            {
                IpAddress = source_addr.IPAddress,
                ProjectId = source_addr.Project,
                Network = vpc.Id,
                NetworkType = "GCP_NETWORK",
            },
            Destination = new Gcp.NetworkManagement.Inputs.ConnectivityTestDestinationArgs
            {
                IpAddress = dest_addr.IPAddress,
                ProjectId = dest_addr.Project,
                Network = vpc.Id,
            },
            Protocol = "UDP",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.compute.Subnetwork;
    import com.pulumi.gcp.compute.SubnetworkArgs;
    import com.pulumi.gcp.compute.Address;
    import com.pulumi.gcp.compute.AddressArgs;
    import com.pulumi.gcp.networkmanagement.ConnectivityTest;
    import com.pulumi.gcp.networkmanagement.ConnectivityTestArgs;
    import com.pulumi.gcp.networkmanagement.inputs.ConnectivityTestSourceArgs;
    import com.pulumi.gcp.networkmanagement.inputs.ConnectivityTestDestinationArgs;
    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 vpc = new Network("vpc", NetworkArgs.builder()
                .name("connectivity-vpc")
                .build());
    
            var subnet = new Subnetwork("subnet", SubnetworkArgs.builder()
                .name("connectivity-vpc-subnet")
                .ipCidrRange("10.0.0.0/16")
                .region("us-central1")
                .network(vpc.id())
                .build());
    
            var source_addr = new Address("source-addr", AddressArgs.builder()
                .name("src-addr")
                .subnetwork(subnet.id())
                .addressType("INTERNAL")
                .address("10.0.42.42")
                .region("us-central1")
                .build());
    
            var dest_addr = new Address("dest-addr", AddressArgs.builder()
                .name("dest-addr")
                .subnetwork(subnet.id())
                .addressType("INTERNAL")
                .address("10.0.43.43")
                .region("us-central1")
                .build());
    
            var address_test = new ConnectivityTest("address-test", ConnectivityTestArgs.builder()
                .name("conn-test-addr")
                .source(ConnectivityTestSourceArgs.builder()
                    .ipAddress(source_addr.address())
                    .projectId(source_addr.project())
                    .network(vpc.id())
                    .networkType("GCP_NETWORK")
                    .build())
                .destination(ConnectivityTestDestinationArgs.builder()
                    .ipAddress(dest_addr.address())
                    .projectId(dest_addr.project())
                    .network(vpc.id())
                    .build())
                .protocol("UDP")
                .build());
    
        }
    }
    
    resources:
      address-test:
        type: gcp:networkmanagement:ConnectivityTest
        properties:
          name: conn-test-addr
          source:
            ipAddress: ${["source-addr"].address}
            projectId: ${["source-addr"].project}
            network: ${vpc.id}
            networkType: GCP_NETWORK
          destination:
            ipAddress: ${["dest-addr"].address}
            projectId: ${["dest-addr"].project}
            network: ${vpc.id}
          protocol: UDP
      vpc:
        type: gcp:compute:Network
        properties:
          name: connectivity-vpc
      subnet:
        type: gcp:compute:Subnetwork
        properties:
          name: connectivity-vpc-subnet
          ipCidrRange: 10.0.0.0/16
          region: us-central1
          network: ${vpc.id}
      source-addr:
        type: gcp:compute:Address
        properties:
          name: src-addr
          subnetwork: ${subnet.id}
          addressType: INTERNAL
          address: 10.0.42.42
          region: us-central1
      dest-addr:
        type: gcp:compute:Address
        properties:
          name: dest-addr
          subnetwork: ${subnet.id}
          addressType: INTERNAL
          address: 10.0.43.43
          region: us-central1
    

    Create ConnectivityTest Resource

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

    Constructor syntax

    new ConnectivityTest(name: string, args: ConnectivityTestArgs, opts?: CustomResourceOptions);
    @overload
    def ConnectivityTest(resource_name: str,
                         args: ConnectivityTestArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ConnectivityTest(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         destination: Optional[ConnectivityTestDestinationArgs] = None,
                         source: Optional[ConnectivityTestSourceArgs] = None,
                         description: Optional[str] = None,
                         labels: Optional[Mapping[str, str]] = None,
                         name: Optional[str] = None,
                         project: Optional[str] = None,
                         protocol: Optional[str] = None,
                         related_projects: Optional[Sequence[str]] = None)
    func NewConnectivityTest(ctx *Context, name string, args ConnectivityTestArgs, opts ...ResourceOption) (*ConnectivityTest, error)
    public ConnectivityTest(string name, ConnectivityTestArgs args, CustomResourceOptions? opts = null)
    public ConnectivityTest(String name, ConnectivityTestArgs args)
    public ConnectivityTest(String name, ConnectivityTestArgs args, CustomResourceOptions options)
    
    type: gcp:networkmanagement:ConnectivityTest
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ConnectivityTestArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ConnectivityTestArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ConnectivityTestArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConnectivityTestArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConnectivityTestArgs
    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 connectivityTestResource = new Gcp.NetworkManagement.ConnectivityTest("connectivityTestResource", new()
    {
        Destination = new Gcp.NetworkManagement.Inputs.ConnectivityTestDestinationArgs
        {
            Instance = "string",
            IpAddress = "string",
            Network = "string",
            Port = 0,
            ProjectId = "string",
        },
        Source = new Gcp.NetworkManagement.Inputs.ConnectivityTestSourceArgs
        {
            Instance = "string",
            IpAddress = "string",
            Network = "string",
            NetworkType = "string",
            Port = 0,
            ProjectId = "string",
        },
        Description = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Name = "string",
        Project = "string",
        Protocol = "string",
        RelatedProjects = new[]
        {
            "string",
        },
    });
    
    example, err := networkmanagement.NewConnectivityTest(ctx, "connectivityTestResource", &networkmanagement.ConnectivityTestArgs{
    	Destination: &networkmanagement.ConnectivityTestDestinationArgs{
    		Instance:  pulumi.String("string"),
    		IpAddress: pulumi.String("string"),
    		Network:   pulumi.String("string"),
    		Port:      pulumi.Int(0),
    		ProjectId: pulumi.String("string"),
    	},
    	Source: &networkmanagement.ConnectivityTestSourceArgs{
    		Instance:    pulumi.String("string"),
    		IpAddress:   pulumi.String("string"),
    		Network:     pulumi.String("string"),
    		NetworkType: pulumi.String("string"),
    		Port:        pulumi.Int(0),
    		ProjectId:   pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:     pulumi.String("string"),
    	Project:  pulumi.String("string"),
    	Protocol: pulumi.String("string"),
    	RelatedProjects: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var connectivityTestResource = new ConnectivityTest("connectivityTestResource", ConnectivityTestArgs.builder()
        .destination(ConnectivityTestDestinationArgs.builder()
            .instance("string")
            .ipAddress("string")
            .network("string")
            .port(0)
            .projectId("string")
            .build())
        .source(ConnectivityTestSourceArgs.builder()
            .instance("string")
            .ipAddress("string")
            .network("string")
            .networkType("string")
            .port(0)
            .projectId("string")
            .build())
        .description("string")
        .labels(Map.of("string", "string"))
        .name("string")
        .project("string")
        .protocol("string")
        .relatedProjects("string")
        .build());
    
    connectivity_test_resource = gcp.networkmanagement.ConnectivityTest("connectivityTestResource",
        destination={
            "instance": "string",
            "ip_address": "string",
            "network": "string",
            "port": 0,
            "project_id": "string",
        },
        source={
            "instance": "string",
            "ip_address": "string",
            "network": "string",
            "network_type": "string",
            "port": 0,
            "project_id": "string",
        },
        description="string",
        labels={
            "string": "string",
        },
        name="string",
        project="string",
        protocol="string",
        related_projects=["string"])
    
    const connectivityTestResource = new gcp.networkmanagement.ConnectivityTest("connectivityTestResource", {
        destination: {
            instance: "string",
            ipAddress: "string",
            network: "string",
            port: 0,
            projectId: "string",
        },
        source: {
            instance: "string",
            ipAddress: "string",
            network: "string",
            networkType: "string",
            port: 0,
            projectId: "string",
        },
        description: "string",
        labels: {
            string: "string",
        },
        name: "string",
        project: "string",
        protocol: "string",
        relatedProjects: ["string"],
    });
    
    type: gcp:networkmanagement:ConnectivityTest
    properties:
        description: string
        destination:
            instance: string
            ipAddress: string
            network: string
            port: 0
            projectId: string
        labels:
            string: string
        name: string
        project: string
        protocol: string
        relatedProjects:
            - string
        source:
            instance: string
            ipAddress: string
            network: string
            networkType: string
            port: 0
            projectId: string
    

    ConnectivityTest 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 ConnectivityTest resource accepts the following input properties:

    Destination ConnectivityTestDestination
    Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. Structure is documented below.
    Source ConnectivityTestSource
    Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. Structure is documented below.
    Description string
    The user-supplied description of the Connectivity Test. Maximum of 512 characters.
    Labels Dictionary<string, string>
    Resource labels to represent user-provided metadata. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    Name string
    Unique name for the connectivity test.
    Project string
    Protocol string
    IP Protocol of the test. When not provided, "TCP" is assumed.
    RelatedProjects List<string>
    Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
    Destination ConnectivityTestDestinationArgs
    Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. Structure is documented below.
    Source ConnectivityTestSourceArgs
    Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. Structure is documented below.
    Description string
    The user-supplied description of the Connectivity Test. Maximum of 512 characters.
    Labels map[string]string
    Resource labels to represent user-provided metadata. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    Name string
    Unique name for the connectivity test.
    Project string
    Protocol string
    IP Protocol of the test. When not provided, "TCP" is assumed.
    RelatedProjects []string
    Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
    destination ConnectivityTestDestination
    Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. Structure is documented below.
    source ConnectivityTestSource
    Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. Structure is documented below.
    description String
    The user-supplied description of the Connectivity Test. Maximum of 512 characters.
    labels Map<String,String>
    Resource labels to represent user-provided metadata. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name String
    Unique name for the connectivity test.
    project String
    protocol String
    IP Protocol of the test. When not provided, "TCP" is assumed.
    relatedProjects List<String>
    Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
    destination ConnectivityTestDestination
    Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. Structure is documented below.
    source ConnectivityTestSource
    Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. Structure is documented below.
    description string
    The user-supplied description of the Connectivity Test. Maximum of 512 characters.
    labels {[key: string]: string}
    Resource labels to represent user-provided metadata. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name string
    Unique name for the connectivity test.
    project string
    protocol string
    IP Protocol of the test. When not provided, "TCP" is assumed.
    relatedProjects string[]
    Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
    destination ConnectivityTestDestinationArgs
    Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. Structure is documented below.
    source ConnectivityTestSourceArgs
    Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. Structure is documented below.
    description str
    The user-supplied description of the Connectivity Test. Maximum of 512 characters.
    labels Mapping[str, str]
    Resource labels to represent user-provided metadata. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name str
    Unique name for the connectivity test.
    project str
    protocol str
    IP Protocol of the test. When not provided, "TCP" is assumed.
    related_projects Sequence[str]
    Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
    destination Property Map
    Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. Structure is documented below.
    source Property Map
    Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. Structure is documented below.
    description String
    The user-supplied description of the Connectivity Test. Maximum of 512 characters.
    labels Map<String>
    Resource labels to represent user-provided metadata. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name String
    Unique name for the connectivity test.
    project String
    protocol String
    IP Protocol of the test. When not provided, "TCP" is assumed.
    relatedProjects List<String>
    Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.

    Outputs

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

    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id string
    The provider-assigned unique ID for this managed resource.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id str
    The provider-assigned unique ID for this managed resource.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.

    Look up Existing ConnectivityTest Resource

    Get an existing ConnectivityTest 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?: ConnectivityTestState, opts?: CustomResourceOptions): ConnectivityTest
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            destination: Optional[ConnectivityTestDestinationArgs] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            protocol: Optional[str] = None,
            pulumi_labels: Optional[Mapping[str, str]] = None,
            related_projects: Optional[Sequence[str]] = None,
            source: Optional[ConnectivityTestSourceArgs] = None) -> ConnectivityTest
    func GetConnectivityTest(ctx *Context, name string, id IDInput, state *ConnectivityTestState, opts ...ResourceOption) (*ConnectivityTest, error)
    public static ConnectivityTest Get(string name, Input<string> id, ConnectivityTestState? state, CustomResourceOptions? opts = null)
    public static ConnectivityTest get(String name, Output<String> id, ConnectivityTestState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    Description string
    The user-supplied description of the Connectivity Test. Maximum of 512 characters.
    Destination ConnectivityTestDestination
    Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. Structure is documented below.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Labels Dictionary<string, string>
    Resource labels to represent user-provided metadata. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    Name string
    Unique name for the connectivity test.
    Project string
    Protocol string
    IP Protocol of the test. When not provided, "TCP" is assumed.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    RelatedProjects List<string>
    Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
    Source ConnectivityTestSource
    Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. Structure is documented below.
    Description string
    The user-supplied description of the Connectivity Test. Maximum of 512 characters.
    Destination ConnectivityTestDestinationArgs
    Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. Structure is documented below.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Labels map[string]string
    Resource labels to represent user-provided metadata. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    Name string
    Unique name for the connectivity test.
    Project string
    Protocol string
    IP Protocol of the test. When not provided, "TCP" is assumed.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    RelatedProjects []string
    Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
    Source ConnectivityTestSourceArgs
    Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. Structure is documented below.
    description String
    The user-supplied description of the Connectivity Test. Maximum of 512 characters.
    destination ConnectivityTestDestination
    Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. Structure is documented below.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    labels Map<String,String>
    Resource labels to represent user-provided metadata. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name String
    Unique name for the connectivity test.
    project String
    protocol String
    IP Protocol of the test. When not provided, "TCP" is assumed.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    relatedProjects List<String>
    Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
    source ConnectivityTestSource
    Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. Structure is documented below.
    description string
    The user-supplied description of the Connectivity Test. Maximum of 512 characters.
    destination ConnectivityTestDestination
    Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. Structure is documented below.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    labels {[key: string]: string}
    Resource labels to represent user-provided metadata. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name string
    Unique name for the connectivity test.
    project string
    protocol string
    IP Protocol of the test. When not provided, "TCP" is assumed.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    relatedProjects string[]
    Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
    source ConnectivityTestSource
    Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. Structure is documented below.
    description str
    The user-supplied description of the Connectivity Test. Maximum of 512 characters.
    destination ConnectivityTestDestinationArgs
    Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. Structure is documented below.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    labels Mapping[str, str]
    Resource labels to represent user-provided metadata. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name str
    Unique name for the connectivity test.
    project str
    protocol str
    IP Protocol of the test. When not provided, "TCP" is assumed.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    related_projects Sequence[str]
    Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
    source ConnectivityTestSourceArgs
    Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. Structure is documented below.
    description String
    The user-supplied description of the Connectivity Test. Maximum of 512 characters.
    destination Property Map
    Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. Structure is documented below.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    labels Map<String>
    Resource labels to represent user-provided metadata. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name String
    Unique name for the connectivity test.
    project String
    protocol String
    IP Protocol of the test. When not provided, "TCP" is assumed.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    relatedProjects List<String>
    Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
    source Property Map
    Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. Structure is documented below.

    Supporting Types

    ConnectivityTestDestination, ConnectivityTestDestinationArgs

    Instance string
    A Compute Engine instance URI.
    IpAddress string
    The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a global load balancer VIP.
    Network string
    A Compute Engine network URI.
    Port int
    The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
    ProjectId string
    Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID:

    1. Only the IP address is specified, and the IP address is within a GCP project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.

    Instance string
    A Compute Engine instance URI.
    IpAddress string
    The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a global load balancer VIP.
    Network string
    A Compute Engine network URI.
    Port int
    The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
    ProjectId string
    Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID:

    1. Only the IP address is specified, and the IP address is within a GCP project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.

    instance String
    A Compute Engine instance URI.
    ipAddress String
    The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a global load balancer VIP.
    network String
    A Compute Engine network URI.
    port Integer
    The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
    projectId String
    Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID:

    1. Only the IP address is specified, and the IP address is within a GCP project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.

    instance string
    A Compute Engine instance URI.
    ipAddress string
    The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a global load balancer VIP.
    network string
    A Compute Engine network URI.
    port number
    The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
    projectId string
    Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID:

    1. Only the IP address is specified, and the IP address is within a GCP project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.

    instance str
    A Compute Engine instance URI.
    ip_address str
    The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a global load balancer VIP.
    network str
    A Compute Engine network URI.
    port int
    The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
    project_id str
    Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID:

    1. Only the IP address is specified, and the IP address is within a GCP project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.

    instance String
    A Compute Engine instance URI.
    ipAddress String
    The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a global load balancer VIP.
    network String
    A Compute Engine network URI.
    port Number
    The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
    projectId String
    Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID:

    1. Only the IP address is specified, and the IP address is within a GCP project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.

    ConnectivityTestSource, ConnectivityTestSourceArgs

    Instance string
    A Compute Engine instance URI.
    IpAddress string
    The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a global load balancer VIP.
    Network string
    A Compute Engine network URI.
    NetworkType string
    Type of the network where the endpoint is located. Possible values are: GCP_NETWORK, NON_GCP_NETWORK.
    Port int
    The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
    ProjectId string
    Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID:

    1. Only the IP address is specified, and the IP address is within a GCP project.
    2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.
    Instance string
    A Compute Engine instance URI.
    IpAddress string
    The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a global load balancer VIP.
    Network string
    A Compute Engine network URI.
    NetworkType string
    Type of the network where the endpoint is located. Possible values are: GCP_NETWORK, NON_GCP_NETWORK.
    Port int
    The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
    ProjectId string
    Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID:

    1. Only the IP address is specified, and the IP address is within a GCP project.
    2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.
    instance String
    A Compute Engine instance URI.
    ipAddress String
    The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a global load balancer VIP.
    network String
    A Compute Engine network URI.
    networkType String
    Type of the network where the endpoint is located. Possible values are: GCP_NETWORK, NON_GCP_NETWORK.
    port Integer
    The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
    projectId String
    Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID:

    1. Only the IP address is specified, and the IP address is within a GCP project.
    2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.
    instance string
    A Compute Engine instance URI.
    ipAddress string
    The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a global load balancer VIP.
    network string
    A Compute Engine network URI.
    networkType string
    Type of the network where the endpoint is located. Possible values are: GCP_NETWORK, NON_GCP_NETWORK.
    port number
    The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
    projectId string
    Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID:

    1. Only the IP address is specified, and the IP address is within a GCP project.
    2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.
    instance str
    A Compute Engine instance URI.
    ip_address str
    The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a global load balancer VIP.
    network str
    A Compute Engine network URI.
    network_type str
    Type of the network where the endpoint is located. Possible values are: GCP_NETWORK, NON_GCP_NETWORK.
    port int
    The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
    project_id str
    Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID:

    1. Only the IP address is specified, and the IP address is within a GCP project.
    2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.
    instance String
    A Compute Engine instance URI.
    ipAddress String
    The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a global load balancer VIP.
    network String
    A Compute Engine network URI.
    networkType String
    Type of the network where the endpoint is located. Possible values are: GCP_NETWORK, NON_GCP_NETWORK.
    port Number
    The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
    projectId String
    Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID:

    1. Only the IP address is specified, and the IP address is within a GCP project.
    2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.

    Import

    ConnectivityTest can be imported using any of these accepted formats:

    • projects/{{project}}/locations/global/connectivityTests/{{name}}

    • {{project}}/{{name}}

    • {{name}}

    When using the pulumi import command, ConnectivityTest can be imported using one of the formats above. For example:

    $ pulumi import gcp:networkmanagement/connectivityTest:ConnectivityTest default projects/{{project}}/locations/global/connectivityTests/{{name}}
    
    $ pulumi import gcp:networkmanagement/connectivityTest:ConnectivityTest default {{project}}/{{name}}
    
    $ pulumi import gcp:networkmanagement/connectivityTest:ConnectivityTest default {{name}}
    

    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.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi