import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a VPC network or legacy network resource on GCP. * * To get more information about Network, see: * * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/networks) * * How-to Guides * * [Official Documentation](https://cloud.google.com/vpc/docs/vpc) * * ## Example Usage * * ### Network Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const vpcNetwork = new gcp.compute.Network("vpc_network", {name: "vpc-network"}); * ``` * ### Network Custom Mtu * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const vpcNetwork = new gcp.compute.Network("vpc_network", { * project: "my-project-name", * name: "vpc-network", * autoCreateSubnetworks: true, * mtu: 1460, * }); * ``` * ### Network Custom Firewall Enforcement Order * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const vpcNetwork = new gcp.compute.Network("vpc_network", { * project: "my-project-name", * name: "vpc-network", * autoCreateSubnetworks: true, * networkFirewallPolicyEnforcementOrder: "BEFORE_CLASSIC_FIREWALL", * }); * ``` * ### Network Bgp Best Path Selection Mode * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const vpcNetwork = new gcp.compute.Network("vpc_network", { * project: "my-project-name", * name: "vpc-network", * routingMode: "GLOBAL", * }); * ``` * ### Network Bgp Best Path Selection Mode Standard * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const vpcNetwork = new gcp.compute.Network("vpc_network", { * project: "my-project-name", * name: "vpc-network", * routingMode: "GLOBAL", * bgpBestPathSelectionMode: "STANDARD", * }); * ``` * ### Network Bgp Best Path Selection Mode Standard Custom Fields * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const vpcNetwork = new gcp.compute.Network("vpc_network", { * project: "my-project-name", * name: "vpc-network", * routingMode: "GLOBAL", * bgpBestPathSelectionMode: "STANDARD", * bgpAlwaysCompareMed: true, * bgpInterRegionCost: "ADD_COST_TO_MED", * }); * ``` * * ## Import * * Network can be imported using any of these accepted formats: * * * `projects/{{project}}/global/networks/{{name}}` * * * `{{project}}/{{name}}` * * * `{{name}}` * * When using the `pulumi import` command, Network can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:compute/network:Network default projects/{{project}}/global/networks/{{name}} * ``` * * ```sh * $ pulumi import gcp:compute/network:Network default {{project}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:compute/network:Network default {{name}} * ``` */ export declare class Network extends pulumi.CustomResource { /** * Get an existing Network resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: NetworkState, opts?: pulumi.CustomResourceOptions): Network; /** * Returns true if the given object is an instance of Network. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Network; /** * When set to `true`, the network is created in "auto subnet mode" and * it will create a subnet for each region automatically across the * `10.128.0.0/9` address range. * When set to `false`, the network is created in "custom subnet mode" so * the user can explicitly connect subnetwork resources. */ readonly autoCreateSubnetworks: pulumi.Output; /** * Enables/disables the comparison of MED across routes with different Neighbor ASNs. * This value can only be set if the --bgp-best-path-selection-mode is STANDARD */ readonly bgpAlwaysCompareMed: pulumi.Output; /** * The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. * Possible values are: `LEGACY`, `STANDARD`. */ readonly bgpBestPathSelectionMode: pulumi.Output; /** * Choice of the behavior of inter-regional cost and MED in the BPS algorithm. * Possible values are: `DEFAULT`, `ADD_COST_TO_MED`. */ readonly bgpInterRegionCost: pulumi.Output; /** * If set to `true`, default routes (`0.0.0.0/0`) will be deleted * immediately after network creation. Defaults to `false`. */ readonly deleteDefaultRoutesOnCreate: pulumi.Output; /** * An optional description of this resource. The resource must be * recreated to modify this field. */ readonly description: pulumi.Output; /** * Enable ULA internal ipv6 on this network. Enabling this feature will assign * a /48 from google defined ULA prefix fd20::/20. */ readonly enableUlaInternalIpv6: pulumi.Output; /** * The gateway address for default routing out of the network. This value * is selected by GCP. */ readonly gatewayIpv4: pulumi.Output; /** * When enabling ula internal ipv6, caller optionally can specify the /48 range * they want from the google defined ULA prefix fd20::/20. The input must be a * valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will * fail if the speficied /48 is already in used by another resource. * If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. */ readonly internalIpv6Range: pulumi.Output; /** * Maximum Transmission Unit in bytes. The default value is 1460 bytes. * The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). * Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped * with an ICMP `Fragmentation-Needed` message if the packets are routed to the Internet or other VPCs * with varying MTUs. */ readonly mtu: pulumi.Output; /** * Name of the resource. Provided by the client when the resource is * created. The name must be 1-63 characters long, and comply with * RFC1035. Specifically, the name must be 1-63 characters long and match * the regular expression `a-z?` which means the * first character must be a lowercase letter, and all following * characters must be a dash, lowercase letter, or digit, except the last * character, which cannot be a dash. */ readonly name: pulumi.Output; /** * Set the order that Firewall Rules and Firewall Policies are evaluated. * Default value is `AFTER_CLASSIC_FIREWALL`. * Possible values are: `BEFORE_CLASSIC_FIREWALL`, `AFTER_CLASSIC_FIREWALL`. */ readonly networkFirewallPolicyEnforcementOrder: pulumi.Output; /** * The unique identifier for the resource. This identifier is defined by the server. */ readonly networkId: pulumi.Output; /** * A full or partial URL of the network profile to apply to this network. * This field can be set only at resource creation time. For example, the * following are valid URLs: * * https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name} * * projects/{projectId}/global/networkProfiles/{network_profile_name} */ readonly networkProfile: pulumi.Output; /** * (Deprecated) * The unique identifier for the resource. This identifier is defined by the server. * * @deprecated `numericId` is deprecated and will be removed in a future major release. Use `networkId` instead. */ readonly numericId: pulumi.Output; /** * Additional params passed with the request, but not persisted as part of resource payload * Structure is documented below. */ readonly params: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The network-wide routing mode to use. If set to `REGIONAL`, this * network's cloud routers will only advertise routes with subnetworks * of this network in the same region as the router. If set to `GLOBAL`, * this network's cloud routers will advertise routes with all * subnetworks of this network, across regions. * Possible values are: `REGIONAL`, `GLOBAL`. */ readonly routingMode: pulumi.Output; /** * The URI of the created resource. */ readonly selfLink: pulumi.Output; /** * Create a Network resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: NetworkArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Network resources. */ export interface NetworkState { /** * When set to `true`, the network is created in "auto subnet mode" and * it will create a subnet for each region automatically across the * `10.128.0.0/9` address range. * When set to `false`, the network is created in "custom subnet mode" so * the user can explicitly connect subnetwork resources. */ autoCreateSubnetworks?: pulumi.Input; /** * Enables/disables the comparison of MED across routes with different Neighbor ASNs. * This value can only be set if the --bgp-best-path-selection-mode is STANDARD */ bgpAlwaysCompareMed?: pulumi.Input; /** * The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. * Possible values are: `LEGACY`, `STANDARD`. */ bgpBestPathSelectionMode?: pulumi.Input; /** * Choice of the behavior of inter-regional cost and MED in the BPS algorithm. * Possible values are: `DEFAULT`, `ADD_COST_TO_MED`. */ bgpInterRegionCost?: pulumi.Input; /** * If set to `true`, default routes (`0.0.0.0/0`) will be deleted * immediately after network creation. Defaults to `false`. */ deleteDefaultRoutesOnCreate?: pulumi.Input; /** * An optional description of this resource. The resource must be * recreated to modify this field. */ description?: pulumi.Input; /** * Enable ULA internal ipv6 on this network. Enabling this feature will assign * a /48 from google defined ULA prefix fd20::/20. */ enableUlaInternalIpv6?: pulumi.Input; /** * The gateway address for default routing out of the network. This value * is selected by GCP. */ gatewayIpv4?: pulumi.Input; /** * When enabling ula internal ipv6, caller optionally can specify the /48 range * they want from the google defined ULA prefix fd20::/20. The input must be a * valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will * fail if the speficied /48 is already in used by another resource. * If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. */ internalIpv6Range?: pulumi.Input; /** * Maximum Transmission Unit in bytes. The default value is 1460 bytes. * The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). * Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped * with an ICMP `Fragmentation-Needed` message if the packets are routed to the Internet or other VPCs * with varying MTUs. */ mtu?: pulumi.Input; /** * Name of the resource. Provided by the client when the resource is * created. The name must be 1-63 characters long, and comply with * RFC1035. Specifically, the name must be 1-63 characters long and match * the regular expression `a-z?` which means the * first character must be a lowercase letter, and all following * characters must be a dash, lowercase letter, or digit, except the last * character, which cannot be a dash. */ name?: pulumi.Input; /** * Set the order that Firewall Rules and Firewall Policies are evaluated. * Default value is `AFTER_CLASSIC_FIREWALL`. * Possible values are: `BEFORE_CLASSIC_FIREWALL`, `AFTER_CLASSIC_FIREWALL`. */ networkFirewallPolicyEnforcementOrder?: pulumi.Input; /** * The unique identifier for the resource. This identifier is defined by the server. */ networkId?: pulumi.Input; /** * A full or partial URL of the network profile to apply to this network. * This field can be set only at resource creation time. For example, the * following are valid URLs: * * https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name} * * projects/{projectId}/global/networkProfiles/{network_profile_name} */ networkProfile?: pulumi.Input; /** * (Deprecated) * The unique identifier for the resource. This identifier is defined by the server. * * @deprecated `numericId` is deprecated and will be removed in a future major release. Use `networkId` instead. */ numericId?: pulumi.Input; /** * Additional params passed with the request, but not persisted as part of resource payload * Structure is documented below. */ params?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The network-wide routing mode to use. If set to `REGIONAL`, this * network's cloud routers will only advertise routes with subnetworks * of this network in the same region as the router. If set to `GLOBAL`, * this network's cloud routers will advertise routes with all * subnetworks of this network, across regions. * Possible values are: `REGIONAL`, `GLOBAL`. */ routingMode?: pulumi.Input; /** * The URI of the created resource. */ selfLink?: pulumi.Input; } /** * The set of arguments for constructing a Network resource. */ export interface NetworkArgs { /** * When set to `true`, the network is created in "auto subnet mode" and * it will create a subnet for each region automatically across the * `10.128.0.0/9` address range. * When set to `false`, the network is created in "custom subnet mode" so * the user can explicitly connect subnetwork resources. */ autoCreateSubnetworks?: pulumi.Input; /** * Enables/disables the comparison of MED across routes with different Neighbor ASNs. * This value can only be set if the --bgp-best-path-selection-mode is STANDARD */ bgpAlwaysCompareMed?: pulumi.Input; /** * The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. * Possible values are: `LEGACY`, `STANDARD`. */ bgpBestPathSelectionMode?: pulumi.Input; /** * Choice of the behavior of inter-regional cost and MED in the BPS algorithm. * Possible values are: `DEFAULT`, `ADD_COST_TO_MED`. */ bgpInterRegionCost?: pulumi.Input; /** * If set to `true`, default routes (`0.0.0.0/0`) will be deleted * immediately after network creation. Defaults to `false`. */ deleteDefaultRoutesOnCreate?: pulumi.Input; /** * An optional description of this resource. The resource must be * recreated to modify this field. */ description?: pulumi.Input; /** * Enable ULA internal ipv6 on this network. Enabling this feature will assign * a /48 from google defined ULA prefix fd20::/20. */ enableUlaInternalIpv6?: pulumi.Input; /** * When enabling ula internal ipv6, caller optionally can specify the /48 range * they want from the google defined ULA prefix fd20::/20. The input must be a * valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will * fail if the speficied /48 is already in used by another resource. * If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. */ internalIpv6Range?: pulumi.Input; /** * Maximum Transmission Unit in bytes. The default value is 1460 bytes. * The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). * Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped * with an ICMP `Fragmentation-Needed` message if the packets are routed to the Internet or other VPCs * with varying MTUs. */ mtu?: pulumi.Input; /** * Name of the resource. Provided by the client when the resource is * created. The name must be 1-63 characters long, and comply with * RFC1035. Specifically, the name must be 1-63 characters long and match * the regular expression `a-z?` which means the * first character must be a lowercase letter, and all following * characters must be a dash, lowercase letter, or digit, except the last * character, which cannot be a dash. */ name?: pulumi.Input; /** * Set the order that Firewall Rules and Firewall Policies are evaluated. * Default value is `AFTER_CLASSIC_FIREWALL`. * Possible values are: `BEFORE_CLASSIC_FIREWALL`, `AFTER_CLASSIC_FIREWALL`. */ networkFirewallPolicyEnforcementOrder?: pulumi.Input; /** * A full or partial URL of the network profile to apply to this network. * This field can be set only at resource creation time. For example, the * following are valid URLs: * * https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name} * * projects/{projectId}/global/networkProfiles/{network_profile_name} */ networkProfile?: pulumi.Input; /** * Additional params passed with the request, but not persisted as part of resource payload * Structure is documented below. */ params?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The network-wide routing mode to use. If set to `REGIONAL`, this * network's cloud routers will only advertise routes with subnetworks * of this network in the same region as the router. If set to `GLOBAL`, * this network's cloud routers will advertise routes with all * subnetworks of this network, across regions. * Possible values are: `REGIONAL`, `GLOBAL`. */ routingMode?: pulumi.Input; }