ExtensionsInstance class

An Instance is an installation of an Extension into a user's project.

> Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.

To get more information about Instance, see:

Example Usage

Firebase Extensions Instance Resize Image

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

const images = new gcp.storage.Bucket("images", {
    project: "my-project-name",
    name: "bucket-id",
    location: "US",
    uniformBucketLevelAccess: true,
    forceDestroy: true,
});
const resizeImage = new gcp.firebase.ExtensionsInstance("resize_image", {
    project: "my-project-name",
    instanceId: "storage-resize-images",
    config: {
        extensionRef: "firebase/storage-resize-images",
        extensionVersion: "0.2.10",
        params: {
            DELETE_ORIGINAL_FILE: "false",
            MAKE_PUBLIC: "false",
            IMAGE_TYPE: "false",
            IS_ANIMATED: "true",
            FUNCTION_MEMORY: "1024",
            DO_BACKFILL: "false",
            IMG_SIZES: "200x200",
            IMG_BUCKET: images.name,
            BACKFILL_BATCH_SIZE: "3",
            CONTENT_FILTER_LEVEL: "OFF",
            REGENERATE_TOKEN: "true",
        },
        systemParams: {
            "firebaseextensions.v1beta.function/location": "us-central1",
            "firebaseextensions.v1beta.function/maxInstances": "3000",
            "firebaseextensions.v1beta.function/minInstances": "0",
            "firebaseextensions.v1beta.function/vpcConnectorEgressSettings": "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED",
        },
        allowedEventTypes: ["firebase.extensions.storage-resize-images.v1.onCompletion"],
        eventarcChannel: "projects/my-project-name/locations/us-central1/channels/firebase",
    },
});
import pulumi
import pulumi_gcp as gcp

images = gcp.storage.Bucket("images",
    project="my-project-name",
    name="bucket-id",
    location="US",
    uniform_bucket_level_access=True,
    force_destroy=True)
resize_image = gcp.firebase.ExtensionsInstance("resize_image",
    project="my-project-name",
    instance_id="storage-resize-images",
    config={
        "extension_ref": "firebase/storage-resize-images",
        "extension_version": "0.2.10",
        "params": {
            "DELETE_ORIGINAL_FILE": "false",
            "MAKE_PUBLIC": "false",
            "IMAGE_TYPE": "false",
            "IS_ANIMATED": "true",
            "FUNCTION_MEMORY": "1024",
            "DO_BACKFILL": "false",
            "IMG_SIZES": "200x200",
            "IMG_BUCKET": images.name,
            "BACKFILL_BATCH_SIZE": "3",
            "CONTENT_FILTER_LEVEL": "OFF",
            "REGENERATE_TOKEN": "true",
        },
        "system_params": {
            "firebaseextensions.v1beta.function/location": "us-central1",
            "firebaseextensions.v1beta.function/maxInstances": "3000",
            "firebaseextensions.v1beta.function/minInstances": "0",
            "firebaseextensions.v1beta.function/vpcConnectorEgressSettings": "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED",
        },
        "allowed_event_types": ["firebase.extensions.storage-resize-images.v1.onCompletion"],
        "eventarc_channel": "projects/my-project-name/locations/us-central1/channels/firebase",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var images = new Gcp.Storage.Bucket("images", new()
    {
        Project = "my-project-name",
        Name = "bucket-id",
        Location = "US",
        UniformBucketLevelAccess = true,
        ForceDestroy = true,
    });

    var resizeImage = new Gcp.Firebase.ExtensionsInstance("resize_image", new()
    {
        Project = "my-project-name",
        InstanceId = "storage-resize-images",
        Config = new Gcp.Firebase.Inputs.ExtensionsInstanceConfigArgs
        {
            ExtensionRef = "firebase/storage-resize-images",
            ExtensionVersion = "0.2.10",
            Params =
            {
                { "DELETE_ORIGINAL_FILE", "false" },
                { "MAKE_PUBLIC", "false" },
                { "IMAGE_TYPE", "false" },
                { "IS_ANIMATED", "true" },
                { "FUNCTION_MEMORY", "1024" },
                { "DO_BACKFILL", "false" },
                { "IMG_SIZES", "200x200" },
                { "IMG_BUCKET", images.Name },
                { "BACKFILL_BATCH_SIZE", "3" },
                { "CONTENT_FILTER_LEVEL", "OFF" },
                { "REGENERATE_TOKEN", "true" },
            },
            SystemParams =
            {
                { "firebaseextensions.v1beta.function/location", "us-central1" },
                { "firebaseextensions.v1beta.function/maxInstances", "3000" },
                { "firebaseextensions.v1beta.function/minInstances", "0" },
                { "firebaseextensions.v1beta.function/vpcConnectorEgressSettings", "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED" },
            },
            AllowedEventTypes = new[]
            {
                "firebase.extensions.storage-resize-images.v1.onCompletion",
            },
            EventarcChannel = "projects/my-project-name/locations/us-central1/channels/firebase",
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firebase"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		images, err := storage.NewBucket(ctx, "images", &storage.BucketArgs{
			Project:                  pulumi.String("my-project-name"),
			Name:                     pulumi.String("bucket-id"),
			Location:                 pulumi.String("US"),
			UniformBucketLevelAccess: pulumi.Bool(true),
			ForceDestroy:             pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = firebase.NewExtensionsInstance(ctx, "resize_image", &firebase.ExtensionsInstanceArgs{
			Project:    pulumi.String("my-project-name"),
			InstanceId: pulumi.String("storage-resize-images"),
			Config: &firebase.ExtensionsInstanceConfigArgs{
				ExtensionRef:     pulumi.String("firebase/storage-resize-images"),
				ExtensionVersion: pulumi.String("0.2.10"),
				Params: pulumi.StringMap{
					"DELETE_ORIGINAL_FILE": pulumi.String("false"),
					"MAKE_PUBLIC":          pulumi.String("false"),
					"IMAGE_TYPE":           pulumi.String("false"),
					"IS_ANIMATED":          pulumi.String("true"),
					"FUNCTION_MEMORY":      pulumi.String("1024"),
					"DO_BACKFILL":          pulumi.String("false"),
					"IMG_SIZES":            pulumi.String("200x200"),
					"IMG_BUCKET":           images.Name,
					"BACKFILL_BATCH_SIZE":  pulumi.String("3"),
					"CONTENT_FILTER_LEVEL": pulumi.String("OFF"),
					"REGENERATE_TOKEN":     pulumi.String("true"),
				},
				SystemParams: pulumi.StringMap{
					"firebaseextensions.v1beta.function/location":                   pulumi.String("us-central1"),
					"firebaseextensions.v1beta.function/maxInstances":               pulumi.String("3000"),
					"firebaseextensions.v1beta.function/minInstances":               pulumi.String("0"),
					"firebaseextensions.v1beta.function/vpcConnectorEgressSettings": pulumi.String("VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED"),
				},
				AllowedEventTypes: pulumi.StringArray{
					pulumi.String("firebase.extensions.storage-resize-images.v1.onCompletion"),
				},
				EventarcChannel: pulumi.String("projects/my-project-name/locations/us-central1/channels/firebase"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_storage_bucket" "images" {
  project                     = "my-project-name"
  name                        = "bucket-id"
  location                    = "US"
  uniform_bucket_level_access = true
  # Delete all objects when the bucket is deleted
  force_destroy = true
}
resource "gcp_firebase_extensionsinstance" "resize_image" {
  project     = "my-project-name"
  instance_id = "storage-resize-images"
  config = {
    extension_ref     = "firebase/storage-resize-images"
    extension_version = "0.2.10"
    params = {
      "DELETE_ORIGINAL_FILE" = false
      "MAKE_PUBLIC"          = false
      "IMAGE_TYPE"           = false
      "IS_ANIMATED"          = true
      "FUNCTION_MEMORY"      = 1024
      "DO_BACKFILL"          = false
      "IMG_SIZES"            = "200x200"
      "IMG_BUCKET"           = gcp_storage_bucket.images.name
      "BACKFILL_BATCH_SIZE"  = 3
      "CONTENT_FILTER_LEVEL" = "OFF"
      "REGENERATE_TOKEN"     = "true"
    }
    system_params = {
      "firebaseextensions.v1beta.function/location"                   = "us-central1"
      "firebaseextensions.v1beta.function/maxInstances"               = 3000
      "firebaseextensions.v1beta.function/minInstances"               = 0
      "firebaseextensions.v1beta.function/vpcConnectorEgressSettings" = "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED"
    }
    allowed_event_types = ["firebase.extensions.storage-resize-images.v1.onCompletion"]
    eventarc_channel    = "projects/my-project-name/locations/us-central1/channels/firebase"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.firebase.ExtensionsInstance;
import com.pulumi.gcp.firebase.ExtensionsInstanceArgs;
import com.pulumi.gcp.firebase.inputs.ExtensionsInstanceConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var images = new Bucket("images", BucketArgs.builder()
            .project("my-project-name")
            .name("bucket-id")
            .location("US")
            .uniformBucketLevelAccess(true)
            .forceDestroy(true)
            .build());

        var resizeImage = new ExtensionsInstance("resizeImage", ExtensionsInstanceArgs.builder()
            .project("my-project-name")
            .instanceId("storage-resize-images")
            .config(ExtensionsInstanceConfigArgs.builder()
                .extensionRef("firebase/storage-resize-images")
                .extensionVersion("0.2.10")
                .params(Map.ofEntries(
                    Map.entry("DELETE_ORIGINAL_FILE", "false"),
                    Map.entry("MAKE_PUBLIC", "false"),
                    Map.entry("IMAGE_TYPE", "false"),
                    Map.entry("IS_ANIMATED", "true"),
                    Map.entry("FUNCTION_MEMORY", "1024"),
                    Map.entry("DO_BACKFILL", "false"),
                    Map.entry("IMG_SIZES", "200x200"),
                    Map.entry("IMG_BUCKET", images.name()),
                    Map.entry("BACKFILL_BATCH_SIZE", "3"),
                    Map.entry("CONTENT_FILTER_LEVEL", "OFF"),
                    Map.entry("REGENERATE_TOKEN", "true")
                ))
                .systemParams(Map.ofEntries(
                    Map.entry("firebaseextensions.v1beta.function/location", "us-central1"),
                    Map.entry("firebaseextensions.v1beta.function/maxInstances", "3000"),
                    Map.entry("firebaseextensions.v1beta.function/minInstances", "0"),
                    Map.entry("firebaseextensions.v1beta.function/vpcConnectorEgressSettings", "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED")
                ))
                .allowedEventTypes("firebase.extensions.storage-resize-images.v1.onCompletion")
                .eventarcChannel("projects/my-project-name/locations/us-central1/channels/firebase")
                .build())
            .build());

    }
}
resources:
  images:
    type: gcp:storage:Bucket
    properties:
      project: my-project-name
      name: bucket-id
      location: US
      uniformBucketLevelAccess: true # Delete all objects when the bucket is deleted
      forceDestroy: true
  resizeImage:
    type: gcp:firebase:ExtensionsInstance
    name: resize_image
    properties:
      project: my-project-name
      instanceId: storage-resize-images
      config:
        extensionRef: firebase/storage-resize-images
        extensionVersion: 0.2.10
        params:
          DELETE_ORIGINAL_FILE: false
          MAKE_PUBLIC: false
          IMAGE_TYPE: false
          IS_ANIMATED: true
          FUNCTION_MEMORY: 1024
          DO_BACKFILL: false
          IMG_SIZES: 200x200
          IMG_BUCKET: ${images.name}
          BACKFILL_BATCH_SIZE: 3
          CONTENT_FILTER_LEVEL: OFF
          REGENERATE_TOKEN: 'true'
        systemParams:
          firebaseextensions.v1beta.function/location: us-central1
          firebaseextensions.v1beta.function/maxInstances: 3000
          firebaseextensions.v1beta.function/minInstances: 0
          firebaseextensions.v1beta.function/vpcConnectorEgressSettings: VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED
        allowedEventTypes:
          - firebase.extensions.storage-resize-images.v1.onCompletion
        eventarcChannel: projects/my-project-name/locations/us-central1/channels/firebase

Import

Instance can be imported using any of these accepted formats:

  • projects/{{project}}/instances/{{instance_id}}
  • {{project}}/{{instance_id}}
  • {{instance_id}}

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

$ pulumi import gcp:firebase/extensionsInstance:ExtensionsInstance default projects/{{project}}/instances/{{instance_id}}
$ pulumi import gcp:firebase/extensionsInstance:ExtensionsInstance default {{project}}/{{instance_id}}
$ pulumi import gcp:firebase/extensionsInstance:ExtensionsInstance default {{instance_id}}

Constructors

ExtensionsInstance(String name, {ExtensionsInstanceArgs? args, CustomResourceOptions? options})
Creates a new ExtensionsInstance. name The Pulumi resource name. args Arguments used to configure this ExtensionsInstance. The set of arguments for ExtensionsInstance. options Resource options controlling this resource's behavior.
ExtensionsInstance.reference(String urn)
Creates a typed reference to an existing ExtensionsInstance resource.

Properties

childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
config ↔ Output<ExtensionsInstanceConfig>
The current Config of the Extension Instance. Structure is documented below.
latefinal
createTime ↔ Output<String>
The time at which the Extension Instance was created.
latefinal
deletionPolicy ↔ Output<String>
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
latefinal
errorStatuses ↔ Output<List<ExtensionsInstanceErrorStatus>>
If this Instance has state: ERRORED, the error messages will be found here. Structure is documented below.
latefinal
etag ↔ Output<String>
A weak etag that is computed by the server based on other configuration values and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
instanceId ↔ Output<String>
The ID to use for the Extension Instance, which will become the final component of the instance's name.
latefinal
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
lastOperationName ↔ Output<String>
The name of the last operation that acted on this Extension Instance
latefinal
lastOperationType ↔ Output<String>
The type of the last operation that acted on the Extension Instance.
latefinal
name ↔ Output<String>
The fully-qualified resource name of the Extension Instance.
latefinal
project ↔ Output<String>
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeDatas ↔ Output<List<ExtensionsInstanceRuntimeData>>
Data set by the extension instance at runtime. Structure is documented below.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serviceAccountEmail ↔ Output<String>
The email of the service account to be used at runtime by compute resources created for the operation of the Extension instance.
latefinal
state ↔ Output<String>
The processing state of the extension instance.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
updateTime ↔ Output<String>
The time at which the Extension Instance was updated.
latefinal
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {ExtensionsInstanceState? state, CustomResourceOptions? options}) → ExtensionsInstance
Gets an existing ExtensionsInstance resource's state with the given name and id.