Module compute

@pulumi/gcp > 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.

Index ▾

compute/address.ts compute/attachedDisk.ts compute/autoscalar.ts compute/backendBucket.ts compute/backendBucketSignedUrlKey.ts compute/backendService.ts compute/backendServiceSignedUrlKey.ts compute/disk.ts compute/externalVpnGateway.ts compute/firewall.ts compute/forwardingRule.ts compute/getAddress.ts compute/getBackendService.ts compute/getCertificate.ts compute/getDefaultServiceAccount.ts compute/getForwardingRule.ts compute/getGlobalAddress.ts compute/getImage.ts compute/getInstance.ts compute/getInstanceGroup.ts compute/getLBIPRanges.ts compute/getNetblockIPRanges.ts compute/getNetwork.ts compute/getNodeTypes.ts compute/getRegionInstanceGroup.ts compute/getRegions.ts compute/getSSLPolicy.ts compute/getSubnetwork.ts compute/getVPNGateway.ts compute/getZones.ts compute/globalAddress.ts compute/globalForwardingRule.ts compute/haVpnGateway.ts compute/healthCheck.ts compute/httpHealthCheck.ts compute/httpsHealthCheck.ts compute/image.ts compute/instance.ts compute/instanceFromTemplate.ts compute/instanceGroup.ts compute/instanceGroupManager.ts compute/instanceIAMBinding.ts compute/instanceIAMMember.ts compute/instanceIAMPolicy.ts compute/instanceTemplate.ts compute/interconnectAttachment.ts compute/mangedSslCertificate.ts compute/network.ts compute/networkEndpoint.ts compute/networkEndpointGroup.ts compute/networkPeering.ts compute/nodeGroup.ts compute/nodeTemplate.ts compute/projectDefaultNetworkTier.ts compute/projectMetadata.ts compute/projectMetadataItem.ts compute/regionAutoscaler.ts compute/regionBackendService.ts compute/regionDisk.ts compute/regionInstanceGroupManager.ts compute/resourcePolicy.ts compute/route.ts compute/router.ts compute/routerInterface.ts compute/routerNat.ts compute/routerPeer.ts compute/sSLCertificate.ts compute/sSLPolicy.ts compute/securityPolicy.ts compute/securityScanConfig.ts compute/sharedVPCHostProject.ts compute/sharedVPCServiceProject.ts compute/snapshot.ts compute/subnetwork.ts compute/subnetworkIAMBinding.ts compute/subnetworkIAMMember.ts compute/subnetworkIAMPolicy.ts compute/targetHttpProxy.ts compute/targetHttpsProxy.ts compute/targetInstance.ts compute/targetPool.ts compute/targetSSLProxy.ts compute/targetTCPProxy.ts compute/uRLMap.ts compute/vPNGateway.ts compute/vPNTunnel.ts

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("default", {});
const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
    ipCidrRange: "10.0.0.0/16",
    network: defaultNetwork.selfLink,
    region: "us-central1",
});
const internalWithSubnetAndAddress = new gcp.compute.Address("internalWithSubnetAndAddress", {
    address: "10.0.42.42",
    addressType: "INTERNAL",
    region: "us-central1",
    subnetwork: defaultSubnetwork.selfLink,
});

Example Usage - Instance With Ip

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

const debianImage = pulumi.output(gcp.compute.getImage({
    family: "debian-9",
    project: "debian-cloud",
}));
const static = new gcp.compute.Address("static", {});
const instanceWithIp = new gcp.compute.Instance("instanceWithIp", {
    bootDisk: {
        initializeParams: {
            image: debianImage.selfLink,
        },
    },
    machineType: "f1-micro",
    networkInterfaces: [{
        accessConfigs: [{
            natIp: static.address,
        }],
        network: "default",
    }],
    zone: "us-central1-a",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_address.html.markdown.

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): boolean

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

property addressType

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

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

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>;

property labels

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

property name

public name: pulumi.Output<string>;

property networkTier

public networkTier: 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 provider project is used.

property region

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

The URI of the created resource.

property subnetwork

public subnetwork: 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 users

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

class AttachedDisk

extends CustomResource

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_attached_disk.html.markdown.

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): boolean

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>;

property disk

public disk: 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 instance

public instance: pulumi.Output<string>;

property mode

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

property project

public project: 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>;

class Autoscalar

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:

Example Usage - Autoscaler Basic

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

const debian9 = pulumi.output(gcp.compute.getImage({
    family: "debian-9",
    project: "debian-cloud",
}));
const foobarTargetPool = new gcp.compute.TargetPool("foobar", {});
const foobarInstanceTemplate = new gcp.compute.InstanceTemplate("foobar", {
    canIpForward: false,
    disks: [{
        sourceImage: debian9.selfLink,
    }],
    machineType: "n1-standard-1",
    metadata: {
        foo: "bar",
    },
    networkInterfaces: [{
        network: "default",
    }],
    serviceAccount: {
        scopes: [
            "userinfo-email",
            "compute-ro",
            "storage-ro",
        ],
    },
    tags: [
        "foo",
        "bar",
    ],
});
const foobarInstanceGroupManager = new gcp.compute.InstanceGroupManager("foobar", {
    baseInstanceName: "foobar",
    instanceTemplate: foobarInstanceTemplate.selfLink,
    targetPools: [foobarTargetPool.selfLink],
    zone: "us-central1-f",
});
const foobarAutoscalar = new gcp.compute.Autoscalar("foobar", {
    autoscalingPolicy: {
        cooldownPeriod: 60,
        cpuUtilization: {
            target: 0.5,
        },
        maxReplicas: 5,
        minReplicas: 1,
    },
    target: foobarInstanceGroupManager.selfLink,
    zone: "us-central1-f",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_autoscaler.html.markdown.

constructor

new Autoscalar(name: string, args: AutoscalarArgs, opts?: pulumi.CustomResourceOptions)

Create a Autoscalar 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?: 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): boolean

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<{
    cooldownPeriod: undefined | number;
    cpuUtilization: {
        target: number;
    };
    loadBalancingUtilization: undefined | {
        target: number;
    };
    maxReplicas: number;
    metrics: {
        filter: undefined | string;
        name: string;
        singleInstanceAssignment: undefined | number;
        target: undefined | number;
        type: undefined | string;
    }[];
    minReplicas: number;
}>;

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

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>;

property project

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

The URI of the created resource.

property target

public target: 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>;

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 a virtual machine instance.

To get more information about BackendBucket, see:

Example Usage - Backend Bucket Basic

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", {
    bucketName: imageBucket.name,
    description: "Contains beautiful images",
    enableCdn: true,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_backend_bucket.html.markdown.

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): boolean

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>;

property cdnPolicy

public cdnPolicy: pulumi.Output<{
    signedUrlCacheMaxAgeSec: undefined | number;
}>;

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

property enableCdn

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

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>;

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.

class BackendBucketSignedUrlKey

extends CustomResource

A key for signing Cloud CDN signed URLs for BackendBuckets.

To get more information about BackendBucketSignedUrlKey, see:

Warning: All arguments including the key’s value will be stored in the raw state as plain-text. Read more about sensitive data in state. Because the API does not return the sensitive key value, we cannot confirm or reverse changes to a key outside of this provider.

Example Usage - Backend Bucket Signed Url Key

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", {
    bucketName: bucket.name,
    description: "Contains beautiful images",
    enableCdn: true,
});
const backendKey = new gcp.compute.BackendBucketSignedUrlKey("backendKey", {
    backendBucket: testBackend.name,
    keyValue: "pPsVemX8GM46QVeezid6Rw==",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_backend_bucket_signed_url_key.html.markdown.

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): boolean

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>;

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>;

property name

public name: 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 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.

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:

Example Usage - Backend Service Basic

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

const defaultHttpHealthCheck = new gcp.compute.HttpHealthCheck("default", {
    checkIntervalSec: 1,
    requestPath: "/",
    timeoutSec: 1,
});
const defaultBackendService = new gcp.compute.BackendService("default", {
    healthChecks: defaultHttpHealthCheck.selfLink,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_backend_service.html.markdown.

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): boolean

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>;

property backends

public backends: pulumi.Output<{
    balancingMode: undefined | string;
    capacityScaler: undefined | number;
    description: undefined | string;
    group: undefined | string;
    maxConnections: undefined | number;
    maxConnectionsPerEndpoint: undefined | number;
    maxConnectionsPerInstance: undefined | number;
    maxRate: undefined | number;
    maxRatePerEndpoint: undefined | number;
    maxRatePerInstance: undefined | number;
    maxUtilization: undefined | number;
}[] | undefined>;

property cdnPolicy

public cdnPolicy: pulumi.Output<{
    cacheKeyPolicy: undefined | {
        includeHost: undefined | false | true;
        includeProtocol: undefined | false | true;
        includeQueryString: undefined | false | true;
        queryStringBlacklists: string[];
        queryStringWhitelists: string[];
    };
    signedUrlCacheMaxAgeSec: undefined | number;
}>;

property connectionDrainingTimeoutSec

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

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property customRequestHeaders

public customRequestHeaders: pulumi.Output<string[] | undefined>;

property description

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

property enableCdn

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

property fingerprint

public fingerprint: pulumi.Output<string>;

property healthChecks

public healthChecks: pulumi.Output<string>;

property iap

public iap: pulumi.Output<{
    oauth2ClientId: string;
    oauth2ClientSecret: string;
    oauth2ClientSecretSha256: string;
} | undefined>;

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>;

property name

public name: pulumi.Output<string>;

property portName

public portName: 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 provider project is used.

property protocol

public protocol: pulumi.Output<string>;

property securityPolicy

public securityPolicy: pulumi.Output<string | undefined>;
public selfLink: pulumi.Output<string>;

The URI of the created resource.

property sessionAffinity

public sessionAffinity: pulumi.Output<string>;

property timeoutSec

public timeoutSec: pulumi.Output<number>;

property urn

urn: Output<URN>;

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

class BackendServiceSignedUrlKey

extends CustomResource

A key for signing Cloud CDN signed URLs for Backend Services.

To get more information about BackendServiceSignedUrlKey, see:

Warning: All arguments including the key’s value will be stored in the raw state as plain-text. Read more about sensitive data in state. Because the API does not return the sensitive key value, we cannot confirm or reverse changes to a key outside of this provider.

Example Usage - Backend Service Signed Url Key

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

const defaultHttpHealthCheck = new gcp.compute.HttpHealthCheck("default", {
    checkIntervalSec: 1,
    requestPath: "/",
    timeoutSec: 1,
});
const webserver = new gcp.compute.InstanceTemplate("webserver", {
    disks: [{
        autoDelete: true,
        boot: true,
        sourceImage: "debian-cloud/debian-9",
    }],
    machineType: "n1-standard-1",
    networkInterfaces: [{
        network: "default",
    }],
});
const webservers = new gcp.compute.InstanceGroupManager("webservers", {
    baseInstanceName: "webserver",
    instanceTemplate: webserver.selfLink,
    targetSize: 1,
    zone: "us-central1-f",
});
const exampleBackend = new gcp.compute.BackendService("exampleBackend", {
    backends: [{
        group: webservers.instanceGroup,
    }],
    description: "Our company website",
    enableCdn: true,
    healthChecks: defaultHttpHealthCheck.selfLink,
    portName: "http",
    protocol: "HTTP",
    timeoutSec: 10,
});
const backendKey = new gcp.compute.BackendServiceSignedUrlKey("backendKey", {
    backendService: exampleBackend.name,
    keyValue: "pPsVemX8GM46QVeezid6Rw==",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_backend_service_signed_url_key.html.markdown.

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): boolean

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>;

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>;

property name

public name: 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 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.

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:

Warning: All arguments including the disk encryption key will be stored in the raw state as plain-text. Read more about sensitive data in state.

Example Usage - Disk Basic

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",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_disk.html.markdown.

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): boolean

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>;

property description

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

property diskEncryptionKey

public diskEncryptionKey: pulumi.Output<{
    kmsKeySelfLink: undefined | string;
    rawKey: undefined | string;
    sha256: string;
} | undefined>;

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>;

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;

property labels

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

property lastAttachTimestamp

public lastAttachTimestamp: pulumi.Output<string>;

property lastDetachTimestamp

public lastDetachTimestamp: pulumi.Output<string>;

property name

public name: pulumi.Output<string>;

property physicalBlockSizeBytes

public physicalBlockSizeBytes: pulumi.Output<number>;

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

The URI of the created resource.

property size

public size: pulumi.Output<number>;

property snapshot

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

property sourceImageEncryptionKey

public sourceImageEncryptionKey: pulumi.Output<{
    kmsKeySelfLink: undefined | string;
    rawKey: undefined | string;
    sha256: string;
} | undefined>;

property sourceImageId

public sourceImageId: pulumi.Output<string>;

property sourceSnapshotEncryptionKey

public sourceSnapshotEncryptionKey: pulumi.Output<{
    kmsKeySelfLink: undefined | string;
    rawKey: undefined | string;
    sha256: string;
} | undefined>;

property sourceSnapshotId

public sourceSnapshotId: pulumi.Output<string>;

property type

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

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[]>;

property zone

public zone: pulumi.Output<string>;

class ExternalVpnGateway

extends CustomResource

Represents a VPN gateway managed outside of GCP.

To get more information about ExternalVpnGateway, see:

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_external_vpn_gateway.html.markdown.

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): boolean

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>;

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<{
    id: undefined | number;
    ipAddress: undefined | string;
}[] | undefined>;

property name

public name: 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 provider project is used.

property redundancyType

public redundancyType: pulumi.Output<string | undefined>;
public selfLink: 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.

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:

Example Usage - Firewall Basic

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

const defaultNetwork = new gcp.compute.Network("default", {});
const defaultFirewall = new gcp.compute.Firewall("default", {
    allows: [
        {
            protocol: "icmp",
        },
        {
            ports: [
                "80",
                "8080",
                "1000-2000",
            ],
            protocol: "tcp",
        },
    ],
    network: defaultNetwork.name,
    sourceTags: ["web"],
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_firewall.html.markdown.

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): boolean

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<{
    ports: string[];
    protocol: string;
}[] | undefined>;

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property denies

public denies: pulumi.Output<{
    ports: string[];
    protocol: string;
}[] | undefined>;

property description

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

property destinationRanges

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

property direction

public direction: pulumi.Output<string>;

property disabled

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

property enableLogging

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

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>;

property network

public network: pulumi.Output<string>;

property priority

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

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[]>;

property sourceServiceAccounts

public sourceServiceAccounts: pulumi.Output<string[] | undefined>;

property sourceTags

public sourceTags: pulumi.Output<string[] | undefined>;

property targetServiceAccounts

public targetServiceAccounts: pulumi.Output<string[] | undefined>;

property targetTags

public targetTags: pulumi.Output<string[] | undefined>;

property urn

urn: Output<URN>;

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

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:

Example Usage - Forwarding Rule Basic

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

const defaultTargetPool = new gcp.compute.TargetPool("default", {});
const defaultForwardingRule = new gcp.compute.ForwardingRule("default", {
    portRange: "80",
    target: defaultTargetPool.selfLink,
});

Example Usage - Forwarding Rule Internallb

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

const hc = new gcp.compute.HealthCheck("hc", {
    checkIntervalSec: 1,
    tcpHealthCheck: {
        port: 80,
    },
    timeoutSec: 1,
});
const defaultNetwork = new gcp.compute.Network("default", {
    autoCreateSubnetworks: false,
});
const backend = new gcp.compute.RegionBackendService("backend", {
    healthChecks: hc.selfLink,
    region: "us-central1",
});
const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
    ipCidrRange: "10.0.0.0/16",
    network: defaultNetwork.selfLink,
    region: "us-central1",
});
// Forwarding rule for Internal Load Balancing
const defaultForwardingRule = new gcp.compute.ForwardingRule("default", {
    allPorts: true,
    backendService: backend.selfLink,
    loadBalancingScheme: "INTERNAL",
    network: defaultNetwork.name,
    region: "us-central1",
    subnetwork: defaultSubnetwork.name,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_forwarding_rule.html.markdown.

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): boolean

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>;

property backendService

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

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

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>;

property ipProtocol

public ipProtocol: pulumi.Output<string>;

property ipVersion

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

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;

property labels

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

property loadBalancingScheme

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

property name

public name: pulumi.Output<string>;

property network

public network: pulumi.Output<string>;

property networkTier

public networkTier: pulumi.Output<string>;

property portRange

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

property ports

public ports: pulumi.Output<string[] | undefined>;

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

The URI of the created resource.

property serviceLabel

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

property serviceName

public serviceName: pulumi.Output<string>;

property subnetwork

public subnetwork: pulumi.Output<string>;

property target

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

property urn

urn: Output<URN>;

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

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:

Example Usage - Global Address Basic

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

const defaultGlobalAddress = new gcp.compute.GlobalAddress("default", {});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_global_address.html.markdown.

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): boolean

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>;

property addressType

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

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

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>;

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;

property labels

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

property name

public name: pulumi.Output<string>;

property network

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

property prefixLength

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

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>;
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.

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

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

const defaultHttpHealthCheck = new gcp.compute.HttpHealthCheck("default", {
    checkIntervalSec: 1,
    requestPath: "/",
    timeoutSec: 1,
});
const defaultBackendService = new gcp.compute.BackendService("default", {
    healthChecks: defaultHttpHealthCheck.selfLink,
    portName: "http",
    protocol: "HTTP",
    timeoutSec: 10,
});
const defaultURLMap = new gcp.compute.URLMap("default", {
    defaultService: defaultBackendService.selfLink,
    description: "a description",
    hostRules: [{
        hosts: ["mysite.com"],
        pathMatcher: "allpaths",
    }],
    pathMatchers: [{
        defaultService: defaultBackendService.selfLink,
        name: "allpaths",
        pathRules: [{
            paths: ["/*"],
            service: defaultBackendService.selfLink,
        }],
    }],
});
const defaultTargetHttpProxy = new gcp.compute.TargetHttpProxy("default", {
    description: "a description",
    urlMap: defaultURLMap.selfLink,
});
const defaultGlobalForwardingRule = new gcp.compute.GlobalForwardingRule("default", {
    portRange: "80",
    target: defaultTargetHttpProxy.selfLink,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_global_forwarding_rule.html.markdown.

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): boolean

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>;

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>;

property ipProtocol

public ipProtocol: pulumi.Output<string>;

property ipVersion

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

property labelFingerprint

public labelFingerprint: pulumi.Output<string>;

property labels

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

property loadBalancingScheme

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

property name

public name: pulumi.Output<string>;

property network

public network: pulumi.Output<string>;

property portRange

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

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>;

property urn

urn: Output<URN>;

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

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:

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_ha_vpn_gateway.html.markdown.

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): boolean

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>;

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>;

property network

public network: 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 provider project is used.

property region

public region: pulumi.Output<string>;
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<{
    id: undefined | number;
    ipAddress: undefined | string;
}[]>;

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:

Example Usage - Health Check Basic

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

const internalHealthCheck = new gcp.compute.HealthCheck("internal-health-check", {
    checkIntervalSec: 1,
    tcpHealthCheck: {
        port: 80,
    },
    timeoutSec: 1,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_health_check.html.markdown.

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): boolean

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>;

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

property healthyThreshold

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

property httpHealthCheck

public httpHealthCheck: pulumi.Output<{
    host: undefined | string;
    port: undefined | number;
    portName: undefined | string;
    portSpecification: undefined | string;
    proxyHeader: undefined | string;
    requestPath: undefined | string;
    response: undefined | string;
} | undefined>;

property httpsHealthCheck

public httpsHealthCheck: pulumi.Output<{
    host: undefined | string;
    port: undefined | number;
    portName: undefined | string;
    portSpecification: undefined | string;
    proxyHeader: undefined | string;
    requestPath: undefined | string;
    response: undefined | string;
} | undefined>;

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>;

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<{
    port: undefined | number;
    portName: undefined | string;
    portSpecification: undefined | string;
    proxyHeader: undefined | string;
    request: undefined | string;
    response: undefined | string;
} | undefined>;

property tcpHealthCheck

public tcpHealthCheck: pulumi.Output<{
    port: undefined | number;
    portName: undefined | string;
    portSpecification: undefined | string;
    proxyHeader: undefined | string;
    request: undefined | string;
    response: undefined | string;
} | undefined>;

property timeoutSec

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

property type

public type: pulumi.Output<string>;

property unhealthyThreshold

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

property urn

urn: Output<URN>;

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

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 should be preferred for all uses except Network Load Balancers which still require the legacy version.

To get more information about HttpHealthCheck, see:

Example Usage - Http Health Check Basic

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,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_http_health_check.html.markdown.

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): boolean

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>;

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

property healthyThreshold

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

property host

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

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>;

property port

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

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

The URI of the created resource.

property timeoutSec

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

property unhealthyThreshold

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

property urn

urn: Output<URN>;

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

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 should be preferred for all uses except Network Load Balancers which still require the legacy version.

To get more information about HttpsHealthCheck, see:

Example Usage - Https Health Check Basic

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,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_https_health_check.html.markdown.

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): boolean

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>;

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

property healthyThreshold

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

property host

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

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>;

property port

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

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

The URI of the created resource.

property timeoutSec

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

property unhealthyThreshold

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

property urn

urn: Output<URN>;

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

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:

Example Usage - Image Basic

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",
    },
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_image.html.markdown.

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): boolean

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>;

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

property diskSizeGb

public diskSizeGb: pulumi.Output<number>;

property family

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

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>;

property labels

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

property licenses

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

property name

public name: 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 provider project is used.

property rawDisk

public rawDisk: pulumi.Output<{
    containerType: undefined | string;
    sha1: undefined | string;
    source: string;
} | undefined>;
public selfLink: pulumi.Output<string>;

The URI of the created resource.

property sourceDisk

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

property urn

urn: Output<URN>;

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

class Instance

extends CustomResource

Manages a VM instance resource within GCE. For more information see the official documentation and API.

Example Usage

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: [{}],
    serviceAccount: {
        scopes: [
            "userinfo-email",
            "compute-ro",
            "storage-ro",
        ],
    },
    tags: [
        "foo",
        "bar",
    ],
    zone: "us-central1-a",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_instance.html.markdown.

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): boolean

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 provider 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<{
    deviceName: string;
    diskEncryptionKeyRaw: undefined | string;
    diskEncryptionKeySha256: string;
    kmsKeySelfLink: string;
    mode: undefined | string;
    source: string;
}[] | 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<{
    autoDelete: undefined | false | true;
    deviceName: string;
    diskEncryptionKeyRaw: undefined | string;
    diskEncryptionKeySha256: string;
    initializeParams: {
        image: string;
        labels: {[key: string]: any};
        size: number;
        type: string;
    };
    kmsKeySelfLink: string;
    source: string;
}>;

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 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, or the instance cannot be deleted and the deployment will not complete successfully.

property description

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

A brief description of this resource.

property guestAccelerators

public guestAccelerators: pulumi.Output<{
    count: number;
    type: string;
}[]>;

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 set 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.

property minCpuPlatform

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

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. Note: allowStoppingForUpdate must be set to true 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<{
    accessConfigs: {
        natIp: string;
        networkTier: string;
        publicPtrDomainName: undefined | string;
    }[];
    aliasIpRanges: {
        ipCidrRange: string;
        subnetworkRangeName: undefined | string;
    }[];
    name: string;
    network: string;
    networkIp: string;
    subnetwork: string;
    subnetworkProject: string;
}[]>;

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 scheduling

public scheduling: pulumi.Output<{
    automaticRestart: undefined | false | true;
    nodeAffinities: {
        key: string;
        operator: string;
        values: string[];
    }[];
    onHostMaintenance: string;
    preemptible: undefined | false | true;
}>;

The scheduling strategy to use. More details about this configuration option are detailed below.

property scratchDisks

public scratchDisks: pulumi.Output<{
    interface: undefined | string;
}[] | 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<{
    email: string;
    scopes: string[];
} | undefined>;

Service account to attach to the instance. Structure is documented below. Note: allowStoppingForUpdate must be set to true in order to update this field.

property shieldedInstanceConfig

public shieldedInstanceConfig: pulumi.Output<{
    enableIntegrityMonitoring: undefined | false | true;
    enableSecureBoot: undefined | false | true;
    enableVtpm: undefined | false | true;
}>;

Enable 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.

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.

class InstanceFromTemplate

extends CustomResource

Manages a VM instance resource within GCE. For more information see the official documentation and API.

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

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

const tplInstanceTemplate = new gcp.compute.InstanceTemplate("tpl", {
    canIpForward: true,
    disks: [{
        autoDelete: true,
        boot: true,
        diskSizeGb: 100,
        sourceImage: "debian-cloud/debian-9",
    }],
    machineType: "n1-standard-1",
    metadata: {
        foo: "bar",
    },
    networkInterfaces: [{
        network: "default",
    }],
});
const tplInstanceFromTemplate = new gcp.compute.InstanceFromTemplate("tpl", {
    // Override fields from instance template
    canIpForward: false,
    labels: {
        my_key: "myValue",
    },
    sourceInstanceTemplate: tplInstanceTemplate.selfLink,
    zone: "us-central1-a",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_instance_from_template.html.markdown.

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): boolean

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<{
    deviceName: string;
    diskEncryptionKeyRaw: string;
    diskEncryptionKeySha256: string;
    kmsKeySelfLink: string;
    mode: string;
    source: string;
}[]>;

property bootDisk

public bootDisk: pulumi.Output<{
    autoDelete: boolean;
    deviceName: string;
    diskEncryptionKeyRaw: string;
    diskEncryptionKeySha256: string;
    initializeParams: {
        image: string;
        labels: {[key: string]: any};
        size: number;
        type: string;
    };
    kmsKeySelfLink: string;
    source: string;
}>;

property canIpForward

public canIpForward: pulumi.Output<boolean>;

property cpuPlatform

public cpuPlatform: pulumi.Output<string>;

property deletionProtection

public deletionProtection: pulumi.Output<boolean>;

property description

public description: pulumi.Output<string>;

property guestAccelerators

public guestAccelerators: pulumi.Output<{
    count: number;
    type: string;
}[]>;

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<{
    accessConfigs: {
        natIp: string;
        networkTier: string;
        publicPtrDomainName: string;
    }[];
    aliasIpRanges: {
        ipCidrRange: string;
        subnetworkRangeName: string;
    }[];
    name: string;
    network: string;
    networkIp: string;
    subnetwork: string;
    subnetworkProject: string;
}[]>;

property project

public project: pulumi.Output<string>;

property scheduling

public scheduling: pulumi.Output<{
    automaticRestart: boolean;
    nodeAffinities: {
        key: string;
        operator: string;
        values: string[];
    }[];
    onHostMaintenance: string;
    preemptible: boolean;
}>;

property scratchDisks

public scratchDisks: pulumi.Output<{
    interface: string;
}[]>;
public selfLink: pulumi.Output<string>;

property serviceAccount

public serviceAccount: pulumi.Output<{
    email: string;
    scopes: string[];
}>;

property shieldedInstanceConfig

public shieldedInstanceConfig: pulumi.Output<{
    enableIntegrityMonitoring: boolean;
    enableSecureBoot: boolean;
    enableVtpm: boolean;
}>;

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.

class InstanceGroup

extends CustomResource

Creates a group of dissimilar Compute Engine virtual machine instances. For more information, see the official documentation and API

Recreating an instance group that’s in use by another resource will give a resourceInUseByAnotherResource error.

Example Usage - Empty instance group

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

const test = new gcp.compute.InstanceGroup("test", {
    description: "Test instance group",
    network: google_compute_network_default.selfLink,
    zone: "us-central1-a",
});

Example Usage - With instances and named ports

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.selfLink,
        google_compute_instance_test2.selfLink,
    ],
    namedPorts: [
        {
            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.

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

const debianImage = pulumi.output(gcp.compute.getImage({
    family: "debian-9",
    project: "debian-cloud",
}));
const stagingHealth = new gcp.compute.HttpsHealthCheck("stagingHealth", {
    requestPath: "/health_check",
});
const stagingVm = new gcp.compute.Instance("stagingVm", {
    bootDisk: {
        initializeParams: {
            image: debianImage.selfLink,
        },
    },
    machineType: "n1-standard-1",
    networkInterfaces: [{
        network: "default",
    }],
    zone: "us-central1-c",
});
const stagingGroup = new gcp.compute.InstanceGroup("stagingGroup", {
    instances: [stagingVm.selfLink],
    namedPorts: [
        {
            name: "http",
            port: 8080,
        },
        {
            name: "https",
            port: 8443,
        },
    ],
    zone: "us-central1-c",
});
const stagingService = new gcp.compute.BackendService("stagingService", {
    backends: [{
        group: stagingGroup.selfLink,
    }],
    healthChecks: stagingHealth.selfLink,
    portName: "https",
    protocol: "HTTPS",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_instance_group.html.markdown.

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): boolean

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 of the instance group. Must be 1-63 characters long and comply with RFC1035. Supported characters include lowercase letters, numbers, and hyphens.

property namedPorts

public namedPorts: pulumi.Output<{
    name: string;
    port: number;
}[] | 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.

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 and API

Note: Use gcp.compute.RegionInstanceGroupManager to create a regional (multi-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,
    healthyThreshold: 2,
    httpHealthCheck: {
        port: 8080,
        requestPath: "/healthz",
    },
    timeoutSec: 5,
    unhealthyThreshold: 10, // 50 seconds
});
const appserver = new gcp.compute.InstanceGroupManager("appserver", {
    autoHealingPolicies: {
        healthCheck: autohealing.selfLink,
        initialDelaySec: 300,
    },
    baseInstanceName: "app",
    instanceTemplate: google_compute_instance_template_appserver.selfLink,
    namedPorts: [{
        name: "customHTTP",
        port: 8888,
    }],
    targetPools: [google_compute_target_pool_appserver.selfLink],
    targetSize: 2,
    updateStrategy: "NONE",
    zone: "us-central1-a",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_instance_group_manager.html.markdown.

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): boolean

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<{
    healthCheck: string;
    initialDelaySec: number;
} | 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 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>;

The name of the instance group manager. Must be 1-63 characters long and comply with RFC1035. Supported characters include lowercase letters, numbers, and hyphens.

property namedPorts

public namedPorts: pulumi.Output<{
    name: string;
    port: number;
}[] | 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 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 target number of running instances for this managed instance group. This value should always be explicitly set unless this resource is attached to an autoscaler, in which case it should never be set. Defaults to 0.

property updatePolicy

public updatePolicy: pulumi.Output<{
    maxSurgeFixed: number;
    maxSurgePercent: undefined | number;
    maxUnavailableFixed: number;
    maxUnavailablePercent: undefined | number;
    minReadySec: undefined | number;
    minimalAction: string;
    type: string;
}>;

) 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<{
    instanceTemplate: string;
    name: string;
    targetSize: undefined | {
        fixed: undefined | number;
        percent: undefined | number;
    };
}[]>;

) 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.

class InstanceIAMBinding

extends CustomResource

Three different resources help you manage your IAM policy for GCE 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

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

const admin = pulumi.output(gcp.organizations.getIAMPolicy({
    bindings: [{
        members: ["user:jane@example.com"],
        role: "roles/compute.osLogin",
    }],
}));
const instance = new gcp.compute.InstanceIAMPolicy("instance", {
    instanceName: "your-instance-name",
    policyData: admin.policyData,
});

google_compute_instance_iam_binding

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

const instance = new gcp.compute.InstanceIAMBinding("instance", {
    instanceName: "your-instance-name",
    members: ["user:jane@example.com"],
    role: "roles/compute.osLogin",
});

google_compute_instance_iam_member

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

const instance = new gcp.compute.InstanceIAMMember("instance", {
    instanceName: "your-instance-name",
    member: "user:jane@example.com",
    role: "roles/compute.osLogin",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_instance_iam_binding.html.markdown.

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): boolean

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 etag

public etag: pulumi.Output<string>;

(Computed) The etag of the instance’s 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>;

The name of the instance.

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 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>;

The zone of the instance. If unspecified, this defaults to the zone configured in the provider.

class InstanceIAMMember

extends CustomResource

Three different resources help you manage your IAM policy for GCE 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

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

const admin = pulumi.output(gcp.organizations.getIAMPolicy({
    bindings: [{
        members: ["user:jane@example.com"],
        role: "roles/compute.osLogin",
    }],
}));
const instance = new gcp.compute.InstanceIAMPolicy("instance", {
    instanceName: "your-instance-name",
    policyData: admin.policyData,
});

google_compute_instance_iam_binding

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

const instance = new gcp.compute.InstanceIAMBinding("instance", {
    instanceName: "your-instance-name",
    members: ["user:jane@example.com"],
    role: "roles/compute.osLogin",
});

google_compute_instance_iam_member

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

const instance = new gcp.compute.InstanceIAMMember("instance", {
    instanceName: "your-instance-name",
    member: "user:jane@example.com",
    role: "roles/compute.osLogin",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_instance_iam_member.html.markdown.

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): boolean

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 etag

public etag: pulumi.Output<string>;

(Computed) The etag of the instance’s 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>;

The name of the instance.

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 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>;

The zone of the instance. If unspecified, this defaults to the zone configured in the provider.

class InstanceIAMPolicy

extends CustomResource

Three different resources help you manage your IAM policy for GCE 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

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

const admin = pulumi.output(gcp.organizations.getIAMPolicy({
    bindings: [{
        members: ["user:jane@example.com"],
        role: "roles/compute.osLogin",
    }],
}));
const instance = new gcp.compute.InstanceIAMPolicy("instance", {
    instanceName: "your-instance-name",
    policyData: admin.policyData,
});

google_compute_instance_iam_binding

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

const instance = new gcp.compute.InstanceIAMBinding("instance", {
    instanceName: "your-instance-name",
    members: ["user:jane@example.com"],
    role: "roles/compute.osLogin",
});

google_compute_instance_iam_member

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

const instance = new gcp.compute.InstanceIAMMember("instance", {
    instanceName: "your-instance-name",
    member: "user:jane@example.com",
    role: "roles/compute.osLogin",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_instance_iam_policy.html.markdown.

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): boolean

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 instance’s 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>;

The name of the instance.

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 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. If unspecified, this defaults to the zone configured in the provider.

class InstanceTemplate

extends CustomResource

Manages a VM instance template resource within GCE. For more information see the official documentation and API.

Example Usage

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

const myImage = pulumi.output(gcp.compute.getImage({
    family: "debian-9",
    project: "debian-cloud",
}));
const foobar = new gcp.compute.Disk("foobar", {
    image: myImage.selfLink,
    size: 10,
    type: "pd-ssd",
    zone: "us-central1-a",
});
const defaultInstanceTemplate = new gcp.compute.InstanceTemplate("default", {
    canIpForward: false,
    description: "This template is used to create app server instances.",
    disks: [
        // Create a new boot disk from an image
        {
            autoDelete: true,
            boot: true,
            sourceImage: "debian-cloud/debian-9",
        },
        // Use an existing disk resource
        {
            autoDelete: false,
            boot: false,
            // Instance Templates reference disks by name, not self link
            source: foobar.name,
        },
    ],
    instanceDescription: "description assigned to instances",
    labels: {
        environment: "dev",
    },
    machineType: "n1-standard-1",
    metadata: {
        foo: "bar",
    },
    networkInterfaces: [{
        network: "default",
    }],
    scheduling: {
        automaticRestart: true,
        onHostMaintenance: "MIGRATE",
    },
    serviceAccount: {
        scopes: [
            "userinfo-email",
            "compute-ro",
            "storage-ro",
        ],
    },
    tags: [
        "foo",
        "bar",
    ],
});

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 destroy the existing resource and create a replacement. In order to effectively use an Instance Template resource with an [Instance Group Manager resource][1], it’s recommended to specify createBeforeDestroy in a [lifecycle][2] block. Either omit the Instance Template name attribute, or specify a partial name with namePrefix. Example:

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

const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", {
    // boot disk
    disks: [{}],
    machineType: "n1-standard-1",
    namePrefix: "instance-template-",
    // networking
    networkInterfaces: [{}],
    region: "us-central1",
});
const instanceGroupManager = new gcp.compute.InstanceGroupManager("instanceGroupManager", {
    baseInstanceName: "instance-group-manager",
    instanceTemplate: instanceTemplate.selfLink,
    targetSize: 1,
    zone: "us-central1-f",
});

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 this 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 this 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 this 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 deployment. You can achieve this by using the gcp.compute.Image data source, which will retrieve the latest image on every deployment, and will update the template to use that specific image:

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

const myImage = pulumi.output(gcp.compute.getImage({
    family: "debian-9",
    project: "debian-cloud",
}));
const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", {
    // boot disk
    disks: [{
        sourceImage: google_compute_image_my_image.selfLink,
    }],
    machineType: "n1-standard-1",
    namePrefix: "instance-template-",
    region: "us-central1",
});

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:

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",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_instance_template.html.markdown.

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): boolean

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<{
    autoDelete: undefined | false | true;
    boot: boolean;
    deviceName: string;
    diskEncryptionKey: undefined | {
        kmsKeySelfLink: undefined | string;
    };
    diskName: undefined | string;
    diskSizeGb: undefined | number;
    diskType: string;
    interface: string;
    labels: undefined | {[key: string]: string};
    mode: string;
    source: undefined | string;
    sourceImage: string;
    type: string;
}[]>;

Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

property guestAccelerators

public guestAccelerators: pulumi.Output<{
    count: number;
    type: string;
}[] | 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.

property name

public name: pulumi.Output<string>;

The name of the instance template. If you leave this blank, this 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<{
    accessConfigs: {
        natIp: string;
        networkTier: string;
    }[];
    aliasIpRanges: {
        ipCidrRange: string;
        subnetworkRangeName: undefined | string;
    }[];
    network: string;
    networkIp: undefined | string;
    subnetwork: string;
    subnetworkProject: string;
}[] | 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<{
    automaticRestart: undefined | false | true;
    nodeAffinities: {
        key: string;
        operator: string;
        values: string[];
    }[];
    onHostMaintenance: string;
    preemptible: undefined | false | true;
}>;

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<{
    email: string;
    scopes: string[];
} | undefined>;

Service account to attach to the instance. Structure is documented below.

property shieldedInstanceConfig

public shieldedInstanceConfig: pulumi.Output<{
    enableIntegrityMonitoring: undefined | false | true;
    enableSecureBoot: undefined | false | true;
    enableVtpm: undefined | false | true;
}>;

Enable 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.

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.

class InterconnectAttachment

extends CustomResource

Represents an InterconnectAttachment (VLAN attachment) resource. For more information, see Creating VLAN Attachments.

Example Usage - Interconnect Attachment Basic

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.selfLink,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_interconnect_attachment.html.markdown.

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): boolean

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 candidateSubnets

public candidateSubnets: pulumi.Output<string[] | undefined>;

property cloudRouterIpAddress

public cloudRouterIpAddress: pulumi.Output<string>;

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property customerRouterIpAddress

public customerRouterIpAddress: pulumi.Output<string>;

property description

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

property edgeAvailabilityDomain

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

property googleReferenceId

public googleReferenceId: 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 interconnect

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

property name

public name: pulumi.Output<string>;

property pairingKey

public pairingKey: pulumi.Output<string>;

property partnerAsn

public partnerAsn: pulumi.Output<string>;

property privateInterconnectInfo

public privateInterconnectInfo: pulumi.Output<{
    tag8021q: number;
}>;

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>;

property router

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

The URI of the created resource.

property state

public state: pulumi.Output<string>;

property type

public type: 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 vlanTag8021q

public vlanTag8021q: pulumi.Output<number>;

class MangedSslCertificate

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:

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.

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_managed_ssl_certificate.html.markdown.

constructor

new MangedSslCertificate(name: string, args?: MangedSslCertificateArgs, opts?: pulumi.CustomResourceOptions)

Create a MangedSslCertificate 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?: 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): boolean

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>;

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

property expireTime

public expireTime: 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 managed

public managed: pulumi.Output<{
    domains: string;
} | undefined>;

property name

public name: 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 provider project is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property subjectAlternativeNames

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

property type

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

property urn

urn: Output<URN>;

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

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", {});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_network.html.markdown.

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): boolean

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>;

property deleteDefaultRoutesOnCreate

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

property description

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

property gatewayIpv4

public gatewayIpv4: 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 ipv4Range

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

property name

public name: 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 provider project is used.

property routingMode

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

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:

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_network_endpoint.html.markdown.

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): boolean

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>;

property ipAddress

public ipAddress: pulumi.Output<string>;

property networkEndpointGroup

public networkEndpointGroup: pulumi.Output<string>;

property port

public port: pulumi.Output<number>;

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>;

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("default", {
    autoCreateSubnetworks: false,
});
const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
    ipCidrRange: "10.0.0.0/16",
    network: defaultNetwork.selfLink,
    region: "us-central1",
});
const neg = new gcp.compute.NetworkEndpointGroup("neg", {
    defaultPort: 90,
    network: defaultNetwork.selfLink,
    subnetwork: defaultSubnetwork.selfLink,
    zone: "us-central1-a",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_network_endpoint_group.html.markdown.

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): boolean

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>;

property description

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

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>;

property network

public network: pulumi.Output<string>;

property networkEndpointType

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

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>;

property subnetwork

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

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>;

class NetworkPeering

extends CustomResource

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

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

Note: Subnets IP ranges across peered VPC networks cannot overlap.

Example Usage

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

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

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_network_peering.html.markdown.

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): boolean

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 autoCreateRoutes

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

If set to true, the routes between the two networks will be created and managed automatically. Defaults to true.

property exportCustomRoutes

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

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>;

property name

public name: pulumi.Output<string>;

Name of the peering.

property network

public network: pulumi.Output<string>;

Resource link of the network to add a peering to.

property peerNetwork

public peerNetwork: pulumi.Output<string>;

Resource link of the peer network.

property state

public state: pulumi.Output<string>;

State for the peering.

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.

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 config or through external changes will cause this 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 = pulumi.output(gcp.compute.getNodeTypes({
    zone: "us-central1-a",
}));
const soletenantTmpl = new gcp.compute.NodeTemplate("soletenant-tmpl", {
    nodeType: central1a.apply(central1a => central1a.names[0]),
    region: "us-central1",
});
const nodes = new gcp.compute.NodeGroup("nodes", {
    description: "example gcp.compute.NodeGroup for Google Provider",
    nodeTemplate: soletenant_tmpl.selfLink,
    size: 1,
    zone: "us-central1-a",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_node_group.html.markdown.

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): boolean

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 creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

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>;

property nodeTemplate

public nodeTemplate: 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 provider project is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property size

public size: pulumi.Output<number>;

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>;

class NodeTemplate

extends CustomResource

Represents a NodeTemplate resource. Node templates specify properties for creating sole-tenant nodes, such as node type, vCPU and memory requirments, 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 = pulumi.output(gcp.compute.getNodeTypes({
    zone: "us-central1-a",
}));
const template = new gcp.compute.NodeTemplate("template", {
    nodeType: central1a.apply(central1a => central1a.names[0]),
    region: "us-central1",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_node_template.html.markdown.

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): boolean

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>;

property description

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

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>;

property nodeAffinityLabels

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

property nodeType

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

property nodeTypeFlexibility

public nodeTypeFlexibility: pulumi.Output<{
    cpus: undefined | string;
    localSsd: string;
    memory: undefined | string;
} | undefined>;

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

The URI of the created resource.

property serverBinding

public serverBinding: pulumi.Output<{
    type: string;
}>;

property urn

urn: Output<URN>;

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

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",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_project_default_network_tier.html.markdown.

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): boolean

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.

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",
    },
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_project_metadata.html.markdown.

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): boolean

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.

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 with this 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",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_project_metadata_item.html.markdown.

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): boolean

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.

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 = pulumi.output(gcp.compute.getImage({
    family: "debian-9",
    project: "debian-cloud",
}));
const foobarTargetPool = new gcp.compute.TargetPool("foobar", {});
const foobarInstanceTemplate = new gcp.compute.InstanceTemplate("foobar", {
    canIpForward: false,
    disks: [{
        sourceImage: debian9.selfLink,
    }],
    machineType: "n1-standard-1",
    metadata: {
        foo: "bar",
    },
    networkInterfaces: [{
        network: "default",
    }],
    serviceAccount: {
        scopes: [
            "userinfo-email",
            "compute-ro",
            "storage-ro",
        ],
    },
    tags: [
        "foo",
        "bar",
    ],
});
const foobarRegionInstanceGroupManager = new gcp.compute.RegionInstanceGroupManager("foobar", {
    baseInstanceName: "foobar",
    instanceTemplate: foobarInstanceTemplate.selfLink,
    region: "us-central1",
    targetPools: [foobarTargetPool.selfLink],
});
const foobarRegionAutoscaler = new gcp.compute.RegionAutoscaler("foobar", {
    autoscalingPolicy: {
        cooldownPeriod: 60,
        cpuUtilization: {
            target: 0.5,
        },
        maxReplicas: 5,
        minReplicas: 1,
    },
    region: "us-central1",
    target: foobarRegionInstanceGroupManager.selfLink,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_region_autoscaler.html.markdown.

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): boolean

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<{
    cooldownPeriod: undefined | number;
    cpuUtilization: {
        target: number;
    };
    loadBalancingUtilization: undefined | {
        target: number;
    };
    maxReplicas: number;
    metrics: {
        filter: undefined | string;
        name: string;
        singleInstanceAssignment: undefined | number;
        target: undefined | number;
        type: undefined | string;
    }[];
    minReplicas: number;
}>;

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

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>;

property project

public project: pulumi.Output<string>;

property region

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

The URI of the created resource.

property target

public target: 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.

class RegionBackendService

extends CustomResource

A Region Backend Service defines a regionally-scoped group of virtual machines that will serve traffic for load balancing.

Region backend services can only be used when using internal load balancing. For external load balancing, use a global backend service instead.

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("default", {
    checkIntervalSec: 1,
    tcpHealthCheck: {
        port: 80,
    },
    timeoutSec: 1,
});
const defaultRegionBackendService = new gcp.compute.RegionBackendService("default", {
    connectionDrainingTimeoutSec: 10,
    healthChecks: defaultHealthCheck.selfLink,
    region: "us-central1",
    sessionAffinity: "CLIENT_IP",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_region_backend_service.html.markdown.

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): boolean

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 backends

public backends: pulumi.Output<{
    description: undefined | string;
    failover: undefined | false | true;
    group: undefined | string;
}[] | undefined>;

property connectionDrainingTimeoutSec

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

property description

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

property failoverPolicy

public failoverPolicy: pulumi.Output<{
    disableConnectionDrainOnFailover: undefined | false | true;
    dropTrafficIfUnhealthy: undefined | false | true;
    failoverRatio: undefined | number;
} | undefined>;

property fingerprint

public fingerprint: pulumi.Output<string>;

property healthChecks

public healthChecks: 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 loadBalancingScheme

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

property name

public name: 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 provider project is used.

property protocol

public protocol: pulumi.Output<string>;

property region

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

The URI of the created resource.

property sessionAffinity

public sessionAffinity: pulumi.Output<string>;

property timeoutSec

public timeoutSec: pulumi.Output<number>;

property urn

urn: Output<URN>;

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

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 the disk encryption key will be stored in the raw state as plain-text. Read more about sensitive data 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", {
    physicalBlockSizeBytes: 4096,
    region: "us-central1",
    replicaZones: [
        "us-central1-a",
        "us-central1-f",
    ],
    snapshot: snapdisk.selfLink,
    type: "pd-ssd",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_region_disk.html.markdown.

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): boolean

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>;

property description

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

property diskEncryptionKey

public diskEncryptionKey: pulumi.Output<{
    kmsKeyName: undefined | string;
    rawKey: undefined | string;
    sha256: string;
} | undefined>;

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>;

property labels

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

property lastAttachTimestamp

public lastAttachTimestamp: pulumi.Output<string>;

property lastDetachTimestamp

public lastDetachTimestamp: pulumi.Output<string>;

property name

public name: pulumi.Output<string>;

property physicalBlockSizeBytes

public physicalBlockSizeBytes: pulumi.Output<number>;

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>;

property replicaZones

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

The URI of the created resource.

property size

public size: pulumi.Output<number>;

property snapshot

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

property sourceSnapshotEncryptionKey

public sourceSnapshotEncryptionKey: pulumi.Output<{
    kmsKeyName: undefined | string;
    rawKey: undefined | string;
    sha256: string;
} | undefined>;

property sourceSnapshotId

public sourceSnapshotId: pulumi.Output<string>;

property type

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

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[]>;

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,
    healthyThreshold: 2,
    httpHealthCheck: {
        port: 8080,
        requestPath: "/healthz",
    },
    timeoutSec: 5,
    unhealthyThreshold: 10, // 50 seconds
});
const appserver = new gcp.compute.RegionInstanceGroupManager("appserver", {
    autoHealingPolicies: {
        healthCheck: autohealing.selfLink,
        initialDelaySec: 300,
    },
    baseInstanceName: "app",
    distributionPolicyZones: [
        "us-central1-a",
        "us-central1-f",
    ],
    instanceTemplate: google_compute_instance_template_appserver.selfLink,
    namedPorts: [{
        name: "custom",
        port: 8888,
    }],
    region: "us-central1",
    targetPools: [google_compute_target_pool_appserver.selfLink],
    targetSize: 2,
});

Example Usage with multiple versions (google-beta provider)

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,
    updateStrategy: "NONE",
    versions: [
        {
            instanceTemplate: google_compute_instance_template_appserver.selfLink,
        },
        {
            instanceTemplate: google_compute_instance_template_appserver_canary.selfLink,
            targetSize: {
                fixed: 1,
            },
        },
    ],
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_region_instance_group_manager.html.markdown.

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): boolean

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<{
    healthCheck: string;
    initialDelaySec: number;
} | 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>;

The name of the instance group manager. Must be 1-63 characters long and comply with RFC1035. Supported characters include lowercase letters, numbers, and hyphens.

property namedPorts

public namedPorts: pulumi.Output<{
    name: string;
    port: number;
}[] | 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 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 target number of running instances for this managed instance group. This value should always be explicitly set unless this resource is attached to an autoscaler, in which case it should never be set. Defaults to 0.

property updatePolicy

public updatePolicy: pulumi.Output<{
    maxSurgeFixed: number;
    maxSurgePercent: undefined | number;
    maxUnavailableFixed: number;
    maxUnavailablePercent: undefined | number;
    minReadySec: undefined | number;
    minimalAction: string;
    type: string;
}>;

) 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<{
    instanceTemplate: string;
    name: string;
    targetSize: undefined | {
        fixed: undefined | number;
        percent: undefined | number;
    };
}[]>;

) 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.

class ResourcePolicy

extends CustomResource

A policy that can be attached to a resource to specify or schedule actions on that resource.

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_resource_policy.html.markdown.

constructor

new ResourcePolicy(name: string, args?: ResourcePolicyArgs, opts?: pulumi.CustomResourceOptions)

Create a ResourcePolicy 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?: ResourcePolicyState, opts?: pulumi.CustomResourceOptions): ResourcePolicy

Get an existing ResourcePolicy 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): boolean

Returns true if the given object is an instance of ResourcePolicy. 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 name

public name: 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 provider project is used.

property region

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

property snapshotSchedulePolicy

public snapshotSchedulePolicy: pulumi.Output<{
    retentionPolicy: undefined | {
        maxRetentionDays: number;
        onSourceDiskDelete: undefined | string;
    };
    schedule: {
        dailySchedule: undefined | {
            daysInCycle: number;
            startTime: string;
        };
        hourlySchedule: undefined | {
            hoursInCycle: number;
            startTime: string;
        };
        weeklySchedule: undefined | {
            dayOfWeeks: {
                day: string;
                startTime: string;
            }[];
        };
    };
    snapshotProperties: undefined | {
        guestFlush: undefined | false | true;
        labels: undefined | {[key: string]: string};
        storageLocations: undefined | string;
    };
} | undefined>;

property urn

urn: Output<URN>;

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

class Route

extends CustomResource

Represents a Route resource.

A route is a rule that specifies how certain packets should be handled by the virtual network. Routes are associated with virtual machines by tag, and the set of routes for a particular virtual machine is called its routing table. For each packet leaving a virtual machine, the system searches that virtual machine’s routing table for a single best matching route.

Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route – either to another virtual machine destination, a virtual machine gateway or a Compute Engine-operated gateway. Packets that do not match any route in the sending virtual machine’s routing table will be dropped.

A Route resource must have exactly one specification of either nextHopGateway, nextHopInstance, nextHopIp, or nextHopVpnTunnel.

To get more information about Route, see:

Example Usage - Route Basic

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

const defaultNetwork = new gcp.compute.Network("default", {});
const defaultRoute = new gcp.compute.Route("default", {
    destRange: "15.0.0.0/24",
    network: defaultNetwork.name,
    nextHopIp: "10.132.1.5",
    priority: 100,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_route.html.markdown.

constructor

new Route(name: string, args: RouteArgs, opts?: pulumi.CustomResourceOptions)

Create a Route 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?: RouteState, opts?: pulumi.CustomResourceOptions): Route

Get an existing Route 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): boolean

Returns true if the given object is an instance of Route. 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>;

property destRange

public destRange: 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 name

public name: pulumi.Output<string>;

property network

public network: pulumi.Output<string>;

property nextHopGateway

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

property nextHopInstance

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

property nextHopInstanceZone

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

(Optional when nextHopInstance is specified) The zone of the instance specified in nextHopInstance. Omit if nextHopInstance is specified as a URL.

property nextHopIp

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

property nextHopNetwork

public nextHopNetwork: pulumi.Output<string>;

property nextHopVpnTunnel

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

property priority

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

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 tags

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

property urn

urn: Output<URN>;

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

class Router

extends CustomResource

Represents a Router resource.

To get more information about Router, see:

Example Usage - Router Basic

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

const foobarNetwork = new gcp.compute.Network("foobar", {
    autoCreateSubnetworks: false,
});
const foobarRouter = new gcp.compute.Router("foobar", {
    bgp: {
        advertiseMode: "CUSTOM",
        advertisedGroups: ["ALL_SUBNETS"],
        advertisedIpRanges: [
            {
                range: "1.2.3.4",
            },
            {
                range: "6.7.0.0/16",
            },
        ],
        asn: 64514,
    },
    network: foobarNetwork.name,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_router.html.markdown.

constructor

new Router(name: string, args: RouterArgs, opts?: pulumi.CustomResourceOptions)

Create a Router 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?: RouterState, opts?: pulumi.CustomResourceOptions): Router

Get an existing Router 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): boolean

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

property bgp

public bgp: pulumi.Output<{
    advertiseMode: undefined | string;
    advertisedGroups: string[];
    advertisedIpRanges: {
        description: undefined | string;
        range: undefined | string;
    }[];
    asn: number;
} | undefined>;

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

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>;

property network

public network: 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 provider project is used.

property region

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

class RouterInterface

extends CustomResource

Manages a Cloud Router interface. For more information see the official documentation and API.

Example Usage

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

const foobar = new gcp.compute.RouterInterface("foobar", {
    ipRange: "169.254.1.1/30",
    region: "us-central1",
    router: "router-1",
    vpnTunnel: "tunnel-1",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_router_interface.html.markdown.

constructor

new RouterInterface(name: string, args: RouterInterfaceArgs, opts?: pulumi.CustomResourceOptions)

Create a RouterInterface 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?: RouterInterfaceState, opts?: pulumi.CustomResourceOptions): RouterInterface

Get an existing RouterInterface 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): boolean

Returns true if the given object is an instance of RouterInterface. 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 interconnectAttachment

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

The name or resource link to the VLAN interconnect for this interface. Changing this forces a new interface to be created. Only one of vpnTunnel and interconnectAttachment can be specified.

property ipRange

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

IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. Changing this forces a new interface to be created.

property name

public name: pulumi.Output<string>;

A unique name for the interface, required by GCE. Changing this forces a new interface to be created.

property project

public project: pulumi.Output<string>;

The ID of the project in which this interface’s router belongs. If it is not provided, the provider project is used. Changing this forces a new interface to be created.

property region

public region: pulumi.Output<string>;

The region this interface’s router sits in. If not specified, the project region will be used. Changing this forces a new interface to be created.

property router

public router: pulumi.Output<string>;

The name of the router this interface will be attached to. Changing this forces a new interface to be created.

property urn

urn: Output<URN>;

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

property vpnTunnel

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

The name or resource link to the VPN tunnel this interface will be linked to. Changing this forces a new interface to be created. Only one of vpnTunnel and interconnectAttachment can be specified.

class RouterNat

extends CustomResource

Manages a Cloud NAT. For more information see the official documentation and API.

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_router_nat.html.markdown.

constructor

new RouterNat(name: string, args: RouterNatArgs, opts?: pulumi.CustomResourceOptions)

Create a RouterNat 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?: RouterNatState, opts?: pulumi.CustomResourceOptions): RouterNat

Get an existing RouterNat 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): boolean

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

property icmpIdleTimeoutSec

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

Timeout (in seconds) for ICMP connections. Defaults to 30s if not set. Changing this forces a new NAT 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 logConfig

public logConfig: pulumi.Output<{
    enable: boolean;
    filter: string;
} | undefined>;

property minPortsPerVm

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

Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. Changing this forces a new NAT to be created.

property name

public name: pulumi.Output<string>;

A unique name for Cloud NAT, required by GCE. Changing this forces a new NAT to be created.

property natIpAllocateOption

public natIpAllocateOption: pulumi.Output<string>;

How external IPs should be allocated for this NAT. Valid values are AUTO_ONLY or MANUAL_ONLY. Changing this forces a new NAT to be created.

property natIps

public natIps: pulumi.Output<string[] | undefined>;

List of selfLinks of external IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY. Changing this forces a new NAT to be created.

property project

public project: pulumi.Output<string>;

The ID of the project in which this NAT’s router belongs. If it is not provided, the provider project is used. Changing this forces a new NAT to be created.

property region

public region: pulumi.Output<string>;

The region this NAT’s router sits in. If not specified, the project region will be used. Changing this forces a new NAT to be created.

property router

public router: pulumi.Output<string>;

The name of the router in which this NAT will be configured. Changing this forces a new NAT to be created.

property sourceSubnetworkIpRangesToNat

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

How NAT should be configured per Subnetwork. Valid values include: ALL_SUBNETWORKS_ALL_IP_RANGES, ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, LIST_OF_SUBNETWORKS. Changing this forces a new NAT to be created.

property subnetworks

public subnetworks: pulumi.Output<{
    name: string;
    secondaryIpRangeNames: string[];
    sourceIpRangesToNats: string[];
}[] | undefined>;

One or more subnetwork NAT configurations. Only used if sourceSubnetworkIpRangesToNat is set to LIST_OF_SUBNETWORKS. See the section below for details on configuration.

property tcpEstablishedIdleTimeoutSec

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

Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set. Changing this forces a new NAT to be created.

property tcpTransitoryIdleTimeoutSec

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

Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set. Changing this forces a new NAT to be created.

property udpIdleTimeoutSec

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

Timeout (in seconds) for UDP connections. Defaults to 30s if not set. Changing this forces a new NAT to be created.

property urn

urn: Output<URN>;

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

class RouterPeer

extends CustomResource

Manages a Cloud Router BGP peer. For more information see the official documentation and API.

Example Usage

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

const foobar = new gcp.compute.RouterPeer("foobar", {
    advertisedRoutePriority: 100,
    interface: "interface-1",
    peerAsn: 65513,
    peerIpAddress: "169.254.1.2",
    region: "us-central1",
    router: "router-1",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_router_peer.html.markdown.

constructor

new RouterPeer(name: string, args: RouterPeerArgs, opts?: pulumi.CustomResourceOptions)

Create a RouterPeer 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?: RouterPeerState, opts?: pulumi.CustomResourceOptions): RouterPeer

Get an existing RouterPeer 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): boolean

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

property advertisedRoutePriority

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

The priority of routes advertised to this BGP peer. Changing this forces a new peer 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 interface

public interface: pulumi.Output<string>;

The name of the interface the BGP peer is associated with. Changing this forces a new peer to be created.

property ipAddress

public ipAddress: pulumi.Output<string>;

IP address of the interface inside Google Cloud Platform.

property name

public name: pulumi.Output<string>;

A unique name for BGP peer, required by GCE. Changing this forces a new peer to be created.

property peerAsn

public peerAsn: pulumi.Output<number>;

Peer BGP Autonomous System Number (ASN). Changing this forces a new peer to be created.

property peerIpAddress

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

IP address of the BGP interface outside Google Cloud. Changing this forces a new peer to be created.

property project

public project: pulumi.Output<string>;

The ID of the project in which this peer’s router belongs. If it is not provided, the provider project is used. Changing this forces a new peer to be created.

property region

public region: pulumi.Output<string>;

The region this peer’s router sits in. If not specified, the project region will be used. Changing this forces a new peer to be created.

property router

public router: pulumi.Output<string>;

The name of the router in which this BGP peer will be configured. Changing this forces a new peer to be created.

property urn

urn: Output<URN>;

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

class SSLCertificate

extends CustomResource

An SslCertificate 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 SslCertificate, see:

Example Usage - Ssl Certificate Basic

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

const defaultSSLCertificate = new gcp.compute.SSLCertificate("default", {
    certificate: fs.readFileSync("path/to/certificate.crt", "utf-8"),
    description: "a description",
    namePrefix: "my-certificate-",
    privateKey: fs.readFileSync("path/to/private.key", "utf-8"),
});

Example Usage - Ssl Certificate Random Provider

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

const certificate = new random.RandomId("certificate", {
    byteLength: 4,
    // For security, do not expose raw certificate values in the output
    keepers: {
        certificate: (() => {
            throw "tf2pulumi error: NYI: call to base64sha256";
            return (() => { throw "NYI: call to base64sha256"; })();
        })(),
        private_key: (() => {
            throw "tf2pulumi error: NYI: call to base64sha256";
            return (() => { throw "NYI: call to base64sha256"; })();
        })(),
    },
    prefix: "my-certificate-",
});
// You may also want to control name generation explicitly:
const defaultSSLCertificate = new gcp.compute.SSLCertificate("default", {
    certificate: fs.readFileSync("path/to/certificate.crt", "utf-8"),
    privateKey: fs.readFileSync("path/to/private.key", "utf-8"),
});

Example Usage - Ssl Certificate Target Https Proxies

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

const defaultHttpHealthCheck = new gcp.compute.HttpHealthCheck("default", {
    checkIntervalSec: 1,
    requestPath: "/",
    timeoutSec: 1,
});
const defaultSSLCertificate = new gcp.compute.SSLCertificate("default", {
    certificate: fs.readFileSync("path/to/certificate.crt", "utf-8"),
    namePrefix: "my-certificate-",
    privateKey: fs.readFileSync("path/to/private.key", "utf-8"),
});
const defaultBackendService = new gcp.compute.BackendService("default", {
    healthChecks: defaultHttpHealthCheck.selfLink,
    portName: "http",
    protocol: "HTTP",
    timeoutSec: 10,
});
const defaultURLMap = new gcp.compute.URLMap("default", {
    defaultService: defaultBackendService.selfLink,
    description: "a description",
    hostRules: [{
        hosts: ["mysite.com"],
        pathMatcher: "allpaths",
    }],
    pathMatchers: [{
        defaultService: defaultBackendService.selfLink,
        name: "allpaths",
        pathRules: [{
            paths: ["/*"],
            service: defaultBackendService.selfLink,
        }],
    }],
});
const defaultTargetHttpsProxy = new gcp.compute.TargetHttpsProxy("default", {
    sslCertificates: [defaultSSLCertificate.selfLink],
    urlMap: defaultURLMap.selfLink,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_ssl_certificate.html.markdown.

constructor

new SSLCertificate(name: string, args: SSLCertificateArgs, opts?: pulumi.CustomResourceOptions)

Create a SSLCertificate 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?: SSLCertificateState, opts?: pulumi.CustomResourceOptions): SSLCertificate

Get an existing SSLCertificate 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): boolean

Returns true if the given object is an instance of SSLCertificate. 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>;

property certificateId

public certificateId: pulumi.Output<number>;

property creationTimestamp

public creationTimestamp: pulumi.Output<string>;

property description

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

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>;

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>;

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.

class SSLPolicy

extends CustomResource

Represents a SSL policy. SSL policies give you the ability to control the features of SSL that your SSL proxy or HTTPS load balancer negotiates.

To get more information about SslPolicy, see:

Example Usage - Ssl Policy Basic

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

const customSslPolicy = new gcp.compute.SSLPolicy("custom-ssl-policy", {
    customFeatures: [
        "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
        "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
    ],
    minTlsVersion: "TLS_1_2",
    profile: "CUSTOM",
});
const nonprodSslPolicy = new gcp.compute.SSLPolicy("nonprod-ssl-policy", {
    minTlsVersion: "TLS_1_2",
    profile: "MODERN",
});
const prodSslPolicy = new gcp.compute.SSLPolicy("prod-ssl-policy", {
    profile: "MODERN",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_ssl_policy.html.markdown.

constructor

new SSLPolicy(name: string, args?: SSLPolicyArgs, opts?: pulumi.CustomResourceOptions)

Create a SSLPolicy 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?: SSLPolicyState, opts?: pulumi.CustomResourceOptions): SSLPolicy

Get an existing SSLPolicy 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): boolean

Returns true if the given object is an instance of SSLPolicy. 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>;

property customFeatures

public customFeatures: pulumi.Output<string[] | undefined>;

property description

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

property enabledFeatures

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

property fingerprint

public fingerprint: 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 minTlsVersion

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

property name

public name: pulumi.Output<string>;

property profile

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

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.

class SecurityPolicy

extends CustomResource

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/compute_security_policy.html.markdown.

constructor

new SecurityPolicy(name: string, args?: SecurityPolicyArgs, opts?: pulumi.CustomResourceOptions)

Create a SecurityPolicy 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?: SecurityPolicyState, opts?: pulumi.CustomResourceOptions): SecurityPolicy

Get an existing SecurityPolicy 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): boolean

Returns true if the given object is an instance of SecurityPolicy. 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 security policy. Max size is 2048.

property fingerprint

public fingerprint: pulumi.Output<string>;

Fingerprint 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 name of the security policy.

property project

public project: pulumi.Output<string>;

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

property rules

public rules: pulumi.Output<{
    action: string;
    description: undefined | string;
    match: {
        config: {
            srcIpRanges: string[];
        };
        versionedExpr: string;
    };
    preview: undefined | false | true;
    priority: number;
}[]>;

The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match “*”). If no rules are provided when creating a security policy, a default rule with action “allow” will be added. Structure is documented below.

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.

class SecurityScanConfig

extends CustomResource

A ScanConfig resource contains the configurations to launch a scan.

To get more information about ScanConfig, see:

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/security_scanner_scan_config.html.markdown.

constructor

new SecurityScanConfig(name: string, args: SecurityScanConfigArgs, opts?: pulumi.CustomResourceOptions)

Create a SecurityScanConfig 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?: SecurityScanConfigState, opts?: pulumi.CustomResourceOptions): SecurityScanConfig

Get an existing SecurityScanConfig 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): boolean

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

property authentication

public authentication: pulumi.Output<{
    customAccount: undefined | {
        loginUrl: string;
        password: string;
        username: string;
    };
    googleAccount: undefined | {
        password: string;
        username: string;
    };
} | undefined>;

property blacklistPatterns

public blacklistPatterns: pulumi.Output<string[] | undefined>;

property displayName

public displayName: pulumi.Output<string>;

property exportToSecurityCommandCenter

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