Module compute

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.

Resources

Functions

Others

Resources

Resource Address

class Address extends CustomResource

Represents an Address resource.

Each virtual machine instance has an ephemeral internal IP address and, optionally, an external IP address. To communicate between instances on the same network, you can use an instance’s internal IP address. To communicate with the Internet and instances outside of the same network, you must specify the instance’s external IP address.

Internal IP addresses are ephemeral and only belong to an instance for the lifetime of the instance; if the instance is deleted and recreated, the instance is assigned a new internal IP address, either by Compute Engine or by you. External IP addresses can be either ephemeral or static.

To get more information about Address, see:

Example Usage - Address Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const ipAddress = new gcp.compute.Address("ipAddress", {});

Example Usage - Address With Subnetwork

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultNetwork = new gcp.compute.Network("defaultNetwork", {});
const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", {
    ipCidrRange: "10.0.0.0/16",
    region: "us-central1",
    network: defaultNetwork.id,
});
const internalWithSubnetAndAddress = new gcp.compute.Address("internalWithSubnetAndAddress", {
    subnetwork: defaultSubnetwork.id,
    addressType: "INTERNAL",
    address: "10.0.42.42",
    region: "us-central1",
});

Example Usage - Address With Gce Endpoint

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const internalWithGceEndpoint = new gcp.compute.Address("internalWithGceEndpoint", {
    addressType: "INTERNAL",
    purpose: "GCE_ENDPOINT",
});

Example Usage - Instance With Ip

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const static = new gcp.compute.Address("static", {});
const debianImage = gcp.compute.getImage({
    family: "debian-9",
    project: "debian-cloud",
});
const instanceWithIp = new gcp.compute.Instance("instanceWithIp", {
    machineType: "f1-micro",
    zone: "us-central1-a",
    boot_disk: {
        initialize_params: {
            image: debianImage.then(debianImage => debianImage.selfLink),
        },
    },
    network_interface: [{
        network: "default",
        access_config: [{
            natIp: static.address,
        }],
    }],
});

constructor

new Address(name: string, args?: AddressArgs, opts?: pulumi.CustomResourceOptions)

Create a Address resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AddressState, opts?: pulumi.CustomResourceOptions): Address

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Address

Returns true if the given object is an instance of Address. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property address

public address: pulumi.Output<string>;

The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any.

property addressType

public addressType: pulumi.Output<string | undefined>;

The type of address to reserve.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;

An optional description of this resource.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;

The fingerprint used for optimistic locking of this resource. Used internally during updates.

property labels

public labels: pulumi.Output<{[key: string]: string} | undefined>;

Labels to apply to this address. A list of key->value pairs.

property name

public name: pulumi.Output<string>;

Name of the resource. 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.

property networkTier

public networkTier: pulumi.Output<string>;

The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property purpose

public purpose: pulumi.Output<string>;

The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. This should only be set when using an Internal address.

property region

public region: pulumi.Output<string>;

The Region in which the created address should reside. If it is not provided, the provider region is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property subnetwork

public subnetwork: pulumi.Output<string>;

The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork’s IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property users

public users: pulumi.Output<string[]>;

The URLs of the resources that are using this address.

Resource AttachedDisk

class AttachedDisk extends CustomResource

Persistent disks can be attached to a compute instance using the attachedDisk section within the compute instance configuration. However there may be situations where managing the attached disks via the compute instance config isn’t preferable or possible, such as attaching dynamic numbers of disks using the count variable.

To get more information about attaching disks, see:

Note: When using gcp.compute.AttachedDisk you must use lifecycle.ignore_changes = ["attachedDisk"] on the gcp.compute.Instance resource that has the disks attached. Otherwise the two resources will fight for control of the attached disk block.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultInstance = new gcp.compute.Instance("defaultInstance", {
    machineType: "n1-standard-1",
    zone: "us-west1-a",
    boot_disk: {
        initialize_params: {
            image: "debian-cloud/debian-9",
        },
    },
    network_interface: [{
        network: "default",
    }],
});
const defaultAttachedDisk = new gcp.compute.AttachedDisk("defaultAttachedDisk", {
    disk: google_compute_disk["default"].id,
    instance: defaultInstance.id,
});

constructor

new AttachedDisk(name: string, args: AttachedDiskArgs, opts?: pulumi.CustomResourceOptions)

Create a AttachedDisk resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AttachedDiskState, opts?: pulumi.CustomResourceOptions): AttachedDisk

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is AttachedDisk

Returns true if the given object is an instance of AttachedDisk. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property deviceName

public deviceName: pulumi.Output<string>;

Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.

property disk

public disk: pulumi.Output<string>;

name or selfLink of the disk that will be attached.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instance

public instance: pulumi.Output<string>;

name or selfLink of the compute instance that the disk will be attached to. If the selfLink is provided then zone and project are extracted from the self link. If only the name is used then zone and project must be defined as properties on the resource or provider.

property mode

public mode: pulumi.Output<string | undefined>;

The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.

property project

public project: pulumi.Output<string>;

The project that the referenced compute instance is a part of. If instance is referenced by its selfLink the project defined in the link will take precedence.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;

The zone that the referenced compute instance is located within. If instance is referenced by its selfLink the zone defined in the link will take precedence.

Resource Autoscalar

DEPRECATED gcp.compute.Autoscalar has been deprecated in favor of gcp.compute.Autoscaler
class Autoscalar extends CustomResource

constructor

DEPRECATED gcp.compute.Autoscalar has been deprecated in favor of gcp.compute.Autoscaler
DEPRECATED gcp.compute.Autoscalar has been deprecated in favor of gcp.compute.Autoscaler
new Autoscalar(name: string, args: AutoscalarArgs, opts?: pulumi.CustomResourceOptions)

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AutoscalarState, opts?: pulumi.CustomResourceOptions): Autoscalar
Get an existing Autoscalar resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Autoscalar
Returns true if the given object is an instance of Autoscalar. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property autoscalingPolicy

public autoscalingPolicy: pulumi.Output<AutoscalarAutoscalingPolicy>;
The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. Structure is documented below.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;
The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property target

public target: pulumi.Output<string>;
Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;
URL of the zone where the instance group resides.

Resource Autoscaler

class Autoscaler extends CustomResource
Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. To get more information about Autoscaler, see: * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/autoscalers) * How-to Guides * [Autoscaling Groups of Instances](https://cloud.google.com/compute/docs/autoscaler/) #### Example Usage - Autoscaler Single Instance ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const debian9 = gcp.compute.getImage({ family: "debian-9", project: "debian-cloud", }); const defaultInstanceTemplate = new gcp.compute.InstanceTemplate("defaultInstanceTemplate", { machineType: "n1-standard-1", canIpForward: false, tags: [ "foo", "bar", ], disk: [{ sourceImage: debian9.then(debian9 => debian9.selfLink), }], network_interface: [{ network: "default", }], metadata: { foo: "bar", }, service_account: { scopes: [ "userinfo-email", "compute-ro", "storage-ro", ], }, }); const defaultTargetPool = new gcp.compute.TargetPool("defaultTargetPool", {}); const defaultInstanceGroupManager = new gcp.compute.InstanceGroupManager("defaultInstanceGroupManager", { zone: "us-central1-f", version: [{ instanceTemplate: defaultInstanceTemplate.id, name: "primary", }], targetPools: [defaultTargetPool.id], baseInstanceName: "autoscaler-sample", }); const defaultAutoscaler = new gcp.compute.Autoscaler("defaultAutoscaler", { zone: "us-central1-f", target: defaultInstanceGroupManager.id, autoscaling_policy: { maxReplicas: 5, minReplicas: 1, cooldownPeriod: 60, metric: [{ name: "pubsub.googleapis.com/subscription/num_undelivered_messages", filter: "resource.type = pubsubSubscription AND resource.label.subscription_id = our-subscription", singleInstanceAssignment: 65535, }], }, }); ``` #### Example Usage - Autoscaler Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const debian9 = gcp.compute.getImage({ family: "debian-9", project: "debian-cloud", }); const foobarInstanceTemplate = new gcp.compute.InstanceTemplate("foobarInstanceTemplate", { machineType: "n1-standard-1", canIpForward: false, tags: [ "foo", "bar", ], disk: [{ sourceImage: debian9.then(debian9 => debian9.selfLink), }], network_interface: [{ network: "default", }], metadata: { foo: "bar", }, service_account: { scopes: [ "userinfo-email", "compute-ro", "storage-ro", ], }, }); const foobarTargetPool = new gcp.compute.TargetPool("foobarTargetPool", {}); const foobarInstanceGroupManager = new gcp.compute.InstanceGroupManager("foobarInstanceGroupManager", { zone: "us-central1-f", version: [{ instanceTemplate: foobarInstanceTemplate.id, name: "primary", }], targetPools: [foobarTargetPool.id], baseInstanceName: "foobar", }); const foobarAutoscaler = new gcp.compute.Autoscaler("foobarAutoscaler", { zone: "us-central1-f", target: foobarInstanceGroupManager.id, autoscaling_policy: { maxReplicas: 5, minReplicas: 1, cooldownPeriod: 60, cpu_utilization: { target: 0.5, }, }, }); ```

constructor

new Autoscaler(name: string, args: AutoscalerArgs, opts?: pulumi.CustomResourceOptions)
Create a Autoscaler resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AutoscalerState, opts?: pulumi.CustomResourceOptions): Autoscaler
Get an existing Autoscaler resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Autoscaler
Returns true if the given object is an instance of Autoscaler. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property autoscalingPolicy

public autoscalingPolicy: pulumi.Output<AutoscalerAutoscalingPolicy>;
The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. Structure is documented below.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;
The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property target

public target: pulumi.Output<string>;
Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;
URL of the zone where the instance group resides.

Resource BackendBucket

class BackendBucket extends CustomResource
Backend buckets allow you to use Google Cloud Storage buckets with HTTP(S) load balancing. An HTTP(S) load balancer can direct traffic to specified URLs to a backend bucket rather than a backend service. It can send requests for static content to a Cloud Storage bucket and requests for dynamic content to a virtual machine instance. To get more information about BackendBucket, see: * [API documentation](https://cloud.google.com/compute/docs/reference/v1/backendBuckets) * How-to Guides * [Using a Cloud Storage bucket as a load balancer backend](https://cloud.google.com/compute/docs/load-balancing/http/backend-bucket) #### Example Usage - Backend Bucket Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const imageBucket = new gcp.storage.Bucket("imageBucket", {location: "EU"}); const imageBackend = new gcp.compute.BackendBucket("imageBackend", { description: "Contains beautiful images", bucketName: imageBucket.name, enableCdn: true, }); ```

constructor

new BackendBucket(name: string, args: BackendBucketArgs, opts?: pulumi.CustomResourceOptions)
Create a BackendBucket resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BackendBucketState, opts?: pulumi.CustomResourceOptions): BackendBucket
Get an existing BackendBucket resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is BackendBucket
Returns true if the given object is an instance of BackendBucket. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property bucketName

public bucketName: pulumi.Output<string>;
Cloud Storage bucket name.

property cdnPolicy

public cdnPolicy: pulumi.Output<BackendBucketCdnPolicy>;
Cloud CDN configuration for this Backend Bucket. Structure is documented below.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;
An optional textual description of the resource; provided by the client when the resource is created.

property enableCdn

public enableCdn: pulumi.Output<boolean | undefined>;
If true, enable Cloud CDN for this BackendBucket.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;
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.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource BackendBucketSignedUrlKey

class BackendBucketSignedUrlKey extends CustomResource
A key for signing Cloud CDN signed URLs for BackendBuckets. To get more information about BackendBucketSignedUrlKey, see: * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/backendBuckets) * How-to Guides * [Using Signed URLs](https://cloud.google.com/cdn/docs/using-signed-urls/) > **Warning:** All arguments including `keyValue` will be stored in the raw state as plain-text. #### Example Usage - Backend Bucket Signed Url Key ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const bucket = new gcp.storage.Bucket("bucket", {location: "EU"}); const testBackend = new gcp.compute.BackendBucket("testBackend", { description: "Contains beautiful images", bucketName: bucket.name, enableCdn: true, }); const backendKey = new gcp.compute.BackendBucketSignedUrlKey("backendKey", { keyValue: "pPsVemX8GM46QVeezid6Rw==", backendBucket: testBackend.name, }); ```

constructor

new BackendBucketSignedUrlKey(name: string, args: BackendBucketSignedUrlKeyArgs, opts?: pulumi.CustomResourceOptions)
Create a BackendBucketSignedUrlKey resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BackendBucketSignedUrlKeyState, opts?: pulumi.CustomResourceOptions): BackendBucketSignedUrlKey
Get an existing BackendBucketSignedUrlKey resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is BackendBucketSignedUrlKey
Returns true if the given object is an instance of BackendBucketSignedUrlKey. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property backendBucket

public backendBucket: pulumi.Output<string>;
The backend bucket this signed URL key belongs.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property keyValue

public keyValue: pulumi.Output<string>;
128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. **Note**: This property is sensitive and will not be displayed in the plan.

property name

public name: pulumi.Output<string>;
Name of the signed URL key.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource BackendService

class BackendService extends CustomResource
A Backend Service defines a group of virtual machines that will serve traffic for load balancing. This resource is a global backend service, appropriate for external load balancing or self-managed internal load balancing. For managed internal load balancing, use a regional backend service instead. Currently self-managed internal load balancing is only available in beta. To get more information about BackendService, see: * [API documentation](https://cloud.google.com/compute/docs/reference/v1/backendServices) * How-to Guides * [Official Documentation](https://cloud.google.com/compute/docs/load-balancing/http/backend-service) #### Example Usage - Backend Service Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const defaultHttpHealthCheck = new gcp.compute.HttpHealthCheck("defaultHttpHealthCheck", { requestPath: "/", checkIntervalSec: 1, timeoutSec: 1, }); const defaultBackendService = new gcp.compute.BackendService("defaultBackendService", {healthChecks: [defaultHttpHealthCheck.id]}); ``` #### Example Usage - Backend Service Traffic Director Round Robin ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const healthCheck = new gcp.compute.HealthCheck("healthCheck", {http_health_check: { port: 80, }}); const _default = new gcp.compute.BackendService("default", { healthChecks: [healthCheck.id], loadBalancingScheme: "INTERNAL_SELF_MANAGED", localityLbPolicy: "ROUND_ROBIN", }); ``` #### Example Usage - Backend Service Traffic Director Ring Hash ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const healthCheck = new gcp.compute.HealthCheck("healthCheck", {http_health_check: { port: 80, }}); const _default = new gcp.compute.BackendService("default", { healthChecks: [healthCheck.id], loadBalancingScheme: "INTERNAL_SELF_MANAGED", localityLbPolicy: "RING_HASH", sessionAffinity: "HTTP_COOKIE", circuit_breakers: { maxConnections: 10, }, consistent_hash: { http_cookie: { ttl: { seconds: 11, nanos: 1111, }, name: "mycookie", }, }, outlier_detection: { consecutiveErrors: 2, }, }); ```

constructor

new BackendService(name: string, args: BackendServiceArgs, opts?: pulumi.CustomResourceOptions)
Create a BackendService resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BackendServiceState, opts?: pulumi.CustomResourceOptions): BackendService
Get an existing BackendService resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is BackendService
Returns true if the given object is an instance of BackendService. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property affinityCookieTtlSec

public affinityCookieTtlSec: pulumi.Output<number | undefined>;
Lifetime of cookies in seconds if sessionAffinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used.

property backends

public backends: pulumi.Output<BackendServiceBackend[] | undefined>;
The set of backends that serve this BackendService. Structure is documented below.

property cdnPolicy

public cdnPolicy: pulumi.Output<BackendServiceCdnPolicy>;
Cloud CDN configuration for this BackendService. Structure is documented below.

property circuitBreakers

public circuitBreakers: pulumi.Output<BackendServiceCircuitBreakers | undefined>;
Settings controlling the volume of connections to a backend service. This field is applicable only when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. Structure is documented below.

property connectionDrainingTimeoutSec

public connectionDrainingTimeoutSec: pulumi.Output<number | undefined>;
Time for which instance will be drained (not accept new connections, but still work to finish started).

property consistentHash

public consistentHash: pulumi.Output<BackendServiceConsistentHash | undefined>;
Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies if the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH. Structure is documented below.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property customRequestHeaders

public customRequestHeaders: pulumi.Output<string[] | undefined>;
Headers that the HTTP/S load balancer should add to proxied requests.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource. Provide this property when you create the resource.

property enableCdn

public enableCdn: pulumi.Output<boolean | undefined>;
If true, enable Cloud CDN for this BackendService.

property fingerprint

public fingerprint: pulumi.Output<string>;
Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.

property healthChecks

public healthChecks: pulumi.Output<string>;
The set of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required. For internal load balancing, a URL to a HealthCheck resource must be specified instead.

property iap

public iap: pulumi.Output<BackendServiceIap | undefined>;
Settings for enabling Cloud Identity Aware Proxy Structure is documented below.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property loadBalancingScheme

public loadBalancingScheme: pulumi.Output<string | undefined>;
Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other.

property localityLbPolicy

public localityLbPolicy: pulumi.Output<string | undefined>;
The load balancing algorithm used within the scope of the locality. The possible values are - ROUND_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. RING_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. RANDOM - The load balancer selects a random healthy host. ORIGINAL_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.

property logConfig

public logConfig: pulumi.Output<BackendServiceLogConfig>;
This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. Structure is documented below.

property name

public name: pulumi.Output<string>;
Name of the cookie.

property outlierDetection

public outlierDetection: pulumi.Output<BackendServiceOutlierDetection | undefined>;
Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. Structure is documented below.

property portName

public portName: pulumi.Output<string>;
Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property protocol

public protocol: pulumi.Output<string>;
The protocol this BackendService uses to communicate with backends. The default is HTTP. **NOTE**: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API.

property securityPolicy

public securityPolicy: pulumi.Output<string | undefined>;
The security policy associated with this backend service.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property sessionAffinity

public sessionAffinity: pulumi.Output<string>;
Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP.

property timeoutSec

public timeoutSec: pulumi.Output<number>;
How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400].

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource BackendServiceSignedUrlKey

class BackendServiceSignedUrlKey extends CustomResource
A key for signing Cloud CDN signed URLs for Backend Services. To get more information about BackendServiceSignedUrlKey, see: * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) * How-to Guides * [Using Signed URLs](https://cloud.google.com/cdn/docs/using-signed-urls/) > **Warning:** All arguments including `keyValue` will be stored in the raw state as plain-text. #### Example Usage - Backend Service Signed Url Key ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const webserver = new gcp.compute.InstanceTemplate("webserver", { machineType: "n1-standard-1", network_interface: [{ network: "default", }], disk: [{ sourceImage: "debian-cloud/debian-9", autoDelete: true, boot: true, }], }); const webservers = new gcp.compute.InstanceGroupManager("webservers", { version: [{ instanceTemplate: webserver.id, name: "primary", }], baseInstanceName: "webserver", zone: "us-central1-f", targetSize: 1, }); const _default = new gcp.compute.HttpHealthCheck("default", { requestPath: "/", checkIntervalSec: 1, timeoutSec: 1, }); const exampleBackend = new gcp.compute.BackendService("exampleBackend", { description: "Our company website", portName: "http", protocol: "HTTP", timeoutSec: 10, enableCdn: true, backend: [{ group: webservers.instanceGroup, }], healthChecks: [_default.id], }); const backendKey = new gcp.compute.BackendServiceSignedUrlKey("backendKey", { keyValue: "pPsVemX8GM46QVeezid6Rw==", backendService: exampleBackend.name, }); ```

constructor

new BackendServiceSignedUrlKey(name: string, args: BackendServiceSignedUrlKeyArgs, opts?: pulumi.CustomResourceOptions)
Create a BackendServiceSignedUrlKey resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BackendServiceSignedUrlKeyState, opts?: pulumi.CustomResourceOptions): BackendServiceSignedUrlKey
Get an existing BackendServiceSignedUrlKey resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is BackendServiceSignedUrlKey
Returns true if the given object is an instance of BackendServiceSignedUrlKey. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property backendService

public backendService: pulumi.Output<string>;
The backend service this signed URL key belongs.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property keyValue

public keyValue: pulumi.Output<string>;
128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. **Note**: This property is sensitive and will not be displayed in the plan.

property name

public name: pulumi.Output<string>;
Name of the signed URL key.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Disk

class Disk extends CustomResource
Persistent disks are durable storage devices that function similarly to the physical disks in a desktop or a server. Compute Engine manages the hardware behind these devices to ensure data redundancy and optimize performance for you. Persistent disks are available as either standard hard disk drives (HDD) or solid-state drives (SSD). Persistent disks are located independently from your virtual machine instances, so you can detach or move persistent disks to keep your data even after you delete your instances. Persistent disk performance scales automatically with size, so you can resize your existing persistent disks or add more persistent disks to an instance to meet your performance and storage space requirements. Add a persistent disk to your instance when you need reliable and affordable storage with consistent performance characteristics. To get more information about Disk, see: * [API documentation](https://cloud.google.com/compute/docs/reference/v1/disks) * How-to Guides * [Adding a persistent disk](https://cloud.google.com/compute/docs/disks/add-persistent-disk) > **Warning:** All arguments including `disk_encryption_key.raw_key` will be stored in the raw state as plain-text. [Read more about secrets in state](https://www.pulumi.com/docs/intro/concepts/programming-model/#secrets). #### Example Usage - Disk Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const defaultDisk = new gcp.compute.Disk("default", { image: "debian-8-jessie-v20170523", labels: { environment: "dev", }, physicalBlockSizeBytes: 4096, type: "pd-ssd", zone: "us-central1-a", }); ```

constructor

new Disk(name: string, args?: DiskArgs, opts?: pulumi.CustomResourceOptions)
Create a Disk resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DiskState, opts?: pulumi.CustomResourceOptions): Disk
Get an existing Disk resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Disk
Returns true if the given object is an instance of Disk. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource. Provide this property when you create the resource.

property diskEncryptionKey

public diskEncryptionKey: pulumi.Output<DiskDiskEncryptionKey | undefined>;
Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property image

public image: pulumi.Output<string | undefined>;
The image from which to initialize this disk. This can be one of: the image's `selfLink`, `projects/{project}/global/images/{image}`, `projects/{project}/global/images/family/{family}`, `global/images/{image}`, `global/images/family/{family}`, `family/{family}`, `{project}/{family}`, `{project}/{image}`, `{family}`, or `{image}`. If referred by family, the images names must include the family name. If they don't, use the [gcp.compute.Image data source](https://www.terraform.io/docs/providers/google/d/datasource_compute_image.html). For instance, the image `centos-6-v20180104` includes its family name `centos-6`. These images can be referred by family name here.

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;
The fingerprint used for optimistic locking of this resource. Used internally during updates.

property labels

public labels: pulumi.Output<{[key: string]: string} | undefined>;
Labels to apply to this disk. A list of key->value pairs.

property lastAttachTimestamp

public lastAttachTimestamp: pulumi.Output<string>;
Last attach timestamp in RFC3339 text format.

property lastDetachTimestamp

public lastDetachTimestamp: pulumi.Output<string>;
Last detach timestamp in RFC3339 text format.

property name

public name: pulumi.Output<string>;
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.

property physicalBlockSizeBytes

public physicalBlockSizeBytes: pulumi.Output<number>;
Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property resourcePolicies

public resourcePolicies: pulumi.Output<string[]>;
Resource policies applied to this disk for automatic snapshot creations.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property size

public size: pulumi.Output<number>;
Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the `image` or `snapshot` parameter, or specify it alone to create an empty persistent disk. If you specify this field along with `image` or `snapshot`, the value must not be less than the size of the image or the size of the snapshot.

property snapshot

public snapshot: pulumi.Output<string | undefined>;
The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. If the snapshot is in another project than this disk, you must supply a full URL. For example, the following are valid values: * `https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot` * `projects/project/global/snapshots/snapshot` * `global/snapshots/snapshot` * `snapshot`

property sourceImageEncryptionKey

public sourceImageEncryptionKey: pulumi.Output<DiskSourceImageEncryptionKey | undefined>;
The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.

property sourceImageId

public sourceImageId: pulumi.Output<string>;
The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.

property sourceSnapshotEncryptionKey

public sourceSnapshotEncryptionKey: pulumi.Output<DiskSourceSnapshotEncryptionKey | undefined>;
The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.

property sourceSnapshotId

public sourceSnapshotId: pulumi.Output<string>;
The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.

property type

public type: pulumi.Output<string | undefined>;
URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property users

public users: pulumi.Output<string[]>;
Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance

property zone

public zone: pulumi.Output<string>;
A reference to the zone where the disk resides.

Resource DiskResourcePolicyAttachment

class DiskResourcePolicyAttachment extends CustomResource
Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. > **Note:** This resource does not support regional disks (`gcp.compute.RegionDisk`). For regional disks, please refer to the `gcp.compute.RegionDiskResourcePolicyAttachment` resource. #### Example Usage ##### Disk Resource Policy Attachment Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const myImage = gcp.compute.getImage({ family: "debian-9", project: "debian-cloud", }); const ssd = new gcp.compute.Disk("ssd", { image: myImage.then(myImage => myImage.selfLink), size: 50, type: "pd-ssd", zone: "us-central1-a", }); const attachment = new gcp.compute.DiskResourcePolicyAttachment("attachment", { disk: ssd.name, zone: "us-central1-a", }); const policy = new gcp.compute.ResourcePolicy("policy", { region: "us-central1", snapshot_schedule_policy: { schedule: { daily_schedule: { daysInCycle: 1, startTime: "04:00", }, }, }, }); ```

constructor

new DiskResourcePolicyAttachment(name: string, args: DiskResourcePolicyAttachmentArgs, opts?: pulumi.CustomResourceOptions)
Create a DiskResourcePolicyAttachment resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DiskResourcePolicyAttachmentState, opts?: pulumi.CustomResourceOptions): DiskResourcePolicyAttachment
Get an existing DiskResourcePolicyAttachment resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is DiskResourcePolicyAttachment
Returns true if the given object is an instance of DiskResourcePolicyAttachment. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property disk

public disk: pulumi.Output<string>;
The name of the disk in which the resource policies are attached to.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;
The resource policy to be attached to the disk for scheduling snapshot creation. Do not specify the self link.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;
A reference to the zone where the disk resides.

Resource ExternalVpnGateway

class ExternalVpnGateway extends CustomResource
Represents a VPN gateway managed outside of GCP. To get more information about ExternalVpnGateway, see: * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/externalVpnGateways) #### Example Usage - External Vpn Gateway ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const network = new gcp.compute.Network("network", { routingMode: "GLOBAL", autoCreateSubnetworks: false, }); const haGateway = new gcp.compute.HaVpnGateway("haGateway", { region: "us-central1", network: network.selfLink, }); const externalGateway = new gcp.compute.ExternalVpnGateway("externalGateway", { redundancyType: "SINGLE_IP_INTERNALLY_REDUNDANT", description: "An externally managed VPN gateway", "interface": [{ id: 0, ipAddress: "8.8.8.8", }], }); const networkSubnet1 = new gcp.compute.Subnetwork("networkSubnet1", { ipCidrRange: "10.0.1.0/24", region: "us-central1", network: network.selfLink, }); const networkSubnet2 = new gcp.compute.Subnetwork("networkSubnet2", { ipCidrRange: "10.0.2.0/24", region: "us-west1", network: network.selfLink, }); const router1 = new gcp.compute.Router("router1", { network: network.name, bgp: { asn: 64514, }, }); const tunnel1 = new gcp.compute.VPNTunnel("tunnel1", { region: "us-central1", vpnGateway: haGateway.selfLink, peerExternalGateway: externalGateway.selfLink, peerExternalGatewayInterface: 0, sharedSecret: "a secret message", router: router1.selfLink, vpnGatewayInterface: 0, }); const tunnel2 = new gcp.compute.VPNTunnel("tunnel2", { region: "us-central1", vpnGateway: haGateway.selfLink, peerExternalGateway: externalGateway.selfLink, peerExternalGatewayInterface: 0, sharedSecret: "a secret message", router: pulumi.interpolate` ${router1.selfLink}`, vpnGatewayInterface: 1, }); const router1Interface1 = new gcp.compute.RouterInterface("router1Interface1", { router: router1.name, region: "us-central1", ipRange: "169.254.0.1/30", vpnTunnel: tunnel1.name, }); const router1Peer1 = new gcp.compute.RouterPeer("router1Peer1", { router: router1.name, region: "us-central1", peerIpAddress: "169.254.0.2", peerAsn: 64515, advertisedRoutePriority: 100, "interface": router1Interface1.name, }); const router1Interface2 = new gcp.compute.RouterInterface("router1Interface2", { router: router1.name, region: "us-central1", ipRange: "169.254.1.1/30", vpnTunnel: tunnel2.name, }); const router1Peer2 = new gcp.compute.RouterPeer("router1Peer2", { router: router1.name, region: "us-central1", peerIpAddress: "169.254.1.2", peerAsn: 64515, advertisedRoutePriority: 100, "interface": router1Interface2.name, }); ```

constructor

new ExternalVpnGateway(name: string, args?: ExternalVpnGatewayArgs, opts?: pulumi.CustomResourceOptions)
Create a ExternalVpnGateway resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ExternalVpnGatewayState, opts?: pulumi.CustomResourceOptions): ExternalVpnGateway
Get an existing ExternalVpnGateway resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ExternalVpnGateway
Returns true if the given object is an instance of ExternalVpnGateway. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property interfaces

public interfaces: pulumi.Output<ExternalVpnGatewayInterface[] | undefined>;
A list of interfaces on this external VPN gateway. Structure is documented below.

property name

public name: pulumi.Output<string>;
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.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property redundancyType

public redundancyType: pulumi.Output<string | undefined>;
Indicates the redundancy type of this external VPN gateway
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Firewall

class Firewall extends CustomResource
Each network has its own firewall controlling access to and from the instances. All traffic to instances, even from other instances, is blocked by the firewall unless firewall rules are created to allow it. The default network has automatically created firewall rules that are shown in default firewall rules. No manually created network has automatically created firewall rules except for a default "allow" rule for outgoing traffic and a default "deny" for incoming traffic. For all networks except the default network, you must create any firewall rules you need. To get more information about Firewall, see: * [API documentation](https://cloud.google.com/compute/docs/reference/v1/firewalls) * How-to Guides * [Official Documentation](https://cloud.google.com/vpc/docs/firewalls) #### Example Usage - Firewall Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const defaultNetwork = new gcp.compute.Network("defaultNetwork", {}); const defaultFirewall = new gcp.compute.Firewall("defaultFirewall", { network: defaultNetwork.name, allow: [ { protocol: "icmp", }, { protocol: "tcp", ports: [ "80", "8080", "1000-2000", ], }, ], sourceTags: ["web"], }); ```

constructor

new Firewall(name: string, args: FirewallArgs, opts?: pulumi.CustomResourceOptions)
Create a Firewall resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FirewallState, opts?: pulumi.CustomResourceOptions): Firewall
Get an existing Firewall resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Firewall
Returns true if the given object is an instance of Firewall. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property allows

public allows: pulumi.Output<FirewallAllow[] | undefined>;
The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. Structure is documented below.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property denies

public denies: pulumi.Output<FirewallDeny[] | undefined>;
The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. Structure is documented below.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource. Provide this property when you create the resource.

property destinationRanges

public destinationRanges: pulumi.Output<string[]>;
If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.

property direction

public direction: pulumi.Output<string>;
Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.

property disabled

public disabled: pulumi.Output<boolean | undefined>;
Denotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.

property enableLogging

public enableLogging: pulumi.Output<boolean | undefined>;
This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;
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.

property network

public network: pulumi.Output<string>;
The name or selfLink of the network to attach this firewall to.

property priority

public priority: pulumi.Output<number | undefined>;
Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property sourceRanges

public sourceRanges: pulumi.Output<string[]>;
If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.

property sourceServiceAccounts

public sourceServiceAccounts: pulumi.Output<string[] | undefined>;
If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.

property sourceTags

public sourceTags: pulumi.Output<string[] | undefined>;
If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.

property targetServiceAccounts

public targetServiceAccounts: pulumi.Output<string[] | undefined>;
A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.

property targetTags

public targetTags: pulumi.Output<string[] | undefined>;
A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource ForwardingRule

class ForwardingRule extends CustomResource
A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, portRange] tuple. To get more information about ForwardingRule, see: * [API documentation](https://cloud.google.com/compute/docs/reference/v1/forwardingRules) * How-to Guides * [Official Documentation](https://cloud.google.com/compute/docs/load-balancing/network/forwarding-rules) #### Example Usage - Forwarding Rule Global Internallb ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const hc = new gcp.compute.HealthCheck("hc", { checkIntervalSec: 1, timeoutSec: 1, tcp_health_check: { port: "80", }, }); const backend = new gcp.compute.RegionBackendService("backend", { region: "us-central1", healthChecks: [hc.id], }); const defaultNetwork = new gcp.compute.Network("defaultNetwork", {autoCreateSubnetworks: false}); const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", { ipCidrRange: "10.0.0.0/16", region: "us-central1", network: defaultNetwork.id, }); // Forwarding rule for Internal Load Balancing const defaultForwardingRule = new gcp.compute.ForwardingRule("defaultForwardingRule", { region: "us-central1", loadBalancingScheme: "INTERNAL", backendService: backend.id, allPorts: true, allowGlobalAccess: true, network: defaultNetwork.name, subnetwork: defaultSubnetwork.name, }); ``` #### Example Usage - Forwarding Rule Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const defaultTargetPool = new gcp.compute.TargetPool("defaultTargetPool", {}); const defaultForwardingRule = new gcp.compute.ForwardingRule("defaultForwardingRule", { target: defaultTargetPool.id, portRange: "80", }); ``` #### Example Usage - Forwarding Rule Internallb ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const hc = new gcp.compute.HealthCheck("hc", { checkIntervalSec: 1, timeoutSec: 1, tcp_health_check: { port: "80", }, }); const backend = new gcp.compute.RegionBackendService("backend", { region: "us-central1", healthChecks: [hc.id], }); const defaultNetwork = new gcp.compute.Network("defaultNetwork", {autoCreateSubnetworks: false}); const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", { ipCidrRange: "10.0.0.0/16", region: "us-central1", network: defaultNetwork.id, }); // Forwarding rule for Internal Load Balancing const defaultForwardingRule = new gcp.compute.ForwardingRule("defaultForwardingRule", { region: "us-central1", loadBalancingScheme: "INTERNAL", backendService: backend.id, allPorts: true, network: defaultNetwork.name, subnetwork: defaultSubnetwork.name, }); ``` #### Example Usage - Forwarding Rule Http Lb ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const debianImage = gcp.compute.getImage({ family: "debian-9", project: "debian-cloud", }); const defaultNetwork = new gcp.compute.Network("defaultNetwork", { autoCreateSubnetworks: false, routingMode: "REGIONAL", }); const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", { ipCidrRange: "10.1.2.0/24", region: "us-central1", network: defaultNetwork.id, }); const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", { machineType: "n1-standard-1", network_interface: [{ network: defaultNetwork.id, subnetwork: defaultSubnetwork.id, }], disk: [{ sourceImage: debianImage.then(debianImage => debianImage.selfLink), autoDelete: true, boot: true, }], tags: [ "allow-ssh", "load-balanced-backend", ], }); const rigm = new gcp.compute.RegionInstanceGroupManager("rigm", { region: "us-central1", version: [{ instanceTemplate: instanceTemplate.selfLink, name: "primary", }], baseInstanceName: "internal-glb", targetSize: 1, }); const fw1 = new gcp.compute.Firewall("fw1", { network: defaultNetwork.id, sourceRanges: ["10.1.2.0/24"], allow: [ { protocol: "tcp", }, { protocol: "udp", }, { protocol: "icmp", }, ], direction: "INGRESS", }); const fw2 = new gcp.compute.Firewall("fw2", { network: defaultNetwork.id, sourceRanges: ["0.0.0.0/0"], allow: [{ protocol: "tcp", ports: ["22"], }], targetTags: ["allow-ssh"], direction: "INGRESS", }); const fw3 = new gcp.compute.Firewall("fw3", { network: defaultNetwork.id, sourceRanges: [ "130.211.0.0/22", "35.191.0.0/16", ], allow: [{ protocol: "tcp", }], targetTags: ["load-balanced-backend"], direction: "INGRESS", }); const fw4 = new gcp.compute.Firewall("fw4", { network: defaultNetwork.id, sourceRanges: ["10.129.0.0/26"], targetTags: ["load-balanced-backend"], allow: [ { protocol: "tcp", ports: ["80"], }, { protocol: "tcp", ports: ["443"], }, { protocol: "tcp", ports: ["8000"], }, ], direction: "INGRESS", }); const defaultRegionHealthCheck = new gcp.compute.RegionHealthCheck("defaultRegionHealthCheck", { region: "us-central1", http_health_check: { portSpecification: "USE_SERVING_PORT", }, }); const defaultRegionBackendService = new gcp.compute.RegionBackendService("defaultRegionBackendService", { loadBalancingScheme: "INTERNAL_MANAGED", backend: [{ group: rigm.instanceGroup, balancingMode: "UTILIZATION", capacityScaler: 1, }], region: "us-central1", protocol: "HTTP", timeoutSec: 10, healthChecks: [defaultRegionHealthCheck.id], }); const defaultRegionUrlMap = new gcp.compute.RegionUrlMap("defaultRegionUrlMap", { region: "us-central1", defaultService: defaultRegionBackendService.id, }); const defaultRegionTargetHttpProxy = new gcp.compute.RegionTargetHttpProxy("defaultRegionTargetHttpProxy", { region: "us-central1", urlMap: defaultRegionUrlMap.id, }); const proxy = new gcp.compute.Subnetwork("proxy", { ipCidrRange: "10.129.0.0/26", region: "us-central1", network: defaultNetwork.id, purpose: "INTERNAL_HTTPS_LOAD_BALANCER", role: "ACTIVE", }); // Forwarding rule for Internal Load Balancing const defaultForwardingRule = new gcp.compute.ForwardingRule("defaultForwardingRule", { region: "us-central1", ipProtocol: "TCP", loadBalancingScheme: "INTERNAL_MANAGED", portRange: "80", target: defaultRegionTargetHttpProxy.id, network: defaultNetwork.id, subnetwork: defaultSubnetwork.id, networkTier: "PREMIUM", }); ```

constructor

new ForwardingRule(name: string, args?: ForwardingRuleArgs, opts?: pulumi.CustomResourceOptions)
Create a ForwardingRule resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ForwardingRuleState, opts?: pulumi.CustomResourceOptions): ForwardingRule
Get an existing ForwardingRule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ForwardingRule
Returns true if the given object is an instance of ForwardingRule. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property allPorts

public allPorts: pulumi.Output<boolean | undefined>;
For internal TCP/UDP load balancing (i.e. load balancing scheme is INTERNAL and protocol is TCP/UDP), set this to true to allow packets addressed to any ports to be forwarded to the backends configured with this forwarding rule. Used with backend service. Cannot be set if port or portRange are set.

property allowGlobalAccess

public allowGlobalAccess: pulumi.Output<boolean | undefined>;
If true, clients can access ILB from all regions. Otherwise only allows from the local region the ILB is located at.

property backendService

public backendService: pulumi.Output<string | undefined>;
A BackendService to receive the matched traffic. This is used only for INTERNAL load balancing.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource. Provide this property when you create the resource.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property ipAddress

public ipAddress: pulumi.Output<string>;
The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. An address must be specified by a literal IP address. > **NOTE**: While the API allows you to specify various resource paths for an address resource instead, this provider requires this to specifically be an IP address to avoid needing to fetching the IP address from resource paths on refresh or unnecessary diffs.

property ipProtocol

public ipProtocol: pulumi.Output<string>;
The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL, only TCP and UDP are valid.

property isMirroringCollector

public isMirroringCollector: pulumi.Output<boolean | undefined>;
Indicates whether or not this load balancer can be used as a collector for packet mirroring. To prevent mirroring loops, instances behind this load balancer will not have their traffic mirrored even if a PacketMirroring rule applies to them. This can only be set to true for load balancers that have their loadBalancingScheme set to INTERNAL.

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;
The fingerprint used for optimistic locking of this resource. Used internally during updates.

property labels

public labels: pulumi.Output<{[key: string]: string} | undefined>;
Labels to apply to this forwarding rule. A list of key->value pairs.

property loadBalancingScheme

public loadBalancingScheme: pulumi.Output<string | undefined>;
This signifies what the ForwardingRule will be used for and can be EXTERNAL, INTERNAL, or INTERNAL_MANAGED. EXTERNAL is used for Classic Cloud VPN gateways, protocol forwarding to VMs from an external IP address, and HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP load balancers. INTERNAL is used for protocol forwarding to VMs from an internal IP address, and internal TCP/UDP load balancers. INTERNAL_MANAGED is used for internal HTTP(S) load balancers.

property name

public name: pulumi.Output<string>;
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.

property network

public network: pulumi.Output<string>;
For internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used. This field is only used for INTERNAL load balancing.

property networkTier

public networkTier: pulumi.Output<string>;
The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM.

property portRange

public portRange: pulumi.Output<string | undefined>;
This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports: * TargetHttpProxy: 80, 8080 * TargetHttpsProxy: 443 * TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetVpnGateway: 500, 4500

property ports

public ports: pulumi.Output<string[] | undefined>;
This field is used along with the backendService field for internal load balancing. When the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. You may specify a maximum of up to 5 ports.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;
A reference to the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property serviceLabel

public serviceLabel: pulumi.Output<string | undefined>;
An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name. The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label 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. This field is only used for INTERNAL load balancing.

property serviceName

public serviceName: pulumi.Output<string>;
The internal fully qualified service name for this Forwarding Rule. This field is only used for INTERNAL load balancing.

property subnetwork

public subnetwork: pulumi.Output<string>;
The subnetwork that the load balanced IP should belong to for this Forwarding Rule. This field is only used for INTERNAL load balancing. If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified.

property target

public target: pulumi.Output<string | undefined>;
The URL of the target resource to receive the matched traffic. The target must live in the same region as the forwarding rule. The forwarded traffic must be of a type appropriate to the target object.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource GlobalAddress

class GlobalAddress extends CustomResource
Represents a Global Address resource. Global addresses are used for HTTP(S) load balancing. To get more information about GlobalAddress, see: * [API documentation](https://cloud.google.com/compute/docs/reference/v1/globalAddresses) * How-to Guides * [Reserving a Static External IP Address](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address) #### Example Usage - Global Address Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const defaultGlobalAddress = new gcp.compute.GlobalAddress("default", {}); ```

constructor

new GlobalAddress(name: string, args?: GlobalAddressArgs, opts?: pulumi.CustomResourceOptions)
Create a GlobalAddress resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GlobalAddressState, opts?: pulumi.CustomResourceOptions): GlobalAddress
Get an existing GlobalAddress resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is GlobalAddress
Returns true if the given object is an instance of GlobalAddress. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property address

public address: pulumi.Output<string>;
The IP address or beginning of the address range represented by this resource. This can be supplied as an input to reserve a specific address or omitted to allow GCP to choose a valid one for you.

property addressType

public addressType: pulumi.Output<string | undefined>;
The type of the address to reserve. * EXTERNAL indicates public/external single IP address. * INTERNAL indicates internal IP ranges belonging to some network.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property ipVersion

public ipVersion: pulumi.Output<string | undefined>;
The IP Version that will be used by this address. The default value is `IPV4`.

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;
The fingerprint used for optimistic locking of this resource. Used internally during updates.

property labels

public labels: pulumi.Output<{[key: string]: string} | undefined>;
Labels to apply to this address. A list of key->value pairs.

property name

public name: pulumi.Output<string>;
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.

property network

public network: pulumi.Output<string | undefined>;
The URL of the network in which to reserve the IP range. The IP range must be in RFC1918 space. The network cannot be deleted if there are any reserved IP ranges referring to it. This should only be set when using an Internal address.

property prefixLength

public prefixLength: pulumi.Output<number | undefined>;
The prefix length of the IP range. If not present, it means the address field is a single IP address. This field is not applicable to addresses with addressType=EXTERNAL.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property purpose

public purpose: pulumi.Output<string | undefined>;
The purpose of the resource. For global internal addresses it can be * VPC_PEERING - for peer networks This should only be set when using an Internal address.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource GlobalForwardingRule

class GlobalForwardingRule extends CustomResource
Represents a GlobalForwardingRule resource. Global forwarding rules are used to forward traffic to the correct load balancer for HTTP load balancing. Global forwarding rules can only be used for HTTP load balancing. For more information, see https://cloud.google.com/compute/docs/load-balancing/http/ #### Example Usage - Global Forwarding Rule Http ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const defaultHttpHealthCheck = new gcp.compute.HttpHealthCheck("defaultHttpHealthCheck", { requestPath: "/", checkIntervalSec: 1, timeoutSec: 1, }); const defaultBackendService = new gcp.compute.BackendService("defaultBackendService", { portName: "http", protocol: "HTTP", timeoutSec: 10, healthChecks: [defaultHttpHealthCheck.id], }); const defaultURLMap = new gcp.compute.URLMap("defaultURLMap", { description: "a description", defaultService: defaultBackendService.id, host_rule: [{ hosts: ["mysite.com"], pathMatcher: "allpaths", }], path_matcher: [{ name: "allpaths", defaultService: defaultBackendService.id, path_rule: [{ paths: ["/*"], service: defaultBackendService.id, }], }], }); const defaultTargetHttpProxy = new gcp.compute.TargetHttpProxy("defaultTargetHttpProxy", { description: "a description", urlMap: defaultURLMap.id, }); const defaultGlobalForwardingRule = new gcp.compute.GlobalForwardingRule("defaultGlobalForwardingRule", { target: defaultTargetHttpProxy.id, portRange: "80", }); ``` #### Example Usage - Global Forwarding Rule Internal ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const debianImage = gcp.compute.getImage({ family: "debian-9", project: "debian-cloud", }); const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", { machineType: "n1-standard-1", network_interface: [{ network: "default", }], disk: [{ sourceImage: debianImage.then(debianImage => debianImage.selfLink), autoDelete: true, boot: true, }], }); const igm = new gcp.compute.InstanceGroupManager("igm", { version: [{ instanceTemplate: instanceTemplate.selfLink, name: "primary", }], baseInstanceName: "internal-glb", zone: "us-central1-f", targetSize: 1, }); const defaultHealthCheck = new gcp.compute.HealthCheck("defaultHealthCheck", { checkIntervalSec: 1, timeoutSec: 1, tcp_health_check: { port: "80", }, }); const defaultBackendService = new gcp.compute.BackendService("defaultBackendService", { portName: "http", protocol: "HTTP", timeoutSec: 10, loadBalancingScheme: "INTERNAL_SELF_MANAGED", backend: [{ group: igm.instanceGroup, balancingMode: "RATE", capacityScaler: 0.4, maxRatePerInstance: 50, }], healthChecks: [defaultHealthCheck.id], }); const defaultURLMap = new gcp.compute.URLMap("defaultURLMap", { description: "a description", defaultService: defaultBackendService.id, host_rule: [{ hosts: ["mysite.com"], pathMatcher: "allpaths", }], path_matcher: [{ name: "allpaths", defaultService: defaultBackendService.id, path_rule: [{ paths: ["/*"], service: defaultBackendService.id, }], }], }); const defaultTargetHttpProxy = new gcp.compute.TargetHttpProxy("defaultTargetHttpProxy", { description: "a description", urlMap: defaultURLMap.id, }); const defaultGlobalForwardingRule = new gcp.compute.GlobalForwardingRule("defaultGlobalForwardingRule", { target: defaultTargetHttpProxy.id, portRange: "80", loadBalancingScheme: "INTERNAL_SELF_MANAGED", ipAddress: "0.0.0.0", metadata_filters: [{ filterMatchCriteria: "MATCH_ANY", filter_labels: [{ name: "PLANET", value: "MARS", }], }], }); ```

constructor

new GlobalForwardingRule(name: string, args: GlobalForwardingRuleArgs, opts?: pulumi.CustomResourceOptions)
Create a GlobalForwardingRule resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GlobalForwardingRuleState, opts?: pulumi.CustomResourceOptions): GlobalForwardingRule
Get an existing GlobalForwardingRule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is GlobalForwardingRule
Returns true if the given object is an instance of GlobalForwardingRule. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource. Provide this property when you create the resource.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property ipAddress

public ipAddress: pulumi.Output<string>;
The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. An address must be specified by a literal IP address. > **NOTE**: While the API allows you to specify various resource paths for an address resource instead, this provider requires this to specifically be an IP address to avoid needing to fetching the IP address from resource paths on refresh or unnecessary diffs.

property ipProtocol

public ipProtocol: pulumi.Output<string>;
The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL_SELF_MANAGED, only TCP is valid.

property ipVersion

public ipVersion: pulumi.Output<string | undefined>;
The IP Version that will be used by this global forwarding rule.

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;
The fingerprint used for optimistic locking of this resource. Used internally during updates.

property labels

public labels: pulumi.Output<{[key: string]: string} | undefined>;
Labels to apply to this forwarding rule. A list of key->value pairs.

property loadBalancingScheme

public loadBalancingScheme: pulumi.Output<string | undefined>;
This signifies what the GlobalForwardingRule will be used for. The value of INTERNAL_SELF_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) NOTE: Currently global forwarding rules cannot be used for INTERNAL load balancing.

property metadataFilters

public metadataFilters: pulumi.Output<GlobalForwardingRuleMetadataFilter[] | undefined>;
Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overridden by those specified in the UrlMap that this ForwardingRule references. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. Structure is documented below.

property name

public name: pulumi.Output<string>;
Name of the metadata label. The length must be between 1 and 1024 characters, inclusive.

property network

public network: pulumi.Output<string>;
This field is not used for external load balancing. For INTERNAL_SELF_MANAGED load balancing, this field identifies the network that the load balanced IP should belong to for this global forwarding rule. If this field is not specified, the default network will be used.

property portRange

public portRange: pulumi.Output<string | undefined>;
This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports: * TargetHttpProxy: 80, 8080 * TargetHttpsProxy: 443 * TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetVpnGateway: 500, 4500

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property target

public target: pulumi.Output<string>;
The URL of the target resource to receive the matched traffic. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are valid.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource GlobalNetworkEndpoint

class GlobalNetworkEndpoint extends CustomResource
A Global Network endpoint represents a IP address and port combination that exists outside of GCP. **NOTE**: Global network endpoints cannot be created outside of a global network endpoint group. To get more information about GlobalNetworkEndpoint, see: * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/networkEndpointGroups) * How-to Guides * [Official Documentation](https://cloud.google.com/load-balancing/docs/negs/) #### Example Usage - Global Network Endpoint ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const defaultEndpoint = new gcp.compute.GlobalNetworkEndpoint("default-endpoint", { globalNetworkEndpointGroup: google_compute_network_endpoint_group.neg.name, fqdn: "www.example.com", port: google_compute_network_endpoint_group.neg.default_port, ipAddress: google_compute_instance["endpoint-instance"].network_interface[0].network_ip, }); const _default = new gcp.compute.Network("default", {autoCreateSubnetworks: false}); const group = new gcp.compute.GlobalNetworkEndpointGroup("group", { network: _default.id, defaultPort: "90", }); ```

constructor

new GlobalNetworkEndpoint(name: string, args: GlobalNetworkEndpointArgs, opts?: pulumi.CustomResourceOptions)
Create a GlobalNetworkEndpoint resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GlobalNetworkEndpointState, opts?: pulumi.CustomResourceOptions): GlobalNetworkEndpoint
Get an existing GlobalNetworkEndpoint resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is GlobalNetworkEndpoint
Returns true if the given object is an instance of GlobalNetworkEndpoint. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property fqdn

public fqdn: pulumi.Output<string | undefined>;
Fully qualified domain name of network endpoint. This can only be specified when networkEndpointType of the NEG is INTERNET_FQDN_PORT.

property globalNetworkEndpointGroup

public globalNetworkEndpointGroup: pulumi.Output<string>;
The global network endpoint group this endpoint is part of.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property ipAddress

public ipAddress: pulumi.Output<string | undefined>;
IPv4 address external endpoint.

property port

public port: pulumi.Output<number>;
Port number of the external endpoint.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource GlobalNetworkEndpointGroup

class GlobalNetworkEndpointGroup extends CustomResource
A global network endpoint group contains endpoints that reside outside of Google Cloud. Currently a global network endpoint group can only support a single endpoint. To get more information about GlobalNetworkEndpointGroup, see: * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/networkEndpointGroups) * How-to Guides * [Official Documentation](https://cloud.google.com/load-balancing/docs/negs/internet-neg-concepts) #### Example Usage - Global Network Endpoint Group ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const neg = new gcp.compute.GlobalNetworkEndpointGroup("neg", { defaultPort: 90, networkEndpointType: "INTERNET_FQDN_PORT", }); ``` #### Example Usage - Global Network Endpoint Group Ip Address ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const neg = new gcp.compute.GlobalNetworkEndpointGroup("neg", { defaultPort: 90, networkEndpointType: "INTERNET_IP_PORT", }); ```

constructor

new GlobalNetworkEndpointGroup(name: string, args: GlobalNetworkEndpointGroupArgs, opts?: pulumi.CustomResourceOptions)
Create a GlobalNetworkEndpointGroup resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GlobalNetworkEndpointGroupState, opts?: pulumi.CustomResourceOptions): GlobalNetworkEndpointGroup
Get an existing GlobalNetworkEndpointGroup resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is GlobalNetworkEndpointGroup
Returns true if the given object is an instance of GlobalNetworkEndpointGroup. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property defaultPort

public defaultPort: pulumi.Output<number | undefined>;
The default port used if the port number is not specified in the network endpoint.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource. Provide this property when you create the resource.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;
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.

property networkEndpointType

public networkEndpointType: pulumi.Output<string>;
Type of network endpoints in this network endpoint group.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource HaVpnGateway

class HaVpnGateway extends CustomResource
Represents a VPN gateway running in GCP. This virtual device is managed by Google, but used only by you. This type of VPN Gateway allows for the creation of VPN solutions with higher availability than classic Target VPN Gateways. To get more information about HaVpnGateway, see: * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/vpnGateways) * How-to Guides * [Choosing a VPN](https://cloud.google.com/vpn/docs/how-to/choosing-a-vpn) * [Cloud VPN Overview](https://cloud.google.com/vpn/docs/concepts/overview) #### Example Usage - Ha Vpn Gateway Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const network1 = new gcp.compute.Network("network1", {autoCreateSubnetworks: false}); const haGateway1 = new gcp.compute.HaVpnGateway("haGateway1", { region: "us-central1", network: network1.id, }); ``` #### Example Usage - Ha Vpn Gateway Gcp To Gcp ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const network1 = new gcp.compute.Network("network1", { routingMode: "GLOBAL", autoCreateSubnetworks: false, }); const haGateway1 = new gcp.compute.HaVpnGateway("haGateway1", { region: "us-central1", network: network1.id, }); const network2 = new gcp.compute.Network("network2", { routingMode: "GLOBAL", autoCreateSubnetworks: false, }); const haGateway2 = new gcp.compute.HaVpnGateway("haGateway2", { region: "us-central1", network: network2.id, }); const network1Subnet1 = new gcp.compute.Subnetwork("network1Subnet1", { ipCidrRange: "10.0.1.0/24", region: "us-central1", network: network1.id, }); const network1Subnet2 = new gcp.compute.Subnetwork("network1Subnet2", { ipCidrRange: "10.0.2.0/24", region: "us-west1", network: network1.id, }); const network2Subnet1 = new gcp.compute.Subnetwork("network2Subnet1", { ipCidrRange: "192.168.1.0/24", region: "us-central1", network: network2.id, }); const network2Subnet2 = new gcp.compute.Subnetwork("network2Subnet2", { ipCidrRange: "192.168.2.0/24", region: "us-east1", network: network2.id, }); const router1 = new gcp.compute.Router("router1", { network: network1.name, bgp: { asn: 64514, }, }); const router2 = new gcp.compute.Router("router2", { network: network2.name, bgp: { asn: 64515, }, }); const tunnel1 = new gcp.compute.VPNTunnel("tunnel1", { region: "us-central1", vpnGateway: haGateway1.id, peerGcpGateway: haGateway2.id, sharedSecret: "a secret message", router: router1.id, vpnGatewayInterface: 0, }); const tunnel2 = new gcp.compute.VPNTunnel("tunnel2", { region: "us-central1", vpnGateway: haGateway1.id, peerGcpGateway: haGateway2.id, sharedSecret: "a secret message", router: router1.id, vpnGatewayInterface: 1, }); const tunnel3 = new gcp.compute.VPNTunnel("tunnel3", { region: "us-central1", vpnGateway: haGateway2.id, peerGcpGateway: haGateway1.id, sharedSecret: "a secret message", router: router2.id, vpnGatewayInterface: 0, }); const tunnel4 = new gcp.compute.VPNTunnel("tunnel4", { region: "us-central1", vpnGateway: haGateway2.id, peerGcpGateway: haGateway1.id, sharedSecret: "a secret message", router: router2.id, vpnGatewayInterface: 1, }); const router1Interface1 = new gcp.compute.RouterInterface("router1Interface1", { router: router1.name, region: "us-central1", ipRange: "169.254.0.1/30", vpnTunnel: tunnel1.name, }); const router1Peer1 = new gcp.compute.RouterPeer("router1Peer1", { router: router1.name, region: "us-central1", peerIpAddress: "169.254.0.2", peerAsn: 64515, advertisedRoutePriority: 100, "interface": router1Interface1.name, }); const router1Interface2 = new gcp.compute.RouterInterface("router1Interface2", { router: router1.name, region: "us-central1", ipRange: "169.254.1.1/30", vpnTunnel: tunnel2.name, }); const router1Peer2 = new gcp.compute.RouterPeer("router1Peer2", { router: router1.name, region: "us-central1", peerIpAddress: "169.254.1.2", peerAsn: 64515, advertisedRoutePriority: 100, "interface": router1Interface2.name, }); const router2Interface1 = new gcp.compute.RouterInterface("router2Interface1", { router: router2.name, region: "us-central1", ipRange: "169.254.0.1/30", vpnTunnel: tunnel3.name, }); const router2Peer1 = new gcp.compute.RouterPeer("router2Peer1", { router: router2.name, region: "us-central1", peerIpAddress: "169.254.0.2", peerAsn: 64514, advertisedRoutePriority: 100, "interface": router2Interface1.name, }); const router2Interface2 = new gcp.compute.RouterInterface("router2Interface2", { router: router2.name, region: "us-central1", ipRange: "169.254.1.1/30", vpnTunnel: tunnel4.name, }); const router2Peer2 = new gcp.compute.RouterPeer("router2Peer2", { router: router2.name, region: "us-central1", peerIpAddress: "169.254.1.2", peerAsn: 64514, advertisedRoutePriority: 100, "interface": router2Interface2.name, }); ```

constructor

new HaVpnGateway(name: string, args: HaVpnGatewayArgs, opts?: pulumi.CustomResourceOptions)
Create a HaVpnGateway resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: HaVpnGatewayState, opts?: pulumi.CustomResourceOptions): HaVpnGateway
Get an existing HaVpnGateway resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is HaVpnGateway
Returns true if the given object is an instance of HaVpnGateway. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;
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.

property network

public network: pulumi.Output<string>;
The network this VPN gateway is accepting traffic for.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;
The region this gateway should sit in.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property vpnInterfaces

public vpnInterfaces: pulumi.Output<HaVpnGatewayVpnInterface[]>;
A list of interfaces on this VPN gateway.

Resource HealthCheck

class HealthCheck extends CustomResource
Health Checks determine whether instances are responsive and able to do work. They are an important part of a comprehensive load balancing configuration, as they enable monitoring instances behind load balancers. Health Checks poll instances at a specified interval. Instances that do not respond successfully to some number of probes in a row are marked as unhealthy. No new connections are sent to unhealthy instances, though existing connections will continue. The health check will continue to poll unhealthy instances. If an instance later responds successfully to some number of consecutive probes, it is marked healthy again and can receive new connections. To get more information about HealthCheck, see: * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks) * How-to Guides * [Official Documentation](https://cloud.google.com/load-balancing/docs/health-checks) #### Example Usage - Health Check Tcp ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const tcpHealthCheck = new gcp.compute.HealthCheck("tcp-health-check", { checkIntervalSec: 1, tcpHealthCheck: { port: 80, }, timeoutSec: 1, }); ``` #### Example Usage - Health Check Tcp Full ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const tcpHealthCheck = new gcp.compute.HealthCheck("tcp-health-check", { checkIntervalSec: 1, description: "Health check via tcp", healthyThreshold: 4, tcpHealthCheck: { portName: "health-check-port", portSpecification: "USE_NAMED_PORT", proxyHeader: "NONE", request: "ARE YOU HEALTHY?", response: "I AM HEALTHY", }, timeoutSec: 1, unhealthyThreshold: 5, }); ``` #### Example Usage - Health Check Ssl ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const sslHealthCheck = new gcp.compute.HealthCheck("ssl-health-check", { checkIntervalSec: 1, sslHealthCheck: { port: 443, }, timeoutSec: 1, }); ``` #### Example Usage - Health Check Ssl Full ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const sslHealthCheck = new gcp.compute.HealthCheck("ssl-health-check", { checkIntervalSec: 1, description: "Health check via ssl", healthyThreshold: 4, sslHealthCheck: { portName: "health-check-port", portSpecification: "USE_NAMED_PORT", proxyHeader: "NONE", request: "ARE YOU HEALTHY?", response: "I AM HEALTHY", }, timeoutSec: 1, unhealthyThreshold: 5, }); ``` #### Example Usage - Health Check Http ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const httpHealthCheck = new gcp.compute.HealthCheck("http-health-check", { checkIntervalSec: 1, httpHealthCheck: { port: 80, }, timeoutSec: 1, }); ``` #### Example Usage - Health Check Http Full ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const httpHealthCheck = new gcp.compute.HealthCheck("http-health-check", { checkIntervalSec: 1, description: "Health check via http", healthyThreshold: 4, httpHealthCheck: { host: "1.2.3.4", portName: "health-check-port", portSpecification: "USE_NAMED_PORT", proxyHeader: "NONE", requestPath: "/mypath", response: "I AM HEALTHY", }, timeoutSec: 1, unhealthyThreshold: 5, }); ``` #### Example Usage - Health Check Https ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const httpsHealthCheck = new gcp.compute.HealthCheck("https-health-check", { checkIntervalSec: 1, httpsHealthCheck: { port: 443, }, timeoutSec: 1, }); ``` #### Example Usage - Health Check Https Full ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const httpsHealthCheck = new gcp.compute.HealthCheck("https-health-check", { checkIntervalSec: 1, description: "Health check via https", healthyThreshold: 4, httpsHealthCheck: { host: "1.2.3.4", portName: "health-check-port", portSpecification: "USE_NAMED_PORT", proxyHeader: "NONE", requestPath: "/mypath", response: "I AM HEALTHY", }, timeoutSec: 1, unhealthyThreshold: 5, }); ``` #### Example Usage - Health Check Http2 ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const http2HealthCheck = new gcp.compute.HealthCheck("http2-health-check", { checkIntervalSec: 1, http2HealthCheck: { port: 443, }, timeoutSec: 1, }); ``` #### Example Usage - Health Check Http2 Full ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const http2HealthCheck = new gcp.compute.HealthCheck("http2-health-check", { checkIntervalSec: 1, description: "Health check via http2", healthyThreshold: 4, http2HealthCheck: { host: "1.2.3.4", portName: "health-check-port", portSpecification: "USE_NAMED_PORT", proxyHeader: "NONE", requestPath: "/mypath", response: "I AM HEALTHY", }, timeoutSec: 1, unhealthyThreshold: 5, }); ``` #### Example Usage - Health Check With Logging ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const healthCheckWithLogging = new gcp.compute.HealthCheck("health-check-with-logging", { timeoutSec: 1, checkIntervalSec: 1, tcp_health_check: { port: "22", }, log_config: { enable: true, }, }); ```

constructor

new HealthCheck(name: string, args?: HealthCheckArgs, opts?: pulumi.CustomResourceOptions)
Create a HealthCheck resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: HealthCheckState, opts?: pulumi.CustomResourceOptions): HealthCheck
Get an existing HealthCheck resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is HealthCheck
Returns true if the given object is an instance of HealthCheck. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property checkIntervalSec

public checkIntervalSec: pulumi.Output<number | undefined>;
How often (in seconds) to send a health check. The default value is 5 seconds.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource. Provide this property when you create the resource.

property healthyThreshold

public healthyThreshold: pulumi.Output<number | undefined>;
A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.

property http2HealthCheck

public http2HealthCheck: pulumi.Output<HealthCheckHttp2HealthCheck | undefined>;
A nested object resource Structure is documented below.

property httpHealthCheck

public httpHealthCheck: pulumi.Output<HealthCheckHttpHealthCheck | undefined>;
A nested object resource Structure is documented below.

property httpsHealthCheck

public httpsHealthCheck: pulumi.Output<HealthCheckHttpsHealthCheck | undefined>;
A nested object resource Structure is documented below.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property logConfig

public logConfig: pulumi.Output<HealthCheckLogConfig | undefined>;
Configure logging on this health check. Structure is documented below.

property name

public name: pulumi.Output<string>;
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.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property sslHealthCheck

public sslHealthCheck: pulumi.Output<HealthCheckSslHealthCheck | undefined>;
A nested object resource Structure is documented below.

property tcpHealthCheck

public tcpHealthCheck: pulumi.Output<HealthCheckTcpHealthCheck | undefined>;
A nested object resource Structure is documented below.

property timeoutSec

public timeoutSec: pulumi.Output<number | undefined>;
How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.

property type

public type: pulumi.Output<string>;
The type of the health check. One of HTTP, HTTPS, TCP, or SSL.

property unhealthyThreshold

public unhealthyThreshold: pulumi.Output<number | undefined>;
A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource HttpHealthCheck

class HttpHealthCheck extends CustomResource
An HttpHealthCheck resource. This resource defines a template for how individual VMs should be checked for health, via HTTP. > **Note:** gcp.compute.HttpHealthCheck is a legacy health check. The newer [gcp.compute.HealthCheck](https://www.terraform.io/docs/providers/google/r/compute_health_check.html) should be preferred for all uses except [Network Load Balancers](https://cloud.google.com/compute/docs/load-balancing/network/) which still require the legacy version. To get more information about HttpHealthCheck, see: * [API documentation](https://cloud.google.com/compute/docs/reference/v1/httpHealthChecks) * How-to Guides * [Adding Health Checks](https://cloud.google.com/compute/docs/load-balancing/health-checks#legacy_health_checks) #### Example Usage - Http Health Check Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const defaultHttpHealthCheck = new gcp.compute.HttpHealthCheck("default", { checkIntervalSec: 1, requestPath: "/health_check", timeoutSec: 1, }); ```

constructor

new HttpHealthCheck(name: string, args?: HttpHealthCheckArgs, opts?: pulumi.CustomResourceOptions)
Create a HttpHealthCheck resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: HttpHealthCheckState, opts?: pulumi.CustomResourceOptions): HttpHealthCheck
Get an existing HttpHealthCheck resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is HttpHealthCheck
Returns true if the given object is an instance of HttpHealthCheck. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property checkIntervalSec

public checkIntervalSec: pulumi.Output<number | undefined>;
How often (in seconds) to send a health check. The default value is 5 seconds.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource. Provide this property when you create the resource.

property healthyThreshold

public healthyThreshold: pulumi.Output<number | undefined>;
A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.

property host

public host: pulumi.Output<string | undefined>;
The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;
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.

property port

public port: pulumi.Output<number | undefined>;
The TCP port number for the HTTP health check request. The default value is 80.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property requestPath

public requestPath: pulumi.Output<string | undefined>;
The request path of the HTTP health check request. The default value is /.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property timeoutSec

public timeoutSec: pulumi.Output<number | undefined>;
How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.

property unhealthyThreshold

public unhealthyThreshold: pulumi.Output<number | undefined>;
A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource HttpsHealthCheck

class HttpsHealthCheck extends CustomResource
An HttpsHealthCheck resource. This resource defines a template for how individual VMs should be checked for health, via HTTPS. > **Note:** gcp.compute.HttpsHealthCheck is a legacy health check. The newer [gcp.compute.HealthCheck](https://www.terraform.io/docs/providers/google/r/compute_health_check.html) should be preferred for all uses except [Network Load Balancers](https://cloud.google.com/compute/docs/load-balancing/network/) which still require the legacy version. To get more information about HttpsHealthCheck, see: * [API documentation](https://cloud.google.com/compute/docs/reference/v1/httpsHealthChecks) * How-to Guides * [Adding Health Checks](https://cloud.google.com/compute/docs/load-balancing/health-checks#legacy_health_checks) #### Example Usage - Https Health Check Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const defaultHttpsHealthCheck = new gcp.compute.HttpsHealthCheck("default", { checkIntervalSec: 1, requestPath: "/health_check", timeoutSec: 1, }); ```

constructor

new HttpsHealthCheck(name: string, args?: HttpsHealthCheckArgs, opts?: pulumi.CustomResourceOptions)
Create a HttpsHealthCheck resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: HttpsHealthCheckState, opts?: pulumi.CustomResourceOptions): HttpsHealthCheck
Get an existing HttpsHealthCheck resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is HttpsHealthCheck
Returns true if the given object is an instance of HttpsHealthCheck. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property checkIntervalSec

public checkIntervalSec: pulumi.Output<number | undefined>;
How often (in seconds) to send a health check. The default value is 5 seconds.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource. Provide this property when you create the resource.

property healthyThreshold

public healthyThreshold: pulumi.Output<number | undefined>;
A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.

property host

public host: pulumi.Output<string | undefined>;
The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;
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.

property port

public port: pulumi.Output<number | undefined>;
The TCP port number for the HTTPS health check request. The default value is 80.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property requestPath

public requestPath: pulumi.Output<string | undefined>;
The request path of the HTTPS health check request. The default value is /.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property timeoutSec

public timeoutSec: pulumi.Output<number | undefined>;
How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.

property unhealthyThreshold

public unhealthyThreshold: pulumi.Output<number | undefined>;
A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Image

class Image extends CustomResource
Represents an Image resource. Google Compute Engine uses operating system images to create the root persistent disks for your instances. You specify an image when you create an instance. Images contain a boot loader, an operating system, and a root file system. Linux operating system images are also capable of running containers on Compute Engine. Images can be either public or custom. Public images are provided and maintained by Google, open-source communities, and third-party vendors. By default, all projects have access to these images and can use them to create instances. Custom images are available only to your project. You can create a custom image from root persistent disks and other images. Then, use the custom image to create an instance. To get more information about Image, see: * [API documentation](https://cloud.google.com/compute/docs/reference/v1/images) * How-to Guides * [Official Documentation](https://cloud.google.com/compute/docs/images) #### Example Usage - Image Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const example = new gcp.compute.Image("example", { rawDisk: { source: "https://storage.googleapis.com/bosh-cpi-artifacts/bosh-stemcell-3262.4-google-kvm-ubuntu-trusty-go_agent-raw.tar.gz", }, }); ``` #### Example Usage - Image Guest Os ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const example = new gcp.compute.Image("example", { guestOsFeatures: [ { type: "SECURE_BOOT", }, { type: "MULTI_IP_SUBNET", }, ], rawDisk: { source: "https://storage.googleapis.com/bosh-cpi-artifacts/bosh-stemcell-3262.4-google-kvm-ubuntu-trusty-go_agent-raw.tar.gz", }, }); ```

constructor

new Image(name: string, args?: ImageArgs, opts?: pulumi.CustomResourceOptions)
Create a Image resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ImageState, opts?: pulumi.CustomResourceOptions): Image
Get an existing Image resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Image
Returns true if the given object is an instance of Image. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property archiveSizeBytes

public archiveSizeBytes: pulumi.Output<number>;
Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource. Provide this property when you create the resource.

property diskSizeGb

public diskSizeGb: pulumi.Output<number>;
Size of the image when restored onto a persistent disk (in GB).

property family

public family: pulumi.Output<string | undefined>;
The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.

property guestOsFeatures

public guestOsFeatures: pulumi.Output<ImageGuestOsFeature[]>;
A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;
The fingerprint used for optimistic locking of this resource. Used internally during updates.

property labels

public labels: pulumi.Output<{[key: string]: string} | undefined>;
Labels to apply to this Image.

property licenses

public licenses: pulumi.Output<string[]>;
Any applicable license URI.

property name

public name: pulumi.Output<string>;
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.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property rawDisk

public rawDisk: pulumi.Output<ImageRawDisk | undefined>;
The parameters of the raw disk image. Structure is documented below.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property sourceDisk

public sourceDisk: pulumi.Output<string | undefined>;
The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Instance

class Instance extends CustomResource
Manages a VM instance resource within GCE. For more information see [the official documentation](https://cloud.google.com/compute/docs/instances) and [API](https://cloud.google.com/compute/docs/reference/latest/instances). #### Example Usage ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const defaultInstance = new gcp.compute.Instance("default", { bootDisk: { initializeParams: { image: "debian-cloud/debian-9", }, }, machineType: "n1-standard-1", metadata: { foo: "bar", }, metadataStartupScript: "echo hi > /test.txt", networkInterfaces: [{ accessConfigs: [{}], network: "default", }], // Local SSD disk scratchDisks: [{ interface: "SCSI", }], serviceAccount: { scopes: [ "userinfo-email", "compute-ro", "storage-ro", ], }, tags: [ "foo", "bar", ], zone: "us-central1-a", }); ```

constructor

new Instance(name: string, args: InstanceArgs, opts?: pulumi.CustomResourceOptions)
Create a Instance resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance
Get an existing Instance resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Instance
Returns true if the given object is an instance of Instance. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property allowStoppingForUpdate

public allowStoppingForUpdate: pulumi.Output<boolean | undefined>;
If true, allows this prvider to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

property attachedDisks

public attachedDisks: pulumi.Output<InstanceAttachedDisk[] | undefined>;
Additional disks to attach to the instance. Can be repeated multiple times for multiple disks. Structure is documented below.

property bootDisk

public bootDisk: pulumi.Output<InstanceBootDisk>;
The boot disk for the instance. Structure is documented below.

property canIpForward

public canIpForward: pulumi.Output<boolean | undefined>;
Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

property cpuPlatform

public cpuPlatform: pulumi.Output<string>;
The CPU platform used by this instance.

property currentStatus

public currentStatus: pulumi.Output<string>;

property deletionProtection

public deletionProtection: pulumi.Output<boolean | undefined>;
Enable deletion protection on this instance. Defaults to false. **Note:** you must disable deletion protection before removing the resource (e.g., via `pulumi destroy`), or the instance cannot be deleted and the provider run will not complete successfully.

property description

public description: pulumi.Output<string | undefined>;
A brief description of this resource.

property desiredStatus

public desiredStatus: pulumi.Output<string | undefined>;
Desired status of the instance. Either `"RUNNING"` or `"TERMINATED"`.

property enableDisplay

public enableDisplay: pulumi.Output<boolean | undefined>;
Enable [Virtual Displays](https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display#verify_display_driver) on this instance. **Note**: `allowStoppingForUpdate` must be set to true or your instance must have a `desiredStatus` of `TERMINATED` in order to update this field.

property guestAccelerators

public guestAccelerators: pulumi.Output<InstanceGuestAccelerator[]>;
List of the type and count of accelerator cards attached to the instance. Structure documented below. **Note:** GPU accelerators can only be used with `onHostMaintenance` option set to TERMINATE.

property hostname

public hostname: pulumi.Output<string | undefined>;
A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression `a-z`, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instanceId

public instanceId: pulumi.Output<string>;
The server-assigned unique identifier of this instance.

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;
The unique fingerprint of the labels.

property labels

public labels: pulumi.Output<{[key: string]: string} | undefined>;
A map of key/value label pairs to assign to the instance.

property machineType

public machineType: pulumi.Output<string>;
The machine type to create.

property metadata

public metadata: pulumi.Output<{[key: string]: string} | undefined>;
Metadata key/value pairs to make available from within the instance. Ssh keys attached in the Cloud Console will be removed. Add them to your config in order to keep them attached to your instance.

property metadataFingerprint

public metadataFingerprint: pulumi.Output<string>;
The unique fingerprint of the metadata.

property metadataStartupScript

public metadataStartupScript: pulumi.Output<string | undefined>;
An alternative to using the startup-script metadata key, except this one forces the instance to be recreated (thus re-running the script) if it is changed. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously. Users are free to use either mechanism - the only distinction is that this separate attribute willl cause a recreate on modification. On import, `metadataStartupScript` will be set, but `metadata.startup-script` will not - if you choose to use the other mechanism, you will see a diff immediately after import, which will cause a destroy/recreate operation. You may want to modify your state file manually using `pulumi stack` commands, depending on your use case.

property minCpuPlatform

public minCpuPlatform: pulumi.Output<string>;
Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as `Intel Haswell` or `Intel Skylake`. See the complete list [here](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). **Note**: `allowStoppingForUpdate` must be set to true or your instance must have a `desiredStatus` of `TERMINATED` in order to update this field.

property name

public name: pulumi.Output<string>;
A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

property networkInterfaces

public networkInterfaces: pulumi.Output<InstanceNetworkInterface[]>;
Networks to attach to the instance. This can be specified multiple times. Structure is documented below.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property resourcePolicies

public resourcePolicies: pulumi.Output<string | undefined>;
-- A list of short names or selfLinks of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.

property scheduling

public scheduling: pulumi.Output<InstanceScheduling>;
The scheduling strategy to use. More details about this configuration option are detailed below.

property scratchDisks

public scratchDisks: pulumi.Output<InstanceScratchDisk[] | undefined>;
Scratch disks to attach to the instance. This can be specified multiple times for multiple scratch disks. Structure is documented below.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property serviceAccount

public serviceAccount: pulumi.Output<InstanceServiceAccount | undefined>;
Service account to attach to the instance. Structure is documented below. **Note**: `allowStoppingForUpdate` must be set to true or your instance must have a `desiredStatus` of `TERMINATED` in order to update this field.

property shieldedInstanceConfig

public shieldedInstanceConfig: pulumi.Output<InstanceShieldedInstanceConfig>;
Enable [Shielded VM](https://cloud.google.com/security/shielded-cloud/shielded-vm) on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. **Note**: `shieldedInstanceConfig` can only be used with boot images with shielded vm support. See the complete list [here](https://cloud.google.com/compute/docs/images#shielded-images).

property tags

public tags: pulumi.Output<string[] | undefined>;
A list of tags to attach to the instance.

property tagsFingerprint

public tagsFingerprint: pulumi.Output<string>;
The unique fingerprint of the tags.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;
The zone that the machine should be created in.

Resource InstanceFromTemplate

class InstanceFromTemplate extends CustomResource
Manages a VM instance resource within GCE. For more information see [the official documentation](https://cloud.google.com/compute/docs/instances) and [API](https://cloud.google.com/compute/docs/reference/latest/instances). This resource is specifically to create a compute instance from a given `sourceInstanceTemplate`. To create an instance without a template, use the `gcp.compute.Instance` resource. #### Example Usage ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const tplInstanceTemplate = new gcp.compute.InstanceTemplate("tplInstanceTemplate", { machineType: "n1-standard-1", disk: [{ sourceImage: "debian-cloud/debian-9", autoDelete: true, diskSizeGb: 100, boot: true, }], network_interface: [{ network: "default", }], metadata: { foo: "bar", }, canIpForward: true, }); const tplInstanceFromTemplate = new gcp.compute.InstanceFromTemplate("tplInstanceFromTemplate", { zone: "us-central1-a", sourceInstanceTemplate: tplInstanceTemplate.selfLink, canIpForward: false, labels: { my_key: "myValue", }, }); ```

constructor

new InstanceFromTemplate(name: string, args: InstanceFromTemplateArgs, opts?: pulumi.CustomResourceOptions)
Create a InstanceFromTemplate resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceFromTemplateState, opts?: pulumi.CustomResourceOptions): InstanceFromTemplate
Get an existing InstanceFromTemplate resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is InstanceFromTemplate
Returns true if the given object is an instance of InstanceFromTemplate. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property allowStoppingForUpdate

public allowStoppingForUpdate: pulumi.Output<boolean>;

property attachedDisks

public attachedDisks: pulumi.Output<InstanceFromTemplateAttachedDisk[]>;

property bootDisk

public bootDisk: pulumi.Output<InstanceFromTemplateBootDisk>;

property canIpForward

public canIpForward: pulumi.Output<boolean>;

property cpuPlatform

public cpuPlatform: pulumi.Output<string>;

property currentStatus

public currentStatus: pulumi.Output<string>;

property deletionProtection

public deletionProtection: pulumi.Output<boolean>;

property description

public description: pulumi.Output<string>;

property desiredStatus

public desiredStatus: pulumi.Output<string>;

property enableDisplay

public enableDisplay: pulumi.Output<boolean>;

property guestAccelerators

public guestAccelerators: pulumi.Output<InstanceFromTemplateGuestAccelerator[]>;

property hostname

public hostname: pulumi.Output<string>;

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instanceId

public instanceId: pulumi.Output<string>;

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;

property labels

public labels: pulumi.Output<{[key: string]: string}>;

property machineType

public machineType: pulumi.Output<string>;

property metadata

public metadata: pulumi.Output<{[key: string]: string}>;

property metadataFingerprint

public metadataFingerprint: pulumi.Output<string>;

property metadataStartupScript

public metadataStartupScript: pulumi.Output<string>;

property minCpuPlatform

public minCpuPlatform: pulumi.Output<string>;

property name

public name: pulumi.Output<string>;
A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

property networkInterfaces

public networkInterfaces: pulumi.Output<InstanceFromTemplateNetworkInterface[]>;

property project

public project: pulumi.Output<string>;

property resourcePolicies

public resourcePolicies: pulumi.Output<string>;

property scheduling

public scheduling: pulumi.Output<InstanceFromTemplateScheduling>;

property scratchDisks

public scratchDisks: pulumi.Output<InstanceFromTemplateScratchDisk[]>;
public selfLink: pulumi.Output<string>;

property serviceAccount

public serviceAccount: pulumi.Output<InstanceFromTemplateServiceAccount>;

property shieldedInstanceConfig

public shieldedInstanceConfig: pulumi.Output<InstanceFromTemplateShieldedInstanceConfig>;

property sourceInstanceTemplate

public sourceInstanceTemplate: pulumi.Output<string>;
Name or self link of an instance template to create the instance based on.

property tags

public tags: pulumi.Output<string[]>;

property tagsFingerprint

public tagsFingerprint: pulumi.Output<string>;

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;
The zone that the machine should be created in. If not set, the provider zone is used.

Resource InstanceGroup

class InstanceGroup extends CustomResource
Creates a group of dissimilar Compute Engine virtual machine instances. For more information, see [the official documentation](https://cloud.google.com/compute/docs/instance-groups/#unmanaged_instance_groups) and [API](https://cloud.google.com/compute/docs/reference/latest/instanceGroups) #### Example Usage - Empty instance group ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const test = new gcp.compute.InstanceGroup("test", { description: "Test instance group", zone: "us-central1-a", network: google_compute_network["default"].self_link, }); ``` ##### Example Usage - With instances and named ports ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const webservers = new gcp.compute.InstanceGroup("webservers", { description: "Test instance group", instances: [ google_compute_instance.test.self_link, google_compute_instance.test2.self_link, ], named_port: [ { name: "http", port: "8080", }, { name: "https", port: "8443", }, ], zone: "us-central1-a", }); ``` ##### Example Usage - Recreating an instance group in use Recreating an instance group that's in use by another resource will give a `resourceInUseByAnotherResource` error. Use `lifecycle.create_before_destroy` as shown in this example to avoid this type of error. ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const debianImage = gcp.compute.getImage({ family: "debian-9", project: "debian-cloud", }); const stagingVm = new gcp.compute.Instance("stagingVm", { machineType: "n1-standard-1", zone: "us-central1-c", boot_disk: { initialize_params: { image: debianImage.then(debianImage => debianImage.selfLink), }, }, network_interface: [{ network: "default", }], }); const stagingGroup = new gcp.compute.InstanceGroup("stagingGroup", { zone: "us-central1-c", instances: [stagingVm.selfLink], named_port: [ { name: "http", port: "8080", }, { name: "https", port: "8443", }, ], }); const stagingHealth = new gcp.compute.HttpsHealthCheck("stagingHealth", {requestPath: "/health_check"}); const stagingService = new gcp.compute.BackendService("stagingService", { portName: "https", protocol: "HTTPS", backend: [{ group: stagingGroup.selfLink, }], healthChecks: [stagingHealth.selfLink], }); ```

constructor

new InstanceGroup(name: string, args?: InstanceGroupArgs, opts?: pulumi.CustomResourceOptions)
Create a InstanceGroup resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceGroupState, opts?: pulumi.CustomResourceOptions): InstanceGroup
Get an existing InstanceGroup resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is InstanceGroup
Returns true if the given object is an instance of InstanceGroup. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;
An optional textual description of the instance group.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instances

public instances: pulumi.Output<string[]>;
List of instances in the group. They should be given as selfLink URLs. When adding instances they must all be in the same network and zone as the instance group.

property name

public name: pulumi.Output<string>;
The name which the port will be mapped to.

property namedPorts

public namedPorts: pulumi.Output<InstanceGroupNamedPort[] | undefined>;
The named port configuration. See the section below for details on configuration.

property network

public network: pulumi.Output<string>;
The URL of the network the instance group is in. If this is different from the network where the instances are in, the creation fails. Defaults to the network where the instances are in (if neither `network` nor `instances` is specified, this field will be blank).

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property size

public size: pulumi.Output<number>;
The number of instances in the group.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;
The zone that this instance group should be created in.

Resource InstanceGroupManager

class InstanceGroupManager extends CustomResource
The Google Compute Engine Instance Group Manager API creates and manages pools of homogeneous Compute Engine virtual machine instances from a common instance template. For more information, see [the official documentation](https://cloud.google.com/compute/docs/instance-groups/manager) and [API](https://cloud.google.com/compute/docs/reference/latest/instanceGroupManagers) > **Note:** Use [gcp.compute.RegionInstanceGroupManager](https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html) to create a regional (multi-zone) instance group manager. #### Example Usage with top level instance template (`google` provider) ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const autohealing = new gcp.compute.HealthCheck("autohealing", { checkIntervalSec: 5, timeoutSec: 5, healthyThreshold: 2, unhealthyThreshold: 10, http_health_check: { requestPath: "/healthz", port: "8080", }, }); const appserver = new gcp.compute.InstanceGroupManager("appserver", { baseInstanceName: "app", zone: "us-central1-a", version: [{ instanceTemplate: google_compute_instance_template.appserver.self_link, }], targetPools: [google_compute_target_pool.appserver.self_link], targetSize: 2, named_port: [{ name: "customHTTP", port: 8888, }], auto_healing_policies: { healthCheck: autohealing.selfLink, initialDelaySec: 300, }, }); ``` #### Example Usage with multiple versions (`google-beta` provider) ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const appserver = new gcp.compute.InstanceGroupManager("appserver", { baseInstanceName: "app", zone: "us-central1-a", targetSize: 5, version: [ { name: "appserver", instanceTemplate: google_compute_instance_template.appserver.self_link, }, { name: "appserver-canary", instanceTemplate: google_compute_instance_template["appserver-canary"].self_link, target_size: { fixed: 1, }, }, ], }); ```

constructor

new InstanceGroupManager(name: string, args: InstanceGroupManagerArgs, opts?: pulumi.CustomResourceOptions)
Create a InstanceGroupManager resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceGroupManagerState, opts?: pulumi.CustomResourceOptions): InstanceGroupManager
Get an existing InstanceGroupManager resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is InstanceGroupManager
Returns true if the given object is an instance of InstanceGroupManager. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property autoHealingPolicies

public autoHealingPolicies: pulumi.Output<InstanceGroupManagerAutoHealingPolicies | undefined>;
The autohealing policies for this managed instance group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).

property baseInstanceName

public baseInstanceName: pulumi.Output<string>;
The base instance name to use for instances in this group. The value must be a valid [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. Supported characters are lowercase letters, numbers, and hyphens (-). Instances are named by appending a hyphen and a random four-character string to the base instance name.

property description

public description: pulumi.Output<string | undefined>;
An optional textual description of the instance group manager.

property fingerprint

public fingerprint: pulumi.Output<string>;
The fingerprint of the instance group manager.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instanceGroup

public instanceGroup: pulumi.Output<string>;
The full URL of the instance group created by the manager.

property name

public name: pulumi.Output<string>;
- Version name.

property namedPorts

public namedPorts: pulumi.Output<InstanceGroupManagerNamedPort[] | undefined>;
The named port configuration. See the section below for details on configuration.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
public selfLink: pulumi.Output<string>;
The URL of the created resource.

property statefulDisks

public statefulDisks: pulumi.Output<InstanceGroupManagerStatefulDisk[] | undefined>;
Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs).

property targetPools

public targetPools: pulumi.Output<string[] | undefined>;
The full URL of all target pools to which new instances in the group are added. Updating the target pools attribute does not affect existing instances.

property targetSize

public targetSize: pulumi.Output<number>;
- The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.

property updatePolicy

public updatePolicy: pulumi.Output<InstanceGroupManagerUpdatePolicy>;
The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/patch)

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property versions

public versions: pulumi.Output<InstanceGroupManagerVersion[]>;
Application versions managed by this instance group. Each version deals with a specific instance template, allowing canary release scenarios. Structure is documented below.

property waitForInstances

public waitForInstances: pulumi.Output<boolean | undefined>;
Whether to wait for all instances to be created/updated before returning. Note that if this is set to true and the operation does not succeed, this provider will continue trying until it times out.

property zone

public zone: pulumi.Output<string>;
The zone that instances in this group should be created in.

Resource InstanceGroupNamedPort

class InstanceGroupNamedPort extends CustomResource
Mange the named ports setting for a managed instance group without managing the group as whole. This resource is primarily intended for use with GKE-generated groups that shouldn't otherwise be managed by other tools. To get more information about InstanceGroupNamedPort, see: * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/instanceGroup) * How-to Guides * [Official Documentation](https://cloud.google.com/compute/docs/instance-groups/) #### Example Usage - Instance Group Named Port Gke ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const containerNetwork = new gcp.compute.Network("containerNetwork", {autoCreateSubnetworks: false}); const containerSubnetwork = new gcp.compute.Subnetwork("containerSubnetwork", { region: "us-central1", network: containerNetwork.name, ipCidrRange: "10.0.36.0/24", }); const myCluster = new gcp.container.Cluster("myCluster", { location: "us-central1-a", initialNodeCount: 1, network: containerNetwork.name, subnetwork: containerSubnetwork.name, ip_allocation_policy: { clusterIpv4CidrBlock: "/19", servicesIpv4CidrBlock: "/22", }, }); const myPort = new gcp.compute.InstanceGroupNamedPort("myPort", { group: myCluster.instanceGroupUrls[0], zone: "us-central1-a", port: 8080, }); const myPorts = new gcp.compute.InstanceGroupNamedPort("myPorts", { group: myCluster.instanceGroupUrls[0], zone: "us-central1-a", port: 4443, }); ```

constructor

new InstanceGroupNamedPort(name: string, args: InstanceGroupNamedPortArgs, opts?: pulumi.CustomResourceOptions)
Create a InstanceGroupNamedPort resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceGroupNamedPortState, opts?: pulumi.CustomResourceOptions): InstanceGroupNamedPort
Get an existing InstanceGroupNamedPort resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is InstanceGroupNamedPort
Returns true if the given object is an instance of InstanceGroupNamedPort. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property group

public group: pulumi.Output<string>;
The name of the instance group.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;
The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.

property port

public port: pulumi.Output<number>;
The port number, which can be a value between 1 and 65535.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;
The zone of the instance group.

Resource InstanceIAMBinding

class InstanceIAMBinding extends CustomResource
Three different resources help you manage your IAM policy for Compute Engine Instance. Each of these resources serves a different use case: * `gcp.compute.InstanceIAMPolicy`: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached. * `gcp.compute.InstanceIAMBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved. * `gcp.compute.InstanceIAMMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved. > **Note:** `gcp.compute.InstanceIAMPolicy` **cannot** be used in conjunction with `gcp.compute.InstanceIAMBinding` and `gcp.compute.InstanceIAMMember` or they will fight over what your policy should be. > **Note:** `gcp.compute.InstanceIAMBinding` resources **can be** used in conjunction with `gcp.compute.InstanceIAMMember` resources **only if** they do not grant privilege to the same role. #### google\_compute\_instance\_iam\_policy ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const admin = gcp.organizations.getIAMPolicy({ binding: [{ role: "roles/compute.osLogin", members: ["user:jane@example.com"], }], }); const policy = new gcp.compute.InstanceIAMPolicy("policy", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, policyData: admin.then(admin => admin.policyData), }); ``` With IAM Conditions: ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const admin = gcp.organizations.getIAMPolicy({ binding: [{ role: "roles/compute.osLogin", members: ["user:jane@example.com"], condition: { title: "expiresAfter20191231", description: "Expiring at midnight of 2019-12-31", expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")", }, }], }); const policy = new gcp.compute.InstanceIAMPolicy("policy", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, policyData: admin.then(admin => admin.policyData), }); ``` #### google\_compute\_instance\_iam\_binding ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const binding = new gcp.compute.InstanceIAMBinding("binding", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, role: "roles/compute.osLogin", members: ["user:jane@example.com"], }); ``` With IAM Conditions: ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const binding = new gcp.compute.InstanceIAMBinding("binding", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, role: "roles/compute.osLogin", members: ["user:jane@example.com"], condition: { title: "expiresAfter20191231", description: "Expiring at midnight of 2019-12-31", expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")", }, }); ``` #### google\_compute\_instance\_iam\_member ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const member = new gcp.compute.InstanceIAMMember("member", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, role: "roles/compute.osLogin", member: "user:jane@example.com", }); ``` With IAM Conditions: ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const member = new gcp.compute.InstanceIAMMember("member", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, role: "roles/compute.osLogin", member: "user:jane@example.com", condition: { title: "expiresAfter20191231", description: "Expiring at midnight of 2019-12-31", expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")", }, }); ```

constructor

new InstanceIAMBinding(name: string, args: InstanceIAMBindingArgs, opts?: pulumi.CustomResourceOptions)
Create a InstanceIAMBinding resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceIAMBindingState, opts?: pulumi.CustomResourceOptions): InstanceIAMBinding
Get an existing InstanceIAMBinding resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is InstanceIAMBinding
Returns true if the given object is an instance of InstanceIAMBinding. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property condition

public condition: pulumi.Output<InstanceIAMBindingCondition | undefined>;
) An [IAM Condition](https://cloud.google.com/iam/docs/conditions-overview) for a given binding. Structure is documented below.

property etag

public etag: pulumi.Output<string>;
(Computed) The etag of the IAM policy.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instanceName

public instanceName: pulumi.Output<string>;
Used to find the parent resource to bind the IAM policy to

property members

public members: pulumi.Output<string[]>;

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property role

public role: pulumi.Output<string>;
The role that should be applied. Only one `gcp.compute.InstanceIAMBinding` can be used per role. Note that custom roles must be of the format `[projects|organizations]/{parent-name}/roles/{role-name}`.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;
A reference to the zone where the machine resides. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no zone is provided in the parent identifier and no zone is specified, it is taken from the provider configuration.

Resource InstanceIAMMember

class InstanceIAMMember extends CustomResource
Three different resources help you manage your IAM policy for Compute Engine Instance. Each of these resources serves a different use case: * `gcp.compute.InstanceIAMPolicy`: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached. * `gcp.compute.InstanceIAMBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved. * `gcp.compute.InstanceIAMMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved. > **Note:** `gcp.compute.InstanceIAMPolicy` **cannot** be used in conjunction with `gcp.compute.InstanceIAMBinding` and `gcp.compute.InstanceIAMMember` or they will fight over what your policy should be. > **Note:** `gcp.compute.InstanceIAMBinding` resources **can be** used in conjunction with `gcp.compute.InstanceIAMMember` resources **only if** they do not grant privilege to the same role. #### google\_compute\_instance\_iam\_policy ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const admin = gcp.organizations.getIAMPolicy({ binding: [{ role: "roles/compute.osLogin", members: ["user:jane@example.com"], }], }); const policy = new gcp.compute.InstanceIAMPolicy("policy", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, policyData: admin.then(admin => admin.policyData), }); ``` With IAM Conditions: ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const admin = gcp.organizations.getIAMPolicy({ binding: [{ role: "roles/compute.osLogin", members: ["user:jane@example.com"], condition: { title: "expiresAfter20191231", description: "Expiring at midnight of 2019-12-31", expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")", }, }], }); const policy = new gcp.compute.InstanceIAMPolicy("policy", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, policyData: admin.then(admin => admin.policyData), }); ``` #### google\_compute\_instance\_iam\_binding ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const binding = new gcp.compute.InstanceIAMBinding("binding", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, role: "roles/compute.osLogin", members: ["user:jane@example.com"], }); ``` With IAM Conditions: ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const binding = new gcp.compute.InstanceIAMBinding("binding", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, role: "roles/compute.osLogin", members: ["user:jane@example.com"], condition: { title: "expiresAfter20191231", description: "Expiring at midnight of 2019-12-31", expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")", }, }); ``` #### google\_compute\_instance\_iam\_member ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const member = new gcp.compute.InstanceIAMMember("member", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, role: "roles/compute.osLogin", member: "user:jane@example.com", }); ``` With IAM Conditions: ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const member = new gcp.compute.InstanceIAMMember("member", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, role: "roles/compute.osLogin", member: "user:jane@example.com", condition: { title: "expiresAfter20191231", description: "Expiring at midnight of 2019-12-31", expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")", }, }); ```

constructor

new InstanceIAMMember(name: string, args: InstanceIAMMemberArgs, opts?: pulumi.CustomResourceOptions)
Create a InstanceIAMMember resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceIAMMemberState, opts?: pulumi.CustomResourceOptions): InstanceIAMMember
Get an existing InstanceIAMMember resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is InstanceIAMMember
Returns true if the given object is an instance of InstanceIAMMember. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property condition

public condition: pulumi.Output<InstanceIAMMemberCondition | undefined>;
) An [IAM Condition](https://cloud.google.com/iam/docs/conditions-overview) for a given binding. Structure is documented below.

property etag

public etag: pulumi.Output<string>;
(Computed) The etag of the IAM policy.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instanceName

public instanceName: pulumi.Output<string>;
Used to find the parent resource to bind the IAM policy to

property member

public member: pulumi.Output<string>;

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property role

public role: pulumi.Output<string>;
The role that should be applied. Only one `gcp.compute.InstanceIAMBinding` can be used per role. Note that custom roles must be of the format `[projects|organizations]/{parent-name}/roles/{role-name}`.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;
A reference to the zone where the machine resides. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no zone is provided in the parent identifier and no zone is specified, it is taken from the provider configuration.

Resource InstanceIAMPolicy

class InstanceIAMPolicy extends CustomResource
Three different resources help you manage your IAM policy for Compute Engine Instance. Each of these resources serves a different use case: * `gcp.compute.InstanceIAMPolicy`: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached. * `gcp.compute.InstanceIAMBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved. * `gcp.compute.InstanceIAMMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved. > **Note:** `gcp.compute.InstanceIAMPolicy` **cannot** be used in conjunction with `gcp.compute.InstanceIAMBinding` and `gcp.compute.InstanceIAMMember` or they will fight over what your policy should be. > **Note:** `gcp.compute.InstanceIAMBinding` resources **can be** used in conjunction with `gcp.compute.InstanceIAMMember` resources **only if** they do not grant privilege to the same role. #### google\_compute\_instance\_iam\_policy ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const admin = gcp.organizations.getIAMPolicy({ binding: [{ role: "roles/compute.osLogin", members: ["user:jane@example.com"], }], }); const policy = new gcp.compute.InstanceIAMPolicy("policy", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, policyData: admin.then(admin => admin.policyData), }); ``` With IAM Conditions: ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const admin = gcp.organizations.getIAMPolicy({ binding: [{ role: "roles/compute.osLogin", members: ["user:jane@example.com"], condition: { title: "expiresAfter20191231", description: "Expiring at midnight of 2019-12-31", expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")", }, }], }); const policy = new gcp.compute.InstanceIAMPolicy("policy", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, policyData: admin.then(admin => admin.policyData), }); ``` #### google\_compute\_instance\_iam\_binding ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const binding = new gcp.compute.InstanceIAMBinding("binding", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, role: "roles/compute.osLogin", members: ["user:jane@example.com"], }); ``` With IAM Conditions: ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const binding = new gcp.compute.InstanceIAMBinding("binding", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, role: "roles/compute.osLogin", members: ["user:jane@example.com"], condition: { title: "expiresAfter20191231", description: "Expiring at midnight of 2019-12-31", expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")", }, }); ``` #### google\_compute\_instance\_iam\_member ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const member = new gcp.compute.InstanceIAMMember("member", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, role: "roles/compute.osLogin", member: "user:jane@example.com", }); ``` With IAM Conditions: ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const member = new gcp.compute.InstanceIAMMember("member", { project: google_compute_instance["default"].project, zone: google_compute_instance["default"].zone, instanceName: google_compute_instance["default"].name, role: "roles/compute.osLogin", member: "user:jane@example.com", condition: { title: "expiresAfter20191231", description: "Expiring at midnight of 2019-12-31", expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")", }, }); ```

constructor

new InstanceIAMPolicy(name: string, args: InstanceIAMPolicyArgs, opts?: pulumi.CustomResourceOptions)
Create a InstanceIAMPolicy resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceIAMPolicyState, opts?: pulumi.CustomResourceOptions): InstanceIAMPolicy
Get an existing InstanceIAMPolicy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is InstanceIAMPolicy
Returns true if the given object is an instance of InstanceIAMPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property etag

public etag: pulumi.Output<string>;
(Computed) The etag of the IAM policy.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instanceName

public instanceName: pulumi.Output<string>;
Used to find the parent resource to bind the IAM policy to

property policyData

public policyData: pulumi.Output<string>;
The policy data generated by a `gcp.organizations.getIAMPolicy` data source.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;
A reference to the zone where the machine resides. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no zone is provided in the parent identifier and no zone is specified, it is taken from the provider configuration.

Resource InstanceTemplate

class InstanceTemplate extends CustomResource
Manages a VM instance template resource within GCE. For more information see [the official documentation](https://cloud.google.com/compute/docs/instance-templates) and [API](https://cloud.google.com/compute/docs/reference/latest/instanceTemplates). #### Example Usage ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const myImage = gcp.compute.getImage({ family: "debian-9", project: "debian-cloud", }); const foobar = new gcp.compute.Disk("foobar", { image: myImage.then(myImage => myImage.selfLink), size: 10, type: "pd-ssd", zone: "us-central1-a", }); const _default = new gcp.compute.InstanceTemplate("default", { description: "This template is used to create app server instances.", tags: [ "foo", "bar", ], labels: { environment: "dev", }, instanceDescription: "description assigned to instances", machineType: "n1-standard-1", canIpForward: false, scheduling: { automaticRestart: true, onHostMaintenance: "MIGRATE", }, disk: [ { sourceImage: "debian-cloud/debian-9", autoDelete: true, boot: true, }, { source: foobar.name, autoDelete: false, boot: false, }, ], network_interface: [{ network: "default", }], metadata: { foo: "bar", }, service_account: { scopes: [ "userinfo-email", "compute-ro", "storage-ro", ], }, }); ``` #### Using with Instance Group Manager Instance Templates cannot be updated after creation with the Google Cloud Platform API. In order to update an Instance Template, this provider will create a replacement. In order to effectively use an Instance Template resource with an [Instance Group Manager resource](https://www.terraform.io/docs/providers/google/r/compute_instance_group_manager.html). Either omit the Instance Template `name` attribute, or specify a partial name with `namePrefix`. Example: ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", { namePrefix: "instance-template-", machineType: "n1-standard-1", region: "us-central1", disk: [{}], network_interface: [{}], }); const instanceGroupManager = new gcp.compute.InstanceGroupManager("instanceGroupManager", { instanceTemplate: instanceTemplate.selfLink, baseInstanceName: "instance-group-manager", zone: "us-central1-f", targetSize: "1", }); ``` With this setup, this provider generates a unique name for your Instance Template and can then update the Instance Group manager without conflict before destroying the previous Instance Template. #### Deploying the Latest Image A common way to use instance templates and managed instance groups is to deploy the latest image in a family, usually the latest build of your application. There are two ways to do this in the provider, and they have their pros and cons. The difference ends up being in how "latest" is interpreted. You can either deploy the latest image available when the provider runs, or you can have each instance check what the latest image is when it's being created, either as part of a scaling event or being rebuilt by the instance group manager. If you're not sure, we recommend deploying the latest image available when the provider runs, because this means all the instances in your group will be based on the same image, always, and means that no upgrades or changes to your instances happen outside of a `pulumi up`. You can achieve this by using the `gcp.compute.Image` data source, which will retrieve the latest image on every `pulumi apply`, and will update the template to use that specific image: ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const myImage = gcp.compute.getImage({ family: "debian-9", project: "debian-cloud", }); const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", { namePrefix: "instance-template-", machineType: "n1-standard-1", region: "us-central1", disk: [{ sourceImage: google_compute_image.my_image.self_link, }], }); ``` To have instances update to the latest on every scaling event or instance re-creation, use the family as the image for the disk, and it will use GCP's default behavior, setting the image for the template to the family: ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", { // boot disk disks: [{ sourceImage: "debian-cloud/debian-9", }], machineType: "n1-standard-1", namePrefix: "instance-template-", region: "us-central1", }); ```

constructor

new InstanceTemplate(name: string, args: InstanceTemplateArgs, opts?: pulumi.CustomResourceOptions)
Create a InstanceTemplate resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceTemplateState, opts?: pulumi.CustomResourceOptions): InstanceTemplate
Get an existing InstanceTemplate resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is InstanceTemplate
Returns true if the given object is an instance of InstanceTemplate. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property canIpForward

public canIpForward: pulumi.Output<boolean | undefined>;
Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

property description

public description: pulumi.Output<string | undefined>;
A brief description of this resource.

property disks

public disks: pulumi.Output<InstanceTemplateDisk[]>;
Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

property enableDisplay

public enableDisplay: pulumi.Output<boolean | undefined>;
Enable [Virtual Displays](https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display#verify_display_driver) on this instance. **Note**: `allowStoppingForUpdate` must be set to true in order to update this field.

property guestAccelerators

public guestAccelerators: pulumi.Output<InstanceTemplateGuestAccelerator[] | undefined>;
List of the type and count of accelerator cards attached to the instance. Structure documented below.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instanceDescription

public instanceDescription: pulumi.Output<string | undefined>;
A brief description to use for instances created from this template.

property labels

public labels: pulumi.Output<{[key: string]: string} | undefined>;
A set of key/value label pairs to assign to instances created from this template,

property machineType

public machineType: pulumi.Output<string>;
The machine type to create.

property metadata

public metadata: pulumi.Output<{[key: string]: any} | undefined>;
Metadata key/value pairs to make available from within instances created from this template.

property metadataFingerprint

public metadataFingerprint: pulumi.Output<string>;
The unique fingerprint of the metadata.

property metadataStartupScript

public metadataStartupScript: pulumi.Output<string | undefined>;
An alternative to using the startup-script metadata key, mostly to match the computeInstance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

property minCpuPlatform

public minCpuPlatform: pulumi.Output<string | undefined>;
Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as `Intel Haswell` or `Intel Skylake`. See the complete list [here](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform).

property name

public name: pulumi.Output<string>;
The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

property namePrefix

public namePrefix: pulumi.Output<string>;
Creates a unique name beginning with the specified prefix. Conflicts with `name`.

property networkInterfaces

public networkInterfaces: pulumi.Output<InstanceTemplateNetworkInterface[] | undefined>;
Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;
An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom `subnetwork` resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

property scheduling

public scheduling: pulumi.Output<InstanceTemplateScheduling>;
The scheduling strategy to use. More details about this configuration option are detailed below.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property serviceAccount

public serviceAccount: pulumi.Output<InstanceTemplateServiceAccount | undefined>;
Service account to attach to the instance. Structure is documented below.

property shieldedInstanceConfig

public shieldedInstanceConfig: pulumi.Output<InstanceTemplateShieldedInstanceConfig>;
Enable [Shielded VM](https://cloud.google.com/security/shielded-cloud/shielded-vm) on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. **Note**: `shieldedInstanceConfig` can only be used with boot images with shielded vm support. See the complete list [here](https://cloud.google.com/compute/docs/images#shielded-images).

property tags

public tags: pulumi.Output<string[] | undefined>;
Tags to attach to the instance.

property tagsFingerprint

public tagsFingerprint: pulumi.Output<string>;
The unique fingerprint of the tags.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource InterconnectAttachment

class InterconnectAttachment extends CustomResource
Represents an InterconnectAttachment (VLAN attachment) resource. For more information, see Creating VLAN Attachments. #### Example Usage - Interconnect Attachment Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const foobar = new gcp.compute.Router("foobar", {network: google_compute_network.foobar.name}); const onPrem = new gcp.compute.InterconnectAttachment("onPrem", { interconnect: "my-interconnect-id", router: foobar.id, }); ```

constructor

new InterconnectAttachment(name: string, args: InterconnectAttachmentArgs, opts?: pulumi.CustomResourceOptions)
Create a InterconnectAttachment resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InterconnectAttachmentState, opts?: pulumi.CustomResourceOptions): InterconnectAttachment
Get an existing InterconnectAttachment resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is InterconnectAttachment
Returns true if the given object is an instance of InterconnectAttachment. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property adminEnabled

public adminEnabled: pulumi.Output<boolean | undefined>;
Whether the VLAN attachment is enabled or disabled. When using PARTNER type this will Pre-Activate the interconnect attachment

property bandwidth

public bandwidth: pulumi.Output<string>;
Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, Defaults to BPS_10G

property candidateSubnets

public candidateSubnets: pulumi.Output<string[] | undefined>;
Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress and customerRouterIpAddress for this attachment. All prefixes must be within link-local address space (169.254.0.0/16) and must be /29 or shorter (/28, /27, etc). Google will attempt to select an unused /29 from the supplied candidate prefix(es). The request will fail if all possible /29s are in use on Google's edge. If not supplied, Google will randomly select an unused /29 from all of link-local space.

property cloudRouterIpAddress

public cloudRouterIpAddress: pulumi.Output<string>;
IPv4 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property customerRouterIpAddress

public customerRouterIpAddress: pulumi.Output<string>;
IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource.

property edgeAvailabilityDomain

public edgeAvailabilityDomain: pulumi.Output<string>;
Desired availability domain for the attachment. Only available for type PARTNER, at creation time. For improved reliability, customers should configure a pair of attachments with one per availability domain. The selected availability domain will be provided to the Partner via the pairing key so that the provisioned circuit will lie in the specified domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.

property googleReferenceId

public googleReferenceId: pulumi.Output<string>;
Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property interconnect

public interconnect: pulumi.Output<string | undefined>;
URL of the underlying Interconnect object that this attachment's traffic will traverse through. Required if type is DEDICATED, must not be set if type is PARTNER.

property name

public name: pulumi.Output<string>;
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.

property pairingKey

public pairingKey: pulumi.Output<string>;
[Output only for type PARTNER. Not present for DEDICATED]. The opaque identifier of an PARTNER attachment used to initiate provisioning with a selected partner. Of the form "XXXXX/region/domain"

property partnerAsn

public partnerAsn: pulumi.Output<string>;
[Output only for type PARTNER. Not present for DEDICATED]. Optional BGP ASN for the router that should be supplied by a layer 3 Partner if they configured BGP on behalf of the customer.

property privateInterconnectInfo

public privateInterconnectInfo: pulumi.Output<InterconnectAttachmentPrivateInterconnectInfo>;
Information specific to an InterconnectAttachment. This property is populated if the interconnect that this is attached to is of type DEDICATED.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;
Region where the regional interconnect attachment resides.

property router

public router: pulumi.Output<string>;
URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network & region within which the Cloud Router is configured.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property state

public state: pulumi.Output<string>;
[Output Only] The current state of this attachment's functionality.

property type

public type: pulumi.Output<string>;
The type of InterconnectAttachment you wish to create. Defaults to DEDICATED.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property vlanTag8021q

public vlanTag8021q: pulumi.Output<number>;
The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When using PARTNER type this will be managed upstream.

Resource ManagedSslCertificate

class ManagedSslCertificate extends CustomResource
An SslCertificate resource, used for HTTPS load balancing. This resource represents a certificate for which the certificate secrets are created and managed by Google. For a resource where you provide the key, see the SSL Certificate resource. To get more information about ManagedSslCertificate, see: * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/sslCertificates) * How-to Guides * [Official Documentation](https://cloud.google.com/load-balancing/docs/ssl-certificates) > **Warning:** This resource should be used with extreme caution! Provisioning an SSL certificate is complex. Ensure that you understand the lifecycle of a certificate before attempting complex tasks like cert rotation automatically. This resource will "return" as soon as the certificate object is created, but post-creation the certificate object will go through a "provisioning" process. The provisioning process can complete only when the domain name for which the certificate is created points to a target pool which, itself, points at the certificate. Depending on your DNS provider, this may take some time, and migrating from self-managed certificates to Google-managed certificates may entail some downtime while the certificate provisions. In conclusion: Be extremely cautious. #### Example Usage - Managed Ssl Certificate Basic ```typescript import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const defaultManagedSslCertificate = new gcp.compute.ManagedSslCertificate("defaultManagedSslCertificate", {managed: { domains: ["sslcert.tf-test.club."], }}); const defaultHttpHealthCheck = new gcp.compute.HttpHealthCheck("defaultHttpHealthCheck", { requestPath: "/", checkIntervalSec: 1, timeoutSec: 1, }); const defaultBackendService = new gcp.compute.BackendService("defaultBackendService", { portName: "http", protocol: "HTTP", timeoutSec: 10, healthChecks: [defaultHttpHealthCheck.id], }); const defaultURLMap = new gcp.compute.URLMap("defaultURLMap", { description: "a description", defaultService: defaultBackendService.id, host_rule: [{ hosts: ["sslcert.tf-test.club"], pathMatcher: "allpaths", }], path_matcher: [{ name: "allpaths", defaultService: defaultBackendService.id, path_rule: [{ paths: ["/*"], service: defaultBackendService.id, }], }], }); const defaultTargetHttpsProxy = new gcp.compute.TargetHttpsProxy("defaultTargetHttpsProxy", { urlMap: defaultURLMap.id, sslCertificates: [defaultManagedSslCertificate.id], }); const zone = new gcp.dns.ManagedZone("zone", {dnsName: "sslcert.tf-test.club."}); const defaultGlobalForwardingRule = new gcp.compute.GlobalForwardingRule("defaultGlobalForwardingRule", { target: defaultTargetHttpsProxy.id, portRange: 443, }); const set = new gcp.dns.RecordSet("set", { type: "A", ttl: 3600, managedZone: zone.name, rrdatas: [defaultGlobalForwardingRule.ipAddress], }); ```

constructor

new ManagedSslCertificate(name: string, args?: ManagedSslCertificateArgs, opts?: pulumi.CustomResourceOptions)
Create a ManagedSslCertificate resource with the given unique name, arguments, and options. * `name` The _unique_ name of the resource. * `args` The arguments to use to populate this resource's properties. * `opts` A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ManagedSslCertificateState, opts?: pulumi.CustomResourceOptions): ManagedSslCertificate
Get an existing ManagedSslCertificate resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ManagedSslCertificate
Returns true if the given object is an instance of ManagedSslCertificate. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property certificateId

public certificateId: pulumi.Output<number>;
The unique identifier for the resource.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;
Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;
An optional description of this resource.

property expireTime

public expireTime: pulumi.Output<string>;
Expire time of the certificate.

property id

id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property managed

public managed: pulumi.Output<ManagedSslCertificateManaged | undefined>;
Properties relevant to a managed certificate. These will be used if the certificate is managed (as indicated by a value of `MANAGED` in `type`). Structure is documented below.

property name

public name: pulumi.Output<string>;
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.

property project

public project: pulumi.Output<string>;
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
public selfLink: pulumi.Output<string>;
The URI of the created resource.

property subjectAlternativeNames

public subjectAlternativeNames: pulumi.Output<string[]>;
Domains associated with the certificate via Subject Alternative Name.

property type

public type: pulumi.Output<string | undefined>;
Enum field whose value is always `MANAGED` - used to signal to the API which type this is.

property urn

urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource MangedSslCertificate

DEPRECATED gcp.compute.MangedSslCertificate has been deprecated in favor of gcp.compute.ManagedSslCertificate
class MangedSslCertificate extends CustomResource

constructor

DEPRECATED gcp.compute.MangedSslCertificate has been deprecated in favor of gcp.compute.ManagedSslCertificate

DEPRECATED gcp.compute.MangedSslCertificate has been deprecated in favor of gcp.compute.ManagedSslCertificate
new MangedSslCertificate(name: string, args?: MangedSslCertificateArgs, opts?: pulumi.CustomResourceOptions)

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MangedSslCertificateState, opts?: pulumi.CustomResourceOptions): MangedSslCertificate

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is MangedSslCertificate

Returns true if the given object is an instance of MangedSslCertificate. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property certificateId

public certificateId: pulumi.Output<number>;

The unique identifier for the resource.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;

An optional description of this resource.

property expireTime

public expireTime: pulumi.Output<string>;

Expire time of the certificate.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property managed

public managed: pulumi.Output<MangedSslCertificateManaged | undefined>;

Properties relevant to a managed certificate. These will be used if the certificate is managed (as indicated by a value of ‘MANAGED’ in ‘type’).

property name

public name: pulumi.Output<string>;

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. These are in the same namespace as the managed SSL certificates.

property project

public project: pulumi.Output<string>;
public selfLink: pulumi.Output<string>;

property subjectAlternativeNames

public subjectAlternativeNames: pulumi.Output<string[]>;

Domains associated with the certificate via Subject Alternative Name.

property type

public type: pulumi.Output<string | undefined>;

Enum field whose value is always ‘MANAGED’ - used to signal to the API which type this is. Default value: “MANAGED” Possible values: [“MANAGED”]

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Network

class Network extends CustomResource

Manages a VPC network or legacy network resource on GCP.

To get more information about Network, see:

Example Usage - Network Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const vpcNetwork = new gcp.compute.Network("vpcNetwork", {});

constructor

new Network(name: string, args?: NetworkArgs, opts?: pulumi.CustomResourceOptions)

Create a Network resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NetworkState, opts?: pulumi.CustomResourceOptions): Network

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is 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.

property autoCreateSubnetworks

public autoCreateSubnetworks: pulumi.Output<boolean | undefined>;

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.

property deleteDefaultRoutesOnCreate

public deleteDefaultRoutesOnCreate: pulumi.Output<boolean | undefined>;

If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.

property description

public description: pulumi.Output<string | undefined>;

An optional description of this resource. The resource must be recreated to modify this field.

property gatewayIpv4

public gatewayIpv4: pulumi.Output<string>;

The gateway address for default routing out of the network. This value is selected by GCP.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

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.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property routingMode

public routingMode: pulumi.Output<string>;

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.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource NetworkEndpoint

class NetworkEndpoint extends CustomResource

A Network endpoint represents a IP address and port combination that is part of a specific network endpoint group (NEG). NEGs are zonals collection of these endpoints for GCP resources within a single subnet. NOTE: Network endpoints cannot be created outside of a network endpoint group.

To get more information about NetworkEndpoint, see:

Example Usage - Network Endpoint

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myImage = gcp.compute.getImage({
    family: "debian-9",
    project: "debian-cloud",
});
const defaultNetwork = new gcp.compute.Network("defaultNetwork", {autoCreateSubnetworks: false});
const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", {
    ipCidrRange: "10.0.0.1/16",
    region: "us-central1",
    network: defaultNetwork.id,
});
const endpointInstance = new gcp.compute.Instance("endpoint-instance", {
    machineType: "n1-standard-1",
    boot_disk: {
        initialize_params: {
            image: myImage.then(myImage => myImage.selfLink),
        },
    },
    network_interface: [{
        subnetwork: defaultSubnetwork.id,
        access_config: [{}],
    }],
});
const defaultEndpoint = new gcp.compute.NetworkEndpoint("default-endpoint", {
    networkEndpointGroup: google_compute_network_endpoint_group.neg.name,
    instance: endpoint_instance.name,
    port: google_compute_network_endpoint_group.neg.default_port,
    ipAddress: endpoint_instance.networkInterfaces.apply(networkInterfaces => networkInterfaces[0].networkIp),
});
const group = new gcp.compute.NetworkEndpointGroup("group", {
    network: defaultNetwork.id,
    subnetwork: defaultSubnetwork.id,
    defaultPort: "90",
    zone: "us-central1-a",
});

constructor

new NetworkEndpoint(name: string, args: NetworkEndpointArgs, opts?: pulumi.CustomResourceOptions)

Create a NetworkEndpoint resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NetworkEndpointState, opts?: pulumi.CustomResourceOptions): NetworkEndpoint

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is NetworkEndpoint

Returns true if the given object is an instance of NetworkEndpoint. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instance

public instance: pulumi.Output<string>;

The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.

property ipAddress

public ipAddress: pulumi.Output<string>;

IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).

property networkEndpointGroup

public networkEndpointGroup: pulumi.Output<string>;

The network endpoint group this endpoint is part of.

property port

public port: pulumi.Output<number>;

Port number of network endpoint.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;

Zone where the containing network endpoint group is located.

Resource NetworkEndpointGroup

class NetworkEndpointGroup extends CustomResource

Network endpoint groups (NEGs) are zonal resources that represent collections of IP address and port combinations for GCP resources within a single subnet. Each IP address and port combination is called a network endpoint.

Network endpoint groups can be used as backends in backend services for HTTP(S), TCP proxy, and SSL proxy load balancers. You cannot use NEGs as a backend with internal load balancers. Because NEG backends allow you to specify IP addresses and ports, you can distribute traffic in a granular fashion among applications or containers running within VM instances.

To get more information about NetworkEndpointGroup, see:

Example Usage - Network Endpoint Group

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultNetwork = new gcp.compute.Network("defaultNetwork", {autoCreateSubnetworks: false});
const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", {
    ipCidrRange: "10.0.0.0/16",
    region: "us-central1",
    network: defaultNetwork.id,
});
const neg = new gcp.compute.NetworkEndpointGroup("neg", {
    network: defaultNetwork.id,
    subnetwork: defaultSubnetwork.id,
    defaultPort: "90",
    zone: "us-central1-a",
});

constructor

new NetworkEndpointGroup(name: string, args: NetworkEndpointGroupArgs, opts?: pulumi.CustomResourceOptions)

Create a NetworkEndpointGroup resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NetworkEndpointGroupState, opts?: pulumi.CustomResourceOptions): NetworkEndpointGroup

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is NetworkEndpointGroup

Returns true if the given object is an instance of NetworkEndpointGroup. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property defaultPort

public defaultPort: pulumi.Output<number | undefined>;

The default port used if the port number is not specified in the network endpoint.

property description

public description: pulumi.Output<string | undefined>;

An optional description of this resource. Provide this property when you create the resource.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

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.

property network

public network: pulumi.Output<string>;

The network to which all network endpoints in the NEG belong. Uses “default” project network if unspecified.

property networkEndpointType

public networkEndpointType: pulumi.Output<string | undefined>;

Type of network endpoints in this network endpoint group.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property size

public size: pulumi.Output<number>;

Number of network endpoints in the network endpoint group.

property subnetwork

public subnetwork: pulumi.Output<string | undefined>;

Optional subnetwork to which all network endpoints in the NEG belong.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;

Zone where the network endpoint group is located.

Resource NetworkPeering

class NetworkPeering extends CustomResource

Manages a network peering within GCE. For more information see the official documentation and API.

Both network must create a peering with each other for the peering to be functional.

Subnets IP ranges across peered VPC networks cannot overlap.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.compute.Network("default", {autoCreateSubnetworks: "false"});
const other = new gcp.compute.Network("other", {autoCreateSubnetworks: "false"});
const peering1 = new gcp.compute.NetworkPeering("peering1", {
    network: _default.selfLink,
    peerNetwork: other.selfLink,
});
const peering2 = new gcp.compute.NetworkPeering("peering2", {
    network: other.selfLink,
    peerNetwork: _default.selfLink,
});

constructor

new NetworkPeering(name: string, args: NetworkPeeringArgs, opts?: pulumi.CustomResourceOptions)

Create a NetworkPeering resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NetworkPeeringState, opts?: pulumi.CustomResourceOptions): NetworkPeering

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is NetworkPeering

Returns true if the given object is an instance of NetworkPeering. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property exportCustomRoutes

public exportCustomRoutes: pulumi.Output<boolean | undefined>;

Whether to export the custom routes to the peer network. Defaults to false.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property importCustomRoutes

public importCustomRoutes: pulumi.Output<boolean | undefined>;

Whether to export the custom routes from the peer network. Defaults to false.

property name

public name: pulumi.Output<string>;

Name of the peering.

property network

public network: pulumi.Output<string>;

The primary network of the peering.

property peerNetwork

public peerNetwork: pulumi.Output<string>;

The peer network in the peering. The peer network may belong to a different project.

property state

public state: pulumi.Output<string>;

State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there’s a matching configuration in the peer network.

property stateDetails

public stateDetails: pulumi.Output<string>;

Details about the current state of the peering.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource NetworkPeeringRoutesConfig

class NetworkPeeringRoutesConfig extends CustomResource

Manage a network peering’s route settings without managing the peering as a whole. This resource is primarily intended for use with GCP-generated peerings that shouldn’t otherwise be managed by other tools. Deleting this resource is a no-op and the peering will not be modified.

To get more information about NetworkPeeringRoutesConfig, see:

Example Usage - Network Peering Routes Config Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const networkPrimary = new gcp.compute.Network("networkPrimary", {autoCreateSubnetworks: "false"});
const networkSecondary = new gcp.compute.Network("networkSecondary", {autoCreateSubnetworks: "false"});
const peeringPrimary = new gcp.compute.NetworkPeering("peeringPrimary", {
    network: networkPrimary.id,
    peerNetwork: networkSecondary.id,
    importCustomRoutes: true,
    exportCustomRoutes: true,
});
const peeringPrimaryRoutes = new gcp.compute.NetworkPeeringRoutesConfig("peeringPrimaryRoutes", {
    peering: peeringPrimary.name,
    network: networkPrimary.name,
    importCustomRoutes: true,
    exportCustomRoutes: true,
});
const peeringSecondary = new gcp.compute.NetworkPeering("peeringSecondary", {
    network: networkSecondary.id,
    peerNetwork: networkPrimary.id,
});

constructor

new NetworkPeeringRoutesConfig(name: string, args: NetworkPeeringRoutesConfigArgs, opts?: pulumi.CustomResourceOptions)

Create a NetworkPeeringRoutesConfig resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NetworkPeeringRoutesConfigState, opts?: pulumi.CustomResourceOptions): NetworkPeeringRoutesConfig

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is NetworkPeeringRoutesConfig

Returns true if the given object is an instance of NetworkPeeringRoutesConfig. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property exportCustomRoutes

public exportCustomRoutes: pulumi.Output<boolean>;

Whether to export the custom routes to the peer network.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property importCustomRoutes

public importCustomRoutes: pulumi.Output<boolean>;

Whether to import the custom routes to the peer network.

property network

public network: pulumi.Output<string>;

The name of the primary network for the peering.

property peering

public peering: pulumi.Output<string>;

Name of the peering.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource NodeGroup

class NodeGroup extends CustomResource

Represents a NodeGroup resource to manage a group of sole-tenant nodes.

To get more information about NodeGroup, see:

Warning: Due to limitations of the API, this provider cannot update the number of nodes in a node group and changes to node group size either through provider config or through external changes will cause the provider to delete and recreate the node group.

Example Usage - Node Group Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const central1a = gcp.compute.getNodeTypes({
    zone: "us-central1-a",
});
const soletenantTmpl = new gcp.compute.NodeTemplate("soletenant-tmpl", {
    region: "us-central1",
    nodeType: central1a.then(central1a => central1a.names[0]),
});
const nodes = new gcp.compute.NodeGroup("nodes", {
    zone: "us-central1-a",
    description: "example gcp.compute.NodeGroup for the Google Provider",
    size: 1,
    nodeTemplate: soletenant_tmpl.id,
});

Example Usage - Node Group Autoscaling Policy

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const central1a = gcp.compute.getNodeTypes({
    zone: "us-central1-a",
});
const soletenantTmpl = new gcp.compute.NodeTemplate("soletenant-tmpl", {
    region: "us-central1",
    nodeType: central1a.then(central1a => central1a.names[0]),
});
const nodes = new gcp.compute.NodeGroup("nodes", {
    zone: "us-central1-a",
    description: "example gcp.compute.NodeGroup for the Google Provider",
    size: 1,
    nodeTemplate: soletenant_tmpl.id,
    autoscaling_policy: {
        mode: "ON",
        minNodes: 1,
        maxNodes: 10,
    },
});

constructor

new NodeGroup(name: string, args: NodeGroupArgs, opts?: pulumi.CustomResourceOptions)

Create a NodeGroup resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NodeGroupState, opts?: pulumi.CustomResourceOptions): NodeGroup

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is NodeGroup

Returns true if the given object is an instance of NodeGroup. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property autoscalingPolicy

public autoscalingPolicy: pulumi.Output<NodeGroupAutoscalingPolicy>;

- If you use sole-tenant nodes for your workloads, you can use the node group autoscaler to automatically manage the sizes of your node groups. Structure is documented below.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;

An optional textual description of the resource.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

Name of the resource.

property nodeTemplate

public nodeTemplate: pulumi.Output<string>;

The URL of the node template to which this node group belongs.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property size

public size: pulumi.Output<number>;

The total number of nodes in the node group.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;

Zone where this node group is located

Resource NodeTemplate

class NodeTemplate extends CustomResource

Represents a NodeTemplate resource. Node templates specify properties for creating sole-tenant nodes, such as node type, vCPU and memory requirements, node affinity labels, and region.

To get more information about NodeTemplate, see:

Example Usage - Node Template Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const central1a = gcp.compute.getNodeTypes({
    zone: "us-central1-a",
});
const template = new gcp.compute.NodeTemplate("template", {
    region: "us-central1",
    nodeType: central1a.then(central1a => central1a.names[0]),
});

Example Usage - Node Template Server Binding

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const central1a = gcp.compute.getNodeTypes({
    zone: "us-central1-a",
});
const template = new gcp.compute.NodeTemplate("template", {
    region: "us-central1",
    nodeType: central1a.then(central1a => central1a.names[0]),
    nodeAffinityLabels: {
        foo: "baz",
    },
    server_binding: {
        type: "RESTART_NODE_ON_MINIMAL_SERVERS",
    },
});

constructor

new NodeTemplate(name: string, args?: NodeTemplateArgs, opts?: pulumi.CustomResourceOptions)

Create a NodeTemplate resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NodeTemplateState, opts?: pulumi.CustomResourceOptions): NodeTemplate

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is NodeTemplate

Returns true if the given object is an instance of NodeTemplate. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;

An optional textual description of the resource.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

Name of the resource.

property nodeAffinityLabels

public nodeAffinityLabels: pulumi.Output<{[key: string]: string} | undefined>;

Labels to use for node affinity, which will be used in instance scheduling.

property nodeType

public nodeType: pulumi.Output<string | undefined>;

Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.

property nodeTypeFlexibility

public nodeTypeFlexibility: pulumi.Output<NodeTemplateNodeTypeFlexibility | undefined>;

Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. Structure is documented below.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;

Region where nodes using the node template will be created. If it is not provided, the provider region is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property serverBinding

public serverBinding: pulumi.Output<NodeTemplateServerBinding>;

The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource PacketMirroring

class PacketMirroring extends CustomResource

Packet Mirroring mirrors traffic to and from particular VM instances. You can use the collected traffic to help you detect security threats and monitor application performance.

To get more information about PacketMirroring, see:

Example Usage - Compute Packet Mirroring Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultNetwork = new gcp.compute.Network("defaultNetwork", {});
const mirror = new gcp.compute.Instance("mirror", {
    machineType: "n1-standard-1",
    boot_disk: {
        initialize_params: {
            image: "debian-cloud/debian-9",
        },
    },
    network_interface: [{
        network: defaultNetwork.id,
        access_config: [{}],
    }],
});
const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", {
    network: defaultNetwork.id,
    ipCidrRange: "10.2.0.0/16",
});
const defaultHealthCheck = new gcp.compute.HealthCheck("defaultHealthCheck", {
    checkIntervalSec: 1,
    timeoutSec: 1,
    tcp_health_check: {
        port: "80",
    },
});
const defaultRegionBackendService = new gcp.compute.RegionBackendService("defaultRegionBackendService", {healthChecks: [defaultHealthCheck.id]});
const defaultForwardingRule = new gcp.compute.ForwardingRule("defaultForwardingRule", {
    isMirroringCollector: true,
    ipProtocol: "TCP",
    loadBalancingScheme: "INTERNAL",
    backendService: defaultRegionBackendService.id,
    allPorts: true,
    network: defaultNetwork.id,
    subnetwork: defaultSubnetwork.id,
    networkTier: "PREMIUM",
});
const foobar = new gcp.compute.PacketMirroring("foobar", {
    description: "bar",
    network: {
        url: defaultNetwork.id,
    },
    collector_ilb: {
        url: defaultForwardingRule.id,
    },
    mirrored_resources: {
        tags: ["foo"],
        instances: [{
            url: mirror.id,
        }],
    },
    filter: {
        ipProtocols: ["tcp"],
        cidrRanges: ["0.0.0.0/0"],
    },
});

constructor

new PacketMirroring(name: string, args: PacketMirroringArgs, opts?: pulumi.CustomResourceOptions)

Create a PacketMirroring resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PacketMirroringState, opts?: pulumi.CustomResourceOptions): PacketMirroring

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is PacketMirroring

Returns true if the given object is an instance of PacketMirroring. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property collectorIlb

public collectorIlb: pulumi.Output<PacketMirroringCollectorIlb>;

The Forwarding Rule resource (of type load_balancing_scheme=INTERNAL) that will be used as collector for mirrored traffic. The specified forwarding rule must have isMirroringCollector set to true. Structure is documented below.

property description

public description: pulumi.Output<string | undefined>;

A human-readable description of the rule.

property filter

public filter: pulumi.Output<PacketMirroringFilter | undefined>;

A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property mirroredResources

public mirroredResources: pulumi.Output<PacketMirroringMirroredResources>;

A means of specifying which resources to mirror. Structure is documented below.

property name

public name: pulumi.Output<string>;

The name of the packet mirroring rule

property network

public network: pulumi.Output<PacketMirroringNetwork>;

Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. Structure is documented below.

property priority

public priority: pulumi.Output<number>;

Since only one rule can be active at a time, priority is used to break ties in the case of two rules that apply to the same instances.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;

The Region in which the created address should reside. If it is not provided, the provider region is used.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource PerInstanceConfig

class PerInstanceConfig extends CustomResource

A config defined for a single managed instance that belongs to an instance group manager. It preserves the instance name across instance group manager operations and can define stateful disks or metadata that are unique to the instance.

To get more information about PerInstanceConfig, see:

constructor

new PerInstanceConfig(name: string, args: PerInstanceConfigArgs, opts?: pulumi.CustomResourceOptions)

Create a PerInstanceConfig resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PerInstanceConfigState, opts?: pulumi.CustomResourceOptions): PerInstanceConfig

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is PerInstanceConfig

Returns true if the given object is an instance of PerInstanceConfig. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instanceGroupManager

public instanceGroupManager: pulumi.Output<string>;

The instance group manager this instance config is part of.

property minimalAction

public minimalAction: pulumi.Output<string | undefined>;

The minimal action to perform on the instance during an update. Default is NONE. Possible values are: * REPLACE * RESTART * REFRESH * NONE

property mostDisruptiveAllowedAction

public mostDisruptiveAllowedAction: pulumi.Output<string | undefined>;

The most disruptive action to perform on the instance during an update. Default is REPLACE. Possible values are: * REPLACE * RESTART * REFRESH * NONE

property name

public name: pulumi.Output<string>;

The name for this per-instance config and its corresponding instance.

property preservedState

public preservedState: pulumi.Output<PerInstanceConfigPreservedState | undefined>;

The preserved state for this instance. Structure is documented below.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zone

public zone: pulumi.Output<string>;

Zone where the containing instance group manager is located

Resource ProjectDefaultNetworkTier

class ProjectDefaultNetworkTier extends CustomResource

Configures the Google Compute Engine Default Network Tier for a project.

For more information, see, the Project API documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultProjectDefaultNetworkTier = new gcp.compute.ProjectDefaultNetworkTier("default", {
    networkTier: "PREMIUM",
});

constructor

new ProjectDefaultNetworkTier(name: string, args: ProjectDefaultNetworkTierArgs, opts?: pulumi.CustomResourceOptions)

Create a ProjectDefaultNetworkTier resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectDefaultNetworkTierState, opts?: pulumi.CustomResourceOptions): ProjectDefaultNetworkTier

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ProjectDefaultNetworkTier

Returns true if the given object is an instance of ProjectDefaultNetworkTier. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property networkTier

public networkTier: pulumi.Output<string>;

The default network tier to be configured for the project. This field can take the following values: PREMIUM or STANDARD.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource ProjectMetadata

class ProjectMetadata extends CustomResource

Authoritatively manages metadata common to all instances for a project in GCE. For more information see the official documentation and API.

Note: This resource manages all project-level metadata including project-level ssh keys. Keys unset in config but set on the server will be removed. If you want to manage only single key/value pairs within the project metadata rather than the entire set, then use google_compute_project_metadata_item.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultProjectMetadata = new gcp.compute.ProjectMetadata("default", {
    metadata: {
        "13": "42",
        fizz: "buzz",
        foo: "bar",
    },
});

constructor

new ProjectMetadata(name: string, args: ProjectMetadataArgs, opts?: pulumi.CustomResourceOptions)

Create a ProjectMetadata resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectMetadataState, opts?: pulumi.CustomResourceOptions): ProjectMetadata

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ProjectMetadata

Returns true if the given object is an instance of ProjectMetadata. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property metadata

public metadata: pulumi.Output<{[key: string]: string}>;

A series of key value pairs.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource ProjectMetadataItem

class ProjectMetadataItem extends CustomResource

Manages a single key/value pair on metadata common to all instances for a project in GCE. Using gcp.compute.ProjectMetadataItem lets you manage a single key/value setting in the provider rather than the entire project metadata map.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultProjectMetadataItem = new gcp.compute.ProjectMetadataItem("default", {
    key: "myMetadata",
    value: "myValue",
});

constructor

new ProjectMetadataItem(name: string, args: ProjectMetadataItemArgs, opts?: pulumi.CustomResourceOptions)

Create a ProjectMetadataItem resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectMetadataItemState, opts?: pulumi.CustomResourceOptions): ProjectMetadataItem

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ProjectMetadataItem

Returns true if the given object is an instance of ProjectMetadataItem. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property key

public key: pulumi.Output<string>;

The metadata key to set.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property value

public value: pulumi.Output<string>;

The value to set for the given metadata key.

Resource RegionAutoscaler

class RegionAutoscaler extends CustomResource

Represents an Autoscaler resource.

Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define.

To get more information about RegionAutoscaler, see:

Example Usage - Region Autoscaler Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const debian9 = gcp.compute.getImage({
    family: "debian-9",
    project: "debian-cloud",
});
const foobarInstanceTemplate = new gcp.compute.InstanceTemplate("foobarInstanceTemplate", {
    machineType: "n1-standard-1",
    canIpForward: false,
    tags: [
        "foo",
        "bar",
    ],
    disk: [{
        sourceImage: debian9.then(debian9 => debian9.selfLink),
    }],
    network_interface: [{
        network: "default",
    }],
    metadata: {
        foo: "bar",
    },
    service_account: {
        scopes: [
            "userinfo-email",
            "compute-ro",
            "storage-ro",
        ],
    },
});
const foobarTargetPool = new gcp.compute.TargetPool("foobarTargetPool", {});
const foobarRegionInstanceGroupManager = new gcp.compute.RegionInstanceGroupManager("foobarRegionInstanceGroupManager", {
    region: "us-central1",
    version: [{
        instanceTemplate: foobarInstanceTemplate.id,
        name: "primary",
    }],
    targetPools: [foobarTargetPool.id],
    baseInstanceName: "foobar",
});
const foobarRegionAutoscaler = new gcp.compute.RegionAutoscaler("foobarRegionAutoscaler", {
    region: "us-central1",
    target: foobarRegionInstanceGroupManager.id,
    autoscaling_policy: {
        maxReplicas: 5,
        minReplicas: 1,
        cooldownPeriod: 60,
        cpu_utilization: {
            target: 0.5,
        },
    },
});

constructor

new RegionAutoscaler(name: string, args: RegionAutoscalerArgs, opts?: pulumi.CustomResourceOptions)

Create a RegionAutoscaler resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegionAutoscalerState, opts?: pulumi.CustomResourceOptions): RegionAutoscaler

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RegionAutoscaler

Returns true if the given object is an instance of RegionAutoscaler. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property autoscalingPolicy

public autoscalingPolicy: pulumi.Output<RegionAutoscalerAutoscalingPolicy>;

The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. Structure is documented below.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;

An optional description of this resource.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;

URL of the region where the instance group resides.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property target

public target: pulumi.Output<string>;

Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RegionBackendService

class RegionBackendService extends CustomResource

A Region Backend Service defines a regionally-scoped group of virtual machines that will serve traffic for load balancing.

To get more information about RegionBackendService, see:

Example Usage - Region Backend Service Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultHealthCheck = new gcp.compute.HealthCheck("defaultHealthCheck", {
    checkIntervalSec: 1,
    timeoutSec: 1,
    tcp_health_check: {
        port: "80",
    },
});
const defaultRegionBackendService = new gcp.compute.RegionBackendService("defaultRegionBackendService", {
    region: "us-central1",
    healthChecks: [defaultHealthCheck.id],
    connectionDrainingTimeoutSec: 10,
    sessionAffinity: "CLIENT_IP",
});

Example Usage - Region Backend Service Ilb Round Robin

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const healthCheck = new gcp.compute.HealthCheck("healthCheck", {http_health_check: {
    port: 80,
}});
const _default = new gcp.compute.RegionBackendService("default", {
    region: "us-central1",
    healthChecks: [healthCheck.id],
    protocol: "HTTP",
    loadBalancingScheme: "INTERNAL_MANAGED",
    localityLbPolicy: "ROUND_ROBIN",
});

Example Usage - Region Backend Service Ilb Ring Hash

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const healthCheck = new gcp.compute.HealthCheck("healthCheck", {http_health_check: {
    port: 80,
}});
const _default = new gcp.compute.RegionBackendService("default", {
    region: "us-central1",
    healthChecks: [healthCheck.id],
    loadBalancingScheme: "INTERNAL_MANAGED",
    localityLbPolicy: "RING_HASH",
    sessionAffinity: "HTTP_COOKIE",
    protocol: "HTTP",
    circuit_breakers: {
        maxConnections: 10,
    },
    consistent_hash: {
        http_cookie: {
            ttl: {
                seconds: 11,
                nanos: 1111,
            },
            name: "mycookie",
        },
    },
    outlier_detection: {
        consecutiveErrors: 2,
    },
});

Example Usage - Region Backend Service Balancing Mode

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const debianImage = gcp.compute.getImage({
    family: "debian-9",
    project: "debian-cloud",
});
const defaultNetwork = new gcp.compute.Network("defaultNetwork", {
    autoCreateSubnetworks: false,
    routingMode: "REGIONAL",
});
const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", {
    ipCidrRange: "10.1.2.0/24",
    region: "us-central1",
    network: defaultNetwork.id,
});
const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", {
    machineType: "n1-standard-1",
    network_interface: [{
        network: defaultNetwork.id,
        subnetwork: defaultSubnetwork.id,
    }],
    disk: [{
        sourceImage: debianImage.then(debianImage => debianImage.selfLink),
        autoDelete: true,
        boot: true,
    }],
    tags: [
        "allow-ssh",
        "load-balanced-backend",
    ],
});
const rigm = new gcp.compute.RegionInstanceGroupManager("rigm", {
    region: "us-central1",
    version: [{
        instanceTemplate: instanceTemplate.selfLink,
        name: "primary",
    }],
    baseInstanceName: "internal-glb",
    targetSize: 1,
});
const defaultRegionHealthCheck = new gcp.compute.RegionHealthCheck("defaultRegionHealthCheck", {
    region: "us-central1",
    http_health_check: {
        portSpecification: "USE_SERVING_PORT",
    },
});
const defaultRegionBackendService = new gcp.compute.RegionBackendService("defaultRegionBackendService", {
    loadBalancingScheme: "INTERNAL_MANAGED",
    backend: [{
        group: rigm.instanceGroup,
        balancingMode: "UTILIZATION",
        capacityScaler: 1,
    }],
    region: "us-central1",
    protocol: "HTTP",
    timeoutSec: 10,
    healthChecks: [defaultRegionHealthCheck.id],
});

constructor

new RegionBackendService(name: string, args: RegionBackendServiceArgs, opts?: pulumi.CustomResourceOptions)

Create a RegionBackendService resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegionBackendServiceState, opts?: pulumi.CustomResourceOptions): RegionBackendService

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RegionBackendService

Returns true if the given object is an instance of RegionBackendService. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property affinityCookieTtlSec

public affinityCookieTtlSec: pulumi.Output<number | undefined>;

Lifetime of cookies in seconds if sessionAffinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used.

property backends

public backends: pulumi.Output<RegionBackendServiceBackend[] | undefined>;

The set of backends that serve this RegionBackendService. Structure is documented below.

property circuitBreakers

public circuitBreakers: pulumi.Output<RegionBackendServiceCircuitBreakers | undefined>;

Settings controlling the volume of connections to a backend service. This field is applicable only when the loadBalancingScheme is set to INTERNAL_MANAGED and the protocol is set to HTTP, HTTPS, or HTTP2. Structure is documented below.

property connectionDrainingTimeoutSec

public connectionDrainingTimeoutSec: pulumi.Output<number | undefined>;

Time for which instance will be drained (not accept new connections, but still work to finish started).

property consistentHash

public consistentHash: pulumi.Output<RegionBackendServiceConsistentHash | undefined>;

Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies when all of the following are true -

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;

An optional description of this resource. Provide this property when you create the resource.

property failoverPolicy

public failoverPolicy: pulumi.Output<RegionBackendServiceFailoverPolicy | undefined>;

Policy for failovers. Structure is documented below.

property fingerprint

public fingerprint: pulumi.Output<string>;

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.

property healthChecks

public healthChecks: pulumi.Output<string>;

The set of URLs to HealthCheck resources for health checking this RegionBackendService. Currently at most one health check can be specified, and a health check is required.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property loadBalancingScheme

public loadBalancingScheme: pulumi.Output<string | undefined>;

Indicates what kind of load balancing this regional backend service will be used for. A backend service created for one type of load balancing cannot be used with the other(s).

property localityLbPolicy

public localityLbPolicy: pulumi.Output<string | undefined>;

The load balancing algorithm used within the scope of the locality. The possible values are - ROUND_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. RING_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. RANDOM - The load balancer selects a random healthy host. ORIGINAL_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the loadBalancingScheme is set to INTERNAL_MANAGED and the protocol is set to HTTP, HTTPS, or HTTP2.

property logConfig

public logConfig: pulumi.Output<RegionBackendServiceLogConfig | undefined>;

This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. Structure is documented below.

property name

public name: pulumi.Output<string>;

Name of the cookie.

property network

public network: pulumi.Output<string | undefined>;

The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL.

property outlierDetection

public outlierDetection: pulumi.Output<RegionBackendServiceOutlierDetection | undefined>;

Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the loadBalancingScheme is set to INTERNAL_MANAGED and the protocol is set to HTTP, HTTPS, or HTTP2. Structure is documented below.

property portName

public portName: pulumi.Output<string>;

A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs. API sets a default of “http” if not given. Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property protocol

public protocol: pulumi.Output<string>;

The protocol this RegionBackendService uses to communicate with backends. The default is HTTP. NOTE: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API.

property region

public region: pulumi.Output<string>;

The Region in which the created backend service should reside. If it is not provided, the provider region is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property sessionAffinity

public sessionAffinity: pulumi.Output<string>;

Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP.

property timeoutSec

public timeoutSec: pulumi.Output<number>;

How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400].

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RegionDisk

class RegionDisk extends CustomResource

Persistent disks are durable storage devices that function similarly to the physical disks in a desktop or a server. Compute Engine manages the hardware behind these devices to ensure data redundancy and optimize performance for you. Persistent disks are available as either standard hard disk drives (HDD) or solid-state drives (SSD).

Persistent disks are located independently from your virtual machine instances, so you can detach or move persistent disks to keep your data even after you delete your instances. Persistent disk performance scales automatically with size, so you can resize your existing persistent disks or add more persistent disks to an instance to meet your performance and storage space requirements.

Add a persistent disk to your instance when you need reliable and affordable storage with consistent performance characteristics.

To get more information about RegionDisk, see:

Warning: All arguments including disk_encryption_key.raw_key will be stored in the raw state as plain-text. Read more about secrets in state.

Example Usage - Region Disk Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const disk = new gcp.compute.Disk("disk", {
    image: "debian-cloud/debian-9",
    size: 50,
    type: "pd-ssd",
    zone: "us-central1-a",
});
const snapdisk = new gcp.compute.Snapshot("snapdisk", {
    sourceDisk: disk.name,
    zone: "us-central1-a",
});
const regiondisk = new gcp.compute.RegionDisk("regiondisk", {
    snapshot: snapdisk.id,
    type: "pd-ssd",
    region: "us-central1",
    physicalBlockSizeBytes: 4096,
    replicaZones: [
        "us-central1-a",
        "us-central1-f",
    ],
});

constructor

new RegionDisk(name: string, args: RegionDiskArgs, opts?: pulumi.CustomResourceOptions)

Create a RegionDisk resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegionDiskState, opts?: pulumi.CustomResourceOptions): RegionDisk

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RegionDisk

Returns true if the given object is an instance of RegionDisk. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;

An optional description of this resource. Provide this property when you create the resource.

property diskEncryptionKey

public diskEncryptionKey: pulumi.Output<RegionDiskDiskEncryptionKey | undefined>;

Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;

The fingerprint used for optimistic locking of this resource. Used internally during updates.

property labels

public labels: pulumi.Output<{[key: string]: string} | undefined>;

Labels to apply to this disk. A list of key->value pairs.

property lastAttachTimestamp

public lastAttachTimestamp: pulumi.Output<string>;

Last attach timestamp in RFC3339 text format.

property lastDetachTimestamp

public lastDetachTimestamp: pulumi.Output<string>;

Last detach timestamp in RFC3339 text format.

property name

public name: pulumi.Output<string>;

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.

property physicalBlockSizeBytes

public physicalBlockSizeBytes: pulumi.Output<number>;

Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller’s project.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;

A reference to the region where the disk resides.

property replicaZones

public replicaZones: pulumi.Output<string[]>;

URLs of the zones where the disk should be replicated to.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property size

public size: pulumi.Output<number>;

Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot.

property snapshot

public snapshot: pulumi.Output<string | undefined>;

The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: * https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot * projects/project/global/snapshots/snapshot * global/snapshots/snapshot * snapshot

property sourceSnapshotEncryptionKey

public sourceSnapshotEncryptionKey: pulumi.Output<RegionDiskSourceSnapshotEncryptionKey | undefined>;

The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.

property sourceSnapshotId

public sourceSnapshotId: pulumi.Output<string>;

The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.

property type

public type: pulumi.Output<string | undefined>;

URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property users

public users: pulumi.Output<string[]>;

Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance

Resource RegionDiskResourcePolicyAttachment

class RegionDiskResourcePolicyAttachment extends CustomResource

Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.

Note: This resource does not support zonal disks (gcp.compute.Disk). For zonal disks, please refer to the gcp.compute.DiskResourcePolicyAttachment resource.

Example Usage

Region Disk Resource Policy Attachment Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const disk = new gcp.compute.Disk("disk", {
    image: "debian-cloud/debian-9",
    size: 50,
    type: "pd-ssd",
    zone: "us-central1-a",
});
const snapdisk = new gcp.compute.Snapshot("snapdisk", {
    sourceDisk: disk.name,
    zone: "us-central1-a",
});
const ssd = new gcp.compute.RegionDisk("ssd", {
    replicaZones: [
        "us-central1-a",
        "us-central1-f",
    ],
    snapshot: snapdisk.id,
    size: 50,
    type: "pd-ssd",
    region: "us-central1",
});
const attachment = new gcp.compute.RegionDiskResourcePolicyAttachment("attachment", {
    disk: ssd.name,
    region: "us-central1",
});
const policy = new gcp.compute.ResourcePolicy("policy", {
    region: "us-central1",
    snapshot_schedule_policy: {
        schedule: {
            daily_schedule: {
                daysInCycle: 1,
                startTime: "04:00",
            },
        },
    },
});
const myImage = gcp.compute.getImage({
    family: "debian-9",
    project: "debian-cloud",
});

constructor

new RegionDiskResourcePolicyAttachment(name: string, args: RegionDiskResourcePolicyAttachmentArgs, opts?: pulumi.CustomResourceOptions)

Create a RegionDiskResourcePolicyAttachment resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegionDiskResourcePolicyAttachmentState, opts?: pulumi.CustomResourceOptions): RegionDiskResourcePolicyAttachment

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RegionDiskResourcePolicyAttachment

Returns true if the given object is an instance of RegionDiskResourcePolicyAttachment. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property disk

public disk: pulumi.Output<string>;

The name of the regional disk in which the resource policies are attached to.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The resource policy to be attached to the disk for scheduling snapshot creation. Do not specify the self link.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;

A reference to the region where the disk resides.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RegionHealthCheck

class RegionHealthCheck extends CustomResource

Health Checks determine whether instances are responsive and able to do work. They are an important part of a comprehensive load balancing configuration, as they enable monitoring instances behind load balancers.

Health Checks poll instances at a specified interval. Instances that do not respond successfully to some number of probes in a row are marked as unhealthy. No new connections are sent to unhealthy instances, though existing connections will continue. The health check will continue to poll unhealthy instances. If an instance later responds successfully to some number of consecutive probes, it is marked healthy again and can receive new connections.

To get more information about RegionHealthCheck, see:

Example Usage - Region Health Check Tcp

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const tcpRegionHealthCheck = new gcp.compute.RegionHealthCheck("tcp-region-health-check", {
    checkIntervalSec: 1,
    tcpHealthCheck: {
        port: 80,
    },
    timeoutSec: 1,
});

Example Usage - Region Health Check Tcp Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const tcpRegionHealthCheck = new gcp.compute.RegionHealthCheck("tcp-region-health-check", {
    checkIntervalSec: 1,
    description: "Health check via tcp",
    healthyThreshold: 4,
    tcpHealthCheck: {
        portName: "health-check-port",
        portSpecification: "USE_NAMED_PORT",
        proxyHeader: "NONE",
        request: "ARE YOU HEALTHY?",
        response: "I AM HEALTHY",
    },
    timeoutSec: 1,
    unhealthyThreshold: 5,
});

Example Usage - Region Health Check Ssl

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const sslRegionHealthCheck = new gcp.compute.RegionHealthCheck("ssl-region-health-check", {
    checkIntervalSec: 1,
    sslHealthCheck: {
        port: 443,
    },
    timeoutSec: 1,
});

Example Usage - Region Health Check Ssl Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const sslRegionHealthCheck = new gcp.compute.RegionHealthCheck("ssl-region-health-check", {
    checkIntervalSec: 1,
    description: "Health check via ssl",
    healthyThreshold: 4,
    sslHealthCheck: {
        portName: "health-check-port",
        portSpecification: "USE_NAMED_PORT",
        proxyHeader: "NONE",
        request: "ARE YOU HEALTHY?",
        response: "I AM HEALTHY",
    },
    timeoutSec: 1,
    unhealthyThreshold: 5,
});

Example Usage - Region Health Check Http

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const httpRegionHealthCheck = new gcp.compute.RegionHealthCheck("http-region-health-check", {
    checkIntervalSec: 1,
    httpHealthCheck: {
        port: 80,
    },
    timeoutSec: 1,
});

Example Usage - Region Health Check Http Logs

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const httpRegionHealthCheck = new gcp.compute.RegionHealthCheck("http-region-health-check", {
    timeoutSec: 1,
    checkIntervalSec: 1,
    http_health_check: {
        port: "80",
    },
    log_config: {
        enable: true,
    },
});

Example Usage - Region Health Check Http Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const httpRegionHealthCheck = new gcp.compute.RegionHealthCheck("http-region-health-check", {
    checkIntervalSec: 1,
    description: "Health check via http",
    healthyThreshold: 4,
    httpHealthCheck: {
        host: "1.2.3.4",
        portName: "health-check-port",
        portSpecification: "USE_NAMED_PORT",
        proxyHeader: "NONE",
        requestPath: "/mypath",
        response: "I AM HEALTHY",
    },
    timeoutSec: 1,
    unhealthyThreshold: 5,
});

Example Usage - Region Health Check Https

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const httpsRegionHealthCheck = new gcp.compute.RegionHealthCheck("https-region-health-check", {
    checkIntervalSec: 1,
    httpsHealthCheck: {
        port: 443,
    },
    timeoutSec: 1,
});

Example Usage - Region Health Check Https Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const httpsRegionHealthCheck = new gcp.compute.RegionHealthCheck("https-region-health-check", {
    checkIntervalSec: 1,
    description: "Health check via https",
    healthyThreshold: 4,
    httpsHealthCheck: {
        host: "1.2.3.4",
        portName: "health-check-port",
        portSpecification: "USE_NAMED_PORT",
        proxyHeader: "NONE",
        requestPath: "/mypath",
        response: "I AM HEALTHY",
    },
    timeoutSec: 1,
    unhealthyThreshold: 5,
});

Example Usage - Region Health Check Http2

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const http2RegionHealthCheck = new gcp.compute.RegionHealthCheck("http2-region-health-check", {
    checkIntervalSec: 1,
    http2HealthCheck: {
        port: 443,
    },
    timeoutSec: 1,
});

Example Usage - Region Health Check Http2 Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const http2RegionHealthCheck = new gcp.compute.RegionHealthCheck("http2-region-health-check", {
    checkIntervalSec: 1,
    description: "Health check via http2",
    healthyThreshold: 4,
    http2HealthCheck: {
        host: "1.2.3.4",
        portName: "health-check-port",
        portSpecification: "USE_NAMED_PORT",
        proxyHeader: "NONE",
        requestPath: "/mypath",
        response: "I AM HEALTHY",
    },
    timeoutSec: 1,
    unhealthyThreshold: 5,
});

constructor

new RegionHealthCheck(name: string, args?: RegionHealthCheckArgs, opts?: pulumi.CustomResourceOptions)

Create a RegionHealthCheck resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegionHealthCheckState, opts?: pulumi.CustomResourceOptions): RegionHealthCheck

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RegionHealthCheck

Returns true if the given object is an instance of RegionHealthCheck. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property checkIntervalSec

public checkIntervalSec: pulumi.Output<number | undefined>;

How often (in seconds) to send a health check. The default value is 5 seconds.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;

An optional description of this resource. Provide this property when you create the resource.

property healthyThreshold

public healthyThreshold: pulumi.Output<number | undefined>;

A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.

property http2HealthCheck

public http2HealthCheck: pulumi.Output<RegionHealthCheckHttp2HealthCheck | undefined>;

A nested object resource Structure is documented below.

property httpHealthCheck

public httpHealthCheck: pulumi.Output<RegionHealthCheckHttpHealthCheck | undefined>;

A nested object resource Structure is documented below.

property httpsHealthCheck

public httpsHealthCheck: pulumi.Output<RegionHealthCheckHttpsHealthCheck | undefined>;

A nested object resource Structure is documented below.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property logConfig

public logConfig: pulumi.Output<RegionHealthCheckLogConfig | undefined>;

Configure logging on this health check. Structure is documented below.

property name

public name: pulumi.Output<string>;

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.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;

The Region in which the created health check should reside. If it is not provided, the provider region is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property sslHealthCheck

public sslHealthCheck: pulumi.Output<RegionHealthCheckSslHealthCheck | undefined>;

A nested object resource Structure is documented below.

property tcpHealthCheck

public tcpHealthCheck: pulumi.Output<RegionHealthCheckTcpHealthCheck | undefined>;

A nested object resource Structure is documented below.

property timeoutSec

public timeoutSec: pulumi.Output<number | undefined>;

How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.

property type

public type: pulumi.Output<string>;

The type of the health check. One of HTTP, HTTP2, HTTPS, TCP, or SSL.

property unhealthyThreshold

public unhealthyThreshold: pulumi.Output<number | undefined>;

A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RegionInstanceGroupManager

class RegionInstanceGroupManager extends CustomResource

The Google Compute Engine Regional Instance Group Manager API creates and manages pools of homogeneous Compute Engine virtual machine instances from a common instance template. For more information, see the official documentation and API

Note: Use gcp.compute.InstanceGroupManager to create a single-zone instance group manager.

Example Usage with top level instance template (google provider)

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const autohealing = new gcp.compute.HealthCheck("autohealing", {
    checkIntervalSec: 5,
    timeoutSec: 5,
    healthyThreshold: 2,
    unhealthyThreshold: 10,
    http_health_check: {
        requestPath: "/healthz",
        port: "8080",
    },
});
const appserver = new gcp.compute.RegionInstanceGroupManager("appserver", {
    baseInstanceName: "app",
    region: "us-central1",
    distributionPolicyZones: [
        "us-central1-a",
        "us-central1-f",
    ],
    version: [{
        instanceTemplate: google_compute_instance_template.appserver.self_link,
    }],
    targetPools: [google_compute_target_pool.appserver.self_link],
    targetSize: 2,
    named_port: [{
        name: "custom",
        port: 8888,
    }],
    auto_healing_policies: {
        healthCheck: autohealing.selfLink,
        initialDelaySec: 300,
    },
});

Example Usage with multiple versions

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const appserver = new gcp.compute.RegionInstanceGroupManager("appserver", {
    baseInstanceName: "app",
    region: "us-central1",
    targetSize: 5,
    version: [
        {
            instanceTemplate: google_compute_instance_template.appserver.self_link,
        },
        {
            instanceTemplate: google_compute_instance_template["appserver-canary"].self_link,
            target_size: {
                fixed: 1,
            },
        },
    ],
});

constructor

new RegionInstanceGroupManager(name: string, args: RegionInstanceGroupManagerArgs, opts?: pulumi.CustomResourceOptions)

Create a RegionInstanceGroupManager resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegionInstanceGroupManagerState, opts?: pulumi.CustomResourceOptions): RegionInstanceGroupManager

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RegionInstanceGroupManager

Returns true if the given object is an instance of RegionInstanceGroupManager. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property autoHealingPolicies

public autoHealingPolicies: pulumi.Output<RegionInstanceGroupManagerAutoHealingPolicies | undefined>;

The autohealing policies for this managed instance group. You can specify only one value. Structure is documented below. For more information, see the official documentation.

property baseInstanceName

public baseInstanceName: pulumi.Output<string>;

The base instance name to use for instances in this group. The value must be a valid RFC1035 name. Supported characters are lowercase letters, numbers, and hyphens (-). Instances are named by appending a hyphen and a random four-character string to the base instance name.

property description

public description: pulumi.Output<string | undefined>;

An optional textual description of the instance group manager.

property distributionPolicyZones

public distributionPolicyZones: pulumi.Output<string[]>;

The distribution policy for this managed instance group. You can specify one or more values. For more information, see the official documentation.

property fingerprint

public fingerprint: pulumi.Output<string>;

The fingerprint of the instance group manager.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instanceGroup

public instanceGroup: pulumi.Output<string>;

The full URL of the instance group created by the manager.

property name

public name: pulumi.Output<string>;
  • Version name.

property namedPorts

public namedPorts: pulumi.Output<RegionInstanceGroupManagerNamedPort[] | undefined>;

The named port configuration. See the section below for details on configuration.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;

The region where the managed instance group resides.

public selfLink: pulumi.Output<string>;

The URL of the created resource.

property statefulDisks

public statefulDisks: pulumi.Output<RegionInstanceGroupManagerStatefulDisk[] | undefined>;

Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the official documentation. Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the updatePolicy.

property targetPools

public targetPools: pulumi.Output<string[] | undefined>;

The full URL of all target pools to which new instances in the group are added. Updating the target pools attribute does not affect existing instances.

property targetSize

public targetSize: pulumi.Output<number>;
  • The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.

property updatePolicy

public updatePolicy: pulumi.Output<RegionInstanceGroupManagerUpdatePolicy>;

The update policy for this managed instance group. Structure is documented below. For more information, see the official documentation and API

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property versions

public versions: pulumi.Output<RegionInstanceGroupManagerVersion[]>;

Application versions managed by this instance group. Each version deals with a specific instance template, allowing canary release scenarios. Structure is documented below.

property waitForInstances

public waitForInstances: pulumi.Output<boolean | undefined>;

Whether to wait for all instances to be created/updated before returning. Note that if this is set to true and the operation does not succeed, the provider will continue trying until it times out.

Resource RegionPerInstanceConfig

class RegionPerInstanceConfig extends CustomResource

A config defined for a single managed instance that belongs to an instance group manager. It preserves the instance name across instance group manager operations and can define stateful disks or metadata that are unique to the instance. This resource works with regional instance group managers.

To get more information about RegionPerInstanceConfig, see:

constructor

new RegionPerInstanceConfig(name: string, args: RegionPerInstanceConfigArgs, opts?: pulumi.CustomResourceOptions)

Create a RegionPerInstanceConfig resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegionPerInstanceConfigState, opts?: pulumi.CustomResourceOptions): RegionPerInstanceConfig

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RegionPerInstanceConfig

Returns true if the given object is an instance of RegionPerInstanceConfig. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property minimalAction

public minimalAction: pulumi.Output<string | undefined>;

The minimal action to perform on the instance during an update. Default is NONE. Possible values are: * REPLACE * RESTART * REFRESH * NONE

property mostDisruptiveAllowedAction

public mostDisruptiveAllowedAction: pulumi.Output<string | undefined>;

The most disruptive action to perform on the instance during an update. Default is REPLACE. Possible values are: * REPLACE * RESTART * REFRESH * NONE

property name

public name: pulumi.Output<string>;

The name for this per-instance config and its corresponding instance.

property preservedState

public preservedState: pulumi.Output<RegionPerInstanceConfigPreservedState | undefined>;

The preserved state for this instance. Structure is documented below.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;

Region where the containing instance group manager is located

property regionInstanceGroupManager

public regionInstanceGroupManager: pulumi.Output<string>;

The region instance group manager this instance config is part of.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RegionSslCertificate

class RegionSslCertificate extends CustomResource

A RegionSslCertificate resource, used for HTTPS load balancing. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user.

To get more information about RegionSslCertificate, see:

Warning: All arguments including certificate and privateKey will be stored in the raw state as plain-text. Read more about secrets in state.

Example Usage - Region Ssl Certificate Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * from "fs";

const _default = new gcp.compute.RegionSslCertificate("default", {
    region: "us-central1",
    namePrefix: "my-certificate-",
    description: "a description",
    privateKey: fs.readFileSync("path/to/private.key"),
    certificate: fs.readFileSync("path/to/certificate.crt"),
});

Example Usage - Region Ssl Certificate Target Https Proxies

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * from "fs";

// Using with Region Target HTTPS Proxies
//
// SSL certificates cannot be updated after creation. In order to apply
// the specified configuration, the provider will destroy the existing
// resource and create a replacement. To effectively use an SSL
// certificate resource with a Target HTTPS Proxy resource, it's
// recommended to specify createBeforeDestroy in a lifecycle block.
// Either omit the Instance Template name attribute, specify a partial
// name with name_prefix, or use randomId resource. Example:
const defaultRegionSslCertificate = new gcp.compute.RegionSslCertificate("defaultRegionSslCertificate", {
    region: "us-central1",
    namePrefix: "my-certificate-",
    privateKey: fs.readFileSync("path/to/private.key"),
    certificate: fs.readFileSync("path/to/certificate.crt"),
});
const defaultRegionHealthCheck = new gcp.compute.RegionHealthCheck("defaultRegionHealthCheck", {
    region: "us-central1",
    http_health_check: {
        port: 80,
    },
});
const defaultRegionBackendService = new gcp.compute.RegionBackendService("defaultRegionBackendService", {
    region: "us-central1",
    protocol: "HTTP",
    timeoutSec: 10,
    healthChecks: [defaultRegionHealthCheck.id],
});
const defaultRegionUrlMap = new gcp.compute.RegionUrlMap("defaultRegionUrlMap", {
    region: "us-central1",
    description: "a description",
    defaultService: defaultRegionBackendService.id,
    host_rule: [{
        hosts: ["mysite.com"],
        pathMatcher: "allpaths",
    }],
    path_matcher: [{
        name: "allpaths",
        defaultService: defaultRegionBackendService.id,
        path_rule: [{
            paths: ["/*"],
            service: defaultRegionBackendService.id,
        }],
    }],
});
const defaultRegionTargetHttpsProxy = new gcp.compute.RegionTargetHttpsProxy("defaultRegionTargetHttpsProxy", {
    region: "us-central1",
    urlMap: defaultRegionUrlMap.id,
    sslCertificates: [defaultRegionSslCertificate.id],
});

constructor

new RegionSslCertificate(name: string, args: RegionSslCertificateArgs, opts?: pulumi.CustomResourceOptions)

Create a RegionSslCertificate resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegionSslCertificateState, opts?: pulumi.CustomResourceOptions): RegionSslCertificate

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RegionSslCertificate

Returns true if the given object is an instance of RegionSslCertificate. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property certificate

public certificate: pulumi.Output<string>;

The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert. Note: This property is sensitive and will not be displayed in the plan.

property certificateId

public certificateId: pulumi.Output<number>;

The unique identifier for the resource.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;

An optional description of this resource.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

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.

property namePrefix

public namePrefix: pulumi.Output<string>;

Creates a unique name beginning with the specified prefix. Conflicts with name.

property privateKey

public privateKey: pulumi.Output<string>;

The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;

The Region in which the created regional ssl certificate should reside. If it is not provided, the provider region is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RegionTargetHttpProxy

class RegionTargetHttpProxy extends CustomResource

Represents a RegionTargetHttpProxy resource, which is used by one or more forwarding rules to route incoming HTTP requests to a URL map.

To get more information about RegionTargetHttpProxy, see:

Example Usage - Region Target Http Proxy Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultRegionHealthCheck = new gcp.compute.RegionHealthCheck("defaultRegionHealthCheck", {
    region: "us-central1",
    http_health_check: {
        port: 80,
    },
});
const defaultRegionBackendService = new gcp.compute.RegionBackendService("defaultRegionBackendService", {
    region: "us-central1",
    protocol: "HTTP",
    timeoutSec: 10,
    healthChecks: [defaultRegionHealthCheck.id],
});
const defaultRegionUrlMap = new gcp.compute.RegionUrlMap("defaultRegionUrlMap", {
    region: "us-central1",
    defaultService: defaultRegionBackendService.id,
    host_rule: [{
        hosts: ["mysite.com"],
        pathMatcher: "allpaths",
    }],
    path_matcher: [{
        name: "allpaths",
        defaultService: defaultRegionBackendService.id,
        path_rule: [{
            paths: ["/*"],
            service: defaultRegionBackendService.id,
        }],
    }],
});
const defaultRegionTargetHttpProxy = new gcp.compute.RegionTargetHttpProxy("defaultRegionTargetHttpProxy", {
    region: "us-central1",
    urlMap: defaultRegionUrlMap.id,
});

Example Usage - Region Target Http Proxy Https Redirect

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultRegionUrlMap = new gcp.compute.RegionUrlMap("defaultRegionUrlMap", {
    region: "us-central1",
    default_url_redirect: {
        httpsRedirect: true,
        stripQuery: false,
    },
});
const defaultRegionTargetHttpProxy = new gcp.compute.RegionTargetHttpProxy("defaultRegionTargetHttpProxy", {
    region: "us-central1",
    urlMap: defaultRegionUrlMap.selfLink,
});

constructor

new RegionTargetHttpProxy(name: string, args: RegionTargetHttpProxyArgs, opts?: pulumi.CustomResourceOptions)

Create a RegionTargetHttpProxy resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegionTargetHttpProxyState, opts?: pulumi.CustomResourceOptions): RegionTargetHttpProxy

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RegionTargetHttpProxy

Returns true if the given object is an instance of RegionTargetHttpProxy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;

An optional description of this resource.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

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.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property proxyId

public proxyId: pulumi.Output<number>;

The unique identifier for the resource.

property region

public region: pulumi.Output<string>;

The Region in which the created target https proxy should reside. If it is not provided, the provider region is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property urlMap

public urlMap: pulumi.Output<string>;

A reference to the RegionUrlMap resource that defines the mapping from URL to the BackendService.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RegionTargetHttpsProxy

class RegionTargetHttpsProxy extends CustomResource

Represents a RegionTargetHttpsProxy resource, which is used by one or more forwarding rules to route incoming HTTPS requests to a URL map.

To get more information about RegionTargetHttpsProxy, see:

Example Usage - Region Target Https Proxy Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * from "fs";

const defaultRegionSslCertificate = new gcp.compute.RegionSslCertificate("defaultRegionSslCertificate", {
    region: "us-central1",
    privateKey: fs.readFileSync("path/to/private.key"),
    certificate: fs.readFileSync("path/to/certificate.crt"),
});
const defaultRegionHealthCheck = new gcp.compute.RegionHealthCheck("defaultRegionHealthCheck", {
    region: "us-central1",
    http_health_check: {
        port: 80,
    },
});
const defaultRegionBackendService = new gcp.compute.RegionBackendService("defaultRegionBackendService", {
    region: "us-central1",
    protocol: "HTTP",
    timeoutSec: 10,
    healthChecks: [defaultRegionHealthCheck.id],
});
const defaultRegionUrlMap = new gcp.compute.RegionUrlMap("defaultRegionUrlMap", {
    region: "us-central1",
    description: "a description",
    defaultService: defaultRegionBackendService.id,
    host_rule: [{
        hosts: ["mysite.com"],
        pathMatcher: "allpaths",
    }],
    path_matcher: [{
        name: "allpaths",
        defaultService: defaultRegionBackendService.id,
        path_rule: [{
            paths: ["/*"],
            service: defaultRegionBackendService.id,
        }],
    }],
});
const defaultRegionTargetHttpsProxy = new gcp.compute.RegionTargetHttpsProxy("defaultRegionTargetHttpsProxy", {
    region: "us-central1",
    urlMap: defaultRegionUrlMap.id,
    sslCertificates: [defaultRegionSslCertificate.id],
});

constructor

new RegionTargetHttpsProxy(name: string, args: RegionTargetHttpsProxyArgs, opts?: pulumi.CustomResourceOptions)

Create a RegionTargetHttpsProxy resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegionTargetHttpsProxyState, opts?: pulumi.CustomResourceOptions): RegionTargetHttpsProxy

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RegionTargetHttpsProxy

Returns true if the given object is an instance of RegionTargetHttpsProxy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.

property description

public description: pulumi.Output<string | undefined>;

An optional description of this resource.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

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.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property proxyId

public proxyId: pulumi.Output<number>;

The unique identifier for the resource.

property region

public region: pulumi.Output<string>;

The Region in which the created target https proxy should reside. If it is not provided, the provider region is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property sslCertificates

public sslCertificates: pulumi.Output<string[]>;

A list of RegionSslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified.

property urlMap

public urlMap: pulumi.Output<string>;

A reference to the RegionUrlMap resource that defines the mapping from URL to the RegionBackendService.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource RegionUrlMap

class RegionUrlMap extends CustomResource

UrlMaps are used to route requests to a backend service based on rules that you define for the host and path of an incoming URL.

Example Usage - Region Url Map Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.compute.RegionHealthCheck("default", {
    region: "us-central1",
    checkIntervalSec: 1,
    timeoutSec: 1,
    http_health_check: {
        port: 80,
        requestPath: "/",
    },
});
const login = new gcp.compute.RegionBackendService("login", {
    region: "us-central1",
    protocol: "HTTP",
    timeoutSec: 10,
    healthChecks: [_default.id],
});
const home = new gcp.compute.RegionBackendService("home", {
    region: "us-central1",
    protocol: "HTTP",
    timeoutSec: 10,
    healthChecks: [_default.id],
});
const regionurlmap = new gcp.compute.RegionUrlMap("regionurlmap", {
    region: "us-central1",
    description: "a description",
    defaultService: home.id,
    host_rule: [{
        hosts: ["mysite.com"],
        pathMatcher: "allpaths",
    }],
    path_matcher: [{
        name: "allpaths",
        defaultService: home.id,
        path_rule: [
            {
                paths: ["/home"],
                service: home.id,
            },
            {
                paths: ["/login"],
                service: login.id,
            },
        ],
    }],
    test: [{
        service: home.id,
        host: "hi.com",
        path: "/home",
    }],
});

Example Usage - Region Url Map L7 Ilb Path

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.compute.RegionHealthCheck("default", {http_health_check: {
    port: 80,
}});
const home = new gcp.compute.RegionBackendService("home", {
    protocol: "HTTP",
    timeoutSec: 10,
    healthChecks: [_default.id],
    loadBalancingScheme: "INTERNAL_MANAGED",
});
const regionurlmap = new gcp.compute.RegionUrlMap("regionurlmap", {
    description: "a description",
    defaultService: home.id,
    host_rule: [{
        hosts: ["mysite.com"],
        pathMatcher: "allpaths",
    }],
    path_matcher: [{
        name: "allpaths",
        defaultService: home.id,
        path_rule: [{
            paths: ["/home"],
            route_action: {
                cors_policy: {
                    allowCredentials: true,
                    allowHeaders: ["Allowed content"],
                    allowMethods: ["GET"],
                    allowOrigins: ["Allowed origin"],
                    exposeHeaders: ["Exposed header"],
                    maxAge: 30,
                    disabled: false,
                },
                fault_injection_policy: {
                    abort: {
                        httpStatus: 234,
                        percentage: 5.6,
                    },
                    delay: {
                        fixed_delay: {
                            seconds: 0,
                            nanos: 50000,
                        },
                        percentage: 7.8,
                    },
                },
                request_mirror_policy: {
                    backendService: home.id,
                },
                retry_policy: {
                    numRetries: 4,
                    per_try_timeout: {
                        seconds: 30,
                    },
                    retryConditions: [
                        "5xx",
                        "deadline-exceeded",
                    ],
                },
                timeout: {
                    seconds: 20,
                    nanos: 750000000,
                },
                url_rewrite: {
                    hostRewrite: "A replacement header",
                    pathPrefixRewrite: "A replacement path",
                },
                weighted_backend_services: [{
                    backendService: home.id,
                    weight: 400,
                    header_action: {
                        requestHeadersToRemoves: ["RemoveMe"],
                        request_headers_to_add: [{
                            headerName: "AddMe",
                            headerValue: "MyValue",
                            replace: true,
                        }],
                        responseHeadersToRemoves: ["RemoveMe"],
                        response_headers_to_add: [{
                            headerName: "AddMe",
                            headerValue: "MyValue",
                            replace: false,
                        }],
                    },
                }],
            },
        }],
    }],
    test: [{
        service: home.id,
        host: "hi.com",
        path: "/home",
    }],
});

Example Usage - Region Url Map L7 Ilb Path Partial

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.compute.RegionHealthCheck("default", {http_health_check: {
    port: 80,
}});
const home = new gcp.compute.RegionBackendService("home", {
    protocol: "HTTP",
    timeoutSec: 10,
    healthChecks: [_default.id],
    loadBalancingScheme: "INTERNAL_MANAGED",
});
const regionurlmap = new gcp.compute.RegionUrlMap("regionurlmap", {
    description: "a description",
    defaultService: home.id,
    host_rule: [{
        hosts: ["mysite.com"],
        pathMatcher: "allpaths",
    }],
    path_matcher: [{
        name: "allpaths",
        defaultService: home.id,
        path_rule: [{
            paths: ["/home"],
            route_action: {
                retry_policy: {
                    numRetries: 4,
                    per_try_timeout: {
                        seconds: 30,
                    },
                    retryConditions: [
                        "5xx",
                        "deadline-exceeded",
                    ],
                },
                timeout: {
                    seconds: 20,
                    nanos: 750000000,
                },
                url_rewrite: {
                    hostRewrite: "A replacement header",
                    pathPrefixRewrite: "A replacement path",
                },
                weighted_backend_services: [{
                    backendService: home.id,
                    weight: 400,
                    header_action: {
                        response_headers_to_add: [{
                            headerName: "AddMe",
                            headerValue: "MyValue",
                            replace: false,
                        }],
                    },
                }],
            },
        }],
    }],
    test: [{
        service: home.id,
        host: "hi.com",
        path: "/home",
    }],
});

Example Usage - Region Url Map L7 Ilb Route

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.compute.RegionHealthCheck("default", {http_health_check: {
    port: 80,
}});
const home = new gcp.compute.RegionBackendService("home", {
    protocol: "HTTP",
    timeoutSec: 10,
    healthChecks: [_default.id],
    loadBalancingScheme: "INTERNAL_MANAGED",
});
const regionurlmap = new gcp.compute.RegionUrlMap("regionurlmap", {
    description: "a description",
    defaultService: home.id,
    host_rule: [{
        hosts: ["mysite.com"],
        pathMatcher: "allpaths",
    }],
    path_matcher: [{
        name: "allpaths",
        defaultService: home.id,
        route_rules: [{
            priority: 1,
            header_action: {
                requestHeadersToRemoves: ["RemoveMe2"],
                request_headers_to_add: [{
                    headerName: "AddSomethingElse",
                    headerValue: "MyOtherValue",
                    replace: true,
                }],
                responseHeadersToRemoves: ["RemoveMe3"],
                response_headers_to_add: [{
                    headerName: "AddMe",
                    headerValue: "MyValue",
                    replace: false,
                }],
            },
            match_rules: [{
                fullPathMatch: "a full path",
                header_matches: [{
                    headerName: "someheader",
                    exactMatch: "match this exactly",
                    invertMatch: true,
                }],
                ignoreCase: true,
                metadata_filters: [{
                    filterMatchCriteria: "MATCH_ANY",
                    filter_labels: [{
                        name: "PLANET",
                        value: "MARS",
                    }],
                }],
                query_parameter_matches: [{
                    name: "a query parameter",
                    presentMatch: true,
                }],
            }],
            url_redirect: {
                hostRedirect: "A host",
                httpsRedirect: false,
                pathRedirect: "some/path",
                redirectResponseCode: "TEMPORARY_REDIRECT",
                stripQuery: true,
            },
        }],
    }],
    test: [{
        service: home.id,
        host: "hi.com",
        path: "/home",
    }],
});

Example Usage - Region Url Map L7 Ilb Route Partial

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.compute.RegionHealthCheck("default", {http_health_check: {
    port: 80,
}});
const home = new gcp.compute.RegionBackendService("home", {
    protocol: "HTTP",
    timeoutSec: 10,
    healthChecks: [_default.id],
    loadBalancingScheme: "INTERNAL_MANAGED",
});
const regionurlmap = new gcp.compute.RegionUrlMap("regionurlmap", {
    description: "a description",
    defaultService: home.id,
    host_rule: [{
        hosts: ["mysite.com"],
        pathMatcher: "allpaths",
    }],
    path_matcher: [{
        name: "allpaths",
        defaultService: home.id,
        route_rules: [{
            priority: 1,
            service: home.id,
            header_action: {
                requestHeadersToRemoves: ["RemoveMe2"],
            },
            match_rules: [{
                fullPathMatch: "a full path",
                header_matches: [{
                    headerName: "someheader",
                    exactMatch: "match this exactly",
                    invertMatch: true,
                }],
                query_parameter_matches: [{
                    name: "a query parameter",
                    presentMatch: true,
                }],
            }],
        }],
    }],
    test: [{
        service: home.id,
        host: "hi.com",
        path: "/home",
    }],
});

constructor

new RegionUrlMap(name: string, args?: RegionUrlMapArgs, opts?: pulumi.CustomResourceOptions)

Create a RegionUrlMap resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegionUrlMapState, opts?: pulumi.CustomResourceOptions): RegionUrlMap

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is RegionUrlMap

Returns true if the given object is an instance of RegionUrlMap. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.

property defaultService

public defaultService: pulumi.Output<string | undefined>;

A reference to a RegionBackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL’s path portion.

property defaultUrlRedirect

public defaultUrlRedirect: pulumi.Output<RegionUrlMapDefaultUrlRedirect | undefined>;

When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.

property description

public description: pulumi.Output<string | undefined>;

Description of this test case.

property fingerprint

public fingerprint: pulumi.Output<string>;

Fingerprint of this resource. This field is used internally during updates of this resource.

property hostRules

public hostRules: pulumi.Output<RegionUrlMapHostRule[] | undefined>;

The list of HostRules to use against the URL. Structure is documented below.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property mapId

public mapId: pulumi.Output<number>;

The unique identifier for the resource.

property name

public name: pulumi.Output<string>;

The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.

property pathMatchers

public pathMatchers: pulumi.Output<RegionUrlMapPathMatcher[] | undefined>;

The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

public region: pulumi.Output<string>;

The Region in which the url map should reside. If it is not provided, the provider region is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property tests

public tests: pulumi.Output<RegionUrlMapTest[] | undefined>;

The list of expected URL mappings. Requests to update this UrlMap will succeed only if all of the test cases pass. Structure is documented below.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Reservation

class Reservation extends CustomResource

Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running.

Reservations apply only to Compute Engine, Cloud Dataproc, and Google Kubernetes Engine VM usage.Reservations do not apply to f1-micro or g1-small machine types, preemptible VMs, sole tenant nodes, or other services not listed above like Cloud SQL and Dataflow.

To get more information about Reservation, see:

Example Usage - Reservation Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const gceReservation = new gcp.compute.Reservation("gceReservation", {
    specificReservation: {
        count: 1,
        instanceProperties: {
            machineType: "n2-standard-2",
            minCpuPlatform: "Intel Cascade Lake",
        },
    },
    zone: "us-central1-a",
});

constructor

new Reservation(name: string, args: ReservationArgs, opts?: pulumi.CustomResourceOptions)

Create a Reservation resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ReservationState, opts?: pulumi.CustomResourceOptions): Reservation

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Reservation

Returns true if the given object is an instance of Reservation. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property commitment

public commitment: pulumi.Output<string>;

Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

Creation timestamp in RFC3339 text format.