UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

189 lines 7.22 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getConnectivityTestRunOutput = exports.getConnectivityTestRun = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * !> This datasource triggers side effects on the target resource. It will take a long time to refresh (i.e. `pulumi preview` will take much longer than usual) and may modify the state of the parent resource or other copies of the resource copying the same parent. * * 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 trigger a rerun operation on a connectivity test and return the results. * * To get more information about connectivity tests, see: * * * [API documentation](https://cloud.google.com/network-intelligence-center/docs/reference/networkmanagement/rest/v1/projects.locations.global.connectivityTests/rerun) * * How-to Guides * * [Official Documentation](https://cloud.google.com/network-intelligence-center/docs) * * ## Example Usage * * ### Network Management Connectivity Test Run Instances * * ```typescript * 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", * }, * }); * const instance_test_run = gcp.networkmanagement.getConnectivityTestRunOutput({ * name: instance_test.name, * }); * ``` */ function getConnectivityTestRun(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("gcp:networkmanagement/getConnectivityTestRun:getConnectivityTestRun", { "name": args.name, "project": args.project, }, opts); } exports.getConnectivityTestRun = getConnectivityTestRun; /** * !> This datasource triggers side effects on the target resource. It will take a long time to refresh (i.e. `pulumi preview` will take much longer than usual) and may modify the state of the parent resource or other copies of the resource copying the same parent. * * 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 trigger a rerun operation on a connectivity test and return the results. * * To get more information about connectivity tests, see: * * * [API documentation](https://cloud.google.com/network-intelligence-center/docs/reference/networkmanagement/rest/v1/projects.locations.global.connectivityTests/rerun) * * How-to Guides * * [Official Documentation](https://cloud.google.com/network-intelligence-center/docs) * * ## Example Usage * * ### Network Management Connectivity Test Run Instances * * ```typescript * 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", * }, * }); * const instance_test_run = gcp.networkmanagement.getConnectivityTestRunOutput({ * name: instance_test.name, * }); * ``` */ function getConnectivityTestRunOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("gcp:networkmanagement/getConnectivityTestRun:getConnectivityTestRun", { "name": args.name, "project": args.project, }, opts); } exports.getConnectivityTestRunOutput = getConnectivityTestRunOutput; //# sourceMappingURL=getConnectivityTestRun.js.map