import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * WasmPlugin is a resource representing a service executing a customer-provided Wasm module. * * To get more information about WasmPlugin, see: * * * [API documentation](https://cloud.google.com/service-extensions/docs/reference/rest/v1/projects.locations.wasmPlugins) * * How-to Guides * * [Configure a route extension](https://cloud.google.com/service-extensions/docs/create-plugin) * * ## Example Usage * * ### Wasm Plugin Basic Docker Repository * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const project = gcp.organizations.getProject({}); * const wasmPlugin = new gcp.networkservices.WasmPlugin("wasm_plugin", { * name: "my-wasm-plugin", * description: "my wasm plugin from a docker repository", * mainVersionId: "v1", * labels: { * test_label: "test_value", * }, * logConfig: { * enable: true, * sampleRate: 1, * minLogLevel: "WARN", * }, * versions: [{ * versionName: "v1", * description: "v1 version of my wasm plugin", * imageUri: project.then(project => `us-central1-docker.pkg.dev/${project.name}/my-artifact-registry-docker-repository/my-wasm-plugin-data:prod`), * labels: { * test_label: "test_value", * }, * }], * }); * ``` * ### Wasm Plugin Basic Generic Repository * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const project = gcp.organizations.getProject({}); * const wasmPlugin = new gcp.networkservices.WasmPlugin("wasm_plugin", { * name: "my-wasm-plugin", * description: "my wasm plugin from a generic repository", * mainVersionId: "v1", * labels: { * test_label: "test_value", * }, * logConfig: { * enable: true, * sampleRate: 1, * minLogLevel: "WARN", * }, * versions: [{ * versionName: "v1", * description: "v1 version of my wasm plugin", * imageUri: project.then(project => `projects/${project.name}/locations/us-central1/repositories/my-artifact-registry-generic-repository/genericArtifacts/my-wasm-plugin-data:v1`), * labels: { * test_label: "test_value", * }, * }], * }); * ``` * * ## Import * * WasmPlugin can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/wasmPlugins/{{name}}` * * `{{project}}/{{location}}/{{name}}` * * `{{location}}/{{name}}` * * When using the `pulumi import` command, WasmPlugin can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:networkservices/wasmPlugin:WasmPlugin default projects/{{project}}/locations/{{location}}/wasmPlugins/{{name}} * $ pulumi import gcp:networkservices/wasmPlugin:WasmPlugin default {{project}}/{{location}}/{{name}} * $ pulumi import gcp:networkservices/wasmPlugin:WasmPlugin default {{location}}/{{name}} * ``` */ export declare class WasmPlugin extends pulumi.CustomResource { /** * Get an existing WasmPlugin resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: WasmPluginState, opts?: pulumi.CustomResourceOptions): WasmPlugin; /** * Returns true if the given object is an instance of WasmPlugin. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is WasmPlugin; /** * Output only. The timestamp when the resource was created. */ readonly createTime: pulumi.Output; /** * Optional. A human-readable description of the resource. */ readonly description: pulumi.Output; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * Optional. Set of labels associated with the WasmPlugin resource. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The location of the traffic extension */ readonly location: pulumi.Output; /** * Optional. Specifies the logging options for the activity performed by this plugin. If logging is enabled, plugin logs are exported to Cloud Logging. * Note that the settings relate to the logs generated by using logging statements in your Wasm code. * Structure is documented below. */ readonly logConfig: pulumi.Output; /** * The ID of the WasmPluginVersion resource that is the currently serving one. The version referred to must be a child of this WasmPlugin resource and should be listed in the "versions" field. */ readonly mainVersionId: pulumi.Output; /** * Identifier. Name of the WasmPlugin resource. */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * Output only. The timestamp when the resource was updated. */ readonly updateTime: pulumi.Output; /** * Output only. List of all extensions that use this WasmPlugin resource. * Structure is documented below. */ readonly usedBies: pulumi.Output; /** * All versions of this WasmPlugin resource in the key-value format. The key is the resource ID, and the value is the VersionDetails object. * Structure is documented below. */ readonly versions: pulumi.Output; /** * Create a WasmPlugin resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: WasmPluginArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering WasmPlugin resources. */ export interface WasmPluginState { /** * Output only. The timestamp when the resource was created. */ createTime?: pulumi.Input; /** * Optional. A human-readable description of the resource. */ description?: pulumi.Input; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Optional. Set of labels associated with the WasmPlugin resource. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The location of the traffic extension */ location?: pulumi.Input; /** * Optional. Specifies the logging options for the activity performed by this plugin. If logging is enabled, plugin logs are exported to Cloud Logging. * Note that the settings relate to the logs generated by using logging statements in your Wasm code. * Structure is documented below. */ logConfig?: pulumi.Input; /** * The ID of the WasmPluginVersion resource that is the currently serving one. The version referred to must be a child of this WasmPlugin resource and should be listed in the "versions" field. */ mainVersionId?: pulumi.Input; /** * Identifier. Name of the WasmPlugin resource. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Output only. The timestamp when the resource was updated. */ updateTime?: pulumi.Input; /** * Output only. List of all extensions that use this WasmPlugin resource. * Structure is documented below. */ usedBies?: pulumi.Input[]>; /** * All versions of this WasmPlugin resource in the key-value format. The key is the resource ID, and the value is the VersionDetails object. * Structure is documented below. */ versions?: pulumi.Input[]>; } /** * The set of arguments for constructing a WasmPlugin resource. */ export interface WasmPluginArgs { /** * Optional. A human-readable description of the resource. */ description?: pulumi.Input; /** * Optional. Set of labels associated with the WasmPlugin resource. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The location of the traffic extension */ location?: pulumi.Input; /** * Optional. Specifies the logging options for the activity performed by this plugin. If logging is enabled, plugin logs are exported to Cloud Logging. * Note that the settings relate to the logs generated by using logging statements in your Wasm code. * Structure is documented below. */ logConfig?: pulumi.Input; /** * The ID of the WasmPluginVersion resource that is the currently serving one. The version referred to must be a child of this WasmPlugin resource and should be listed in the "versions" field. */ mainVersionId: pulumi.Input; /** * Identifier. Name of the WasmPlugin resource. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * All versions of this WasmPlugin resource in the key-value format. The key is the resource ID, and the value is the VersionDetails object. * Structure is documented below. */ versions: pulumi.Input[]>; }