Extensions Instance
Example Usage
Firebase Extentions Instance Resize Image
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 com.pulumi.resources.CustomResourceOptions;
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")
.location("US")
.uniformBucketLevelAccess(true)
.forceDestroy(true)
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.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.1.37")
.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("LOCATION", "")
))
.systemParams(Map.ofEntries(
Map.entry("firebaseextensions.v1beta.function/maxInstances", 3000),
Map.entry("firebaseextensions.v1beta.function/memory", 256),
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.complete")
.eventarcChannel("projects/my-project-name/locations//channels/firebase")
.build())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
}
}
Import
Instance can be imported using any of these accepted formats
$ 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
The current Config of the Extension Instance. Structure is documented below.
(Output) The time at which the Extension Instance Config was created.
If this Instance has state: ERRORED
, the error messages will be found here. Structure is documented below.
The ID to use for the Extension Instance, which will become the final component of the instance's name.
The name of the last operation that acted on this Extension Instance
The type of the last operation that acted on the Extension Instance.
Data set by the extension instance at runtime. Structure is documented below.
The email of the service account to be used at runtime by compute resources created for the operation of the Extension instance.
The time at which the Extension Instance was updated.