ExtensionsInstance

class ExtensionsInstance : KotlinCustomResource

Example Usage

Firebase Extentions 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.2",
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,
},
systemParams: {
"firebaseextensions.v1beta.function/location": "",
"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//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.2",
"params": {
"delet_e__origina_l__file": "false",
"mak_e__public": "false",
"imag_e__type": "false",
"i_s__animated": "true",
"functio_n__memory": "1024",
"d_o__backfill": "false",
"im_g__sizes": "200x200",
"im_g__bucket": images.name,
},
"system_params": {
"firebaseextensions_v1beta_function_location": "",
"firebaseextensions_v1beta_function_max_instances": "3000",
"firebaseextensions_v1beta_function_min_instances": "0",
"firebaseextensions_v1beta_function_vpc_connector_egress_settings": "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED",
},
"allowed_event_types": ["firebase.extensions.storage-resize-images.v1.onCompletion"],
"eventarc_channel": "projects/my-project-name/locations//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.2",
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 },
},
SystemParams =
{
{ "firebaseextensions.v1beta.function/location", "" },
{ "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//channels/firebase",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firebase"
"github.com/pulumi/pulumi-gcp/sdk/v7/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.2"),
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,
},
SystemParams: pulumi.StringMap{
"firebaseextensions.v1beta.function/location": pulumi.String(""),
"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//channels/firebase"),
},
})
if err != nil {
return err
}
return nil
})
}
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.List;
import java.util.ArrayList;
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.2")
.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())
))
.systemParams(Map.ofEntries(
Map.entry("firebaseextensions.v1beta.function/location", ""),
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//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.2
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}
systemParams:
firebaseextensions.v1beta.function/location:
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//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}}

Properties

Link copied to clipboard

The current Config of the Extension Instance. Structure is documented below.

Link copied to clipboard
val createTime: Output<String>

The time at which the Extension Instance was created.

Link copied to clipboard

If this Instance has state: ERRORED, the error messages will be found here. Structure is documented below.

Link copied to clipboard
val 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.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instanceId: Output<String>

The ID to use for the Extension Instance, which will become the final component of the instance's name.

Link copied to clipboard

The name of the last operation that acted on this Extension Instance

Link copied to clipboard

The type of the last operation that acted on the Extension Instance.

Link copied to clipboard
val name: Output<String>

The fully-qualified resource name of the Extension Instance.

Link copied to clipboard
val project: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Data set by the extension instance at runtime. Structure is documented below.

Link copied to clipboard

The email of the service account to be used at runtime by compute resources created for the operation of the Extension instance.

Link copied to clipboard
val state: Output<String>

The processing state of the extension instance.

Link copied to clipboard
val updateTime: Output<String>

The time at which the Extension Instance was updated.

Link copied to clipboard
val urn: Output<String>