@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
324 lines • 14 kB
TypeScript
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<pulumi.ID>, 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<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.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* Optional. A human-readable description of the resource.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* 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<string | undefined>;
/**
* 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<outputs.networkservices.WasmPluginLogConfig | undefined>;
/**
* 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<string>;
/**
* Identifier. Name of the WasmPlugin resource.
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* 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<string>;
/**
* Output only. List of all extensions that use this WasmPlugin resource.
* Structure is documented below.
*/
readonly usedBies: pulumi.Output<outputs.networkservices.WasmPluginUsedBy[]>;
/**
* 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<outputs.networkservices.WasmPluginVersion[]>;
/**
* 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<string | undefined>;
/**
* 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.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* Optional. A human-readable description of the resource.
*/
description?: pulumi.Input<string | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* The location of the traffic extension
*/
location?: pulumi.Input<string | undefined>;
/**
* 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<inputs.networkservices.WasmPluginLogConfig | undefined>;
/**
* 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<string | undefined>;
/**
* Identifier. Name of the WasmPlugin resource.
*/
name?: pulumi.Input<string | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Output only. The timestamp when the resource was updated.
*/
updateTime?: pulumi.Input<string | undefined>;
/**
* Output only. List of all extensions that use this WasmPlugin resource.
* Structure is documented below.
*/
usedBies?: pulumi.Input<pulumi.Input<inputs.networkservices.WasmPluginUsedBy>[] | undefined>;
/**
* 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<pulumi.Input<inputs.networkservices.WasmPluginVersion>[] | undefined>;
}
/**
* The set of arguments for constructing a WasmPlugin resource.
*/
export interface WasmPluginArgs {
/**
* 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.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* Optional. A human-readable description of the resource.
*/
description?: pulumi.Input<string | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* The location of the traffic extension
*/
location?: pulumi.Input<string | undefined>;
/**
* 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<inputs.networkservices.WasmPluginLogConfig | undefined>;
/**
* 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<string>;
/**
* Identifier. Name of the WasmPlugin resource.
*/
name?: pulumi.Input<string | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* 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<pulumi.Input<inputs.networkservices.WasmPluginVersion>[]>;
}
//# sourceMappingURL=wasmPlugin.d.ts.map