@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
171 lines (170 loc) • 6.33 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The Eventarc GoogleChannelConfig resource
*
* To get more information about GoogleChannelConfig, see:
*
* * [API documentation](https://cloud.google.com/eventarc/docs/reference/rest/v1/projects.locations)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/eventarc/docs/use-cmek#enable-cmek-google-channel)
*
* ## Example Usage
*
* ### Eventarc Google Channel Config With Cmek
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const testProject = gcp.organizations.getProject({
* projectId: "my-project-name",
* });
* const testKeyRing = gcp.kms.getKMSKeyRing({
* name: "keyring",
* location: "us-centra1",
* });
* const key = testKeyRing.then(testKeyRing => gcp.kms.getKMSCryptoKey({
* name: "key",
* keyRing: testKeyRing.id,
* }));
* const keyMember = new gcp.kms.CryptoKeyIAMMember("key_member", {
* cryptoKeyId: key.then(key => key.id),
* role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
* member: testProject.then(testProject => `serviceAccount:service-${testProject.number}@gcp-sa-eventarc.iam.gserviceaccount.com`),
* });
* const primary = new gcp.eventarc.GoogleChannelConfig("primary", {
* location: "us-central1",
* name: "googleChannelConfig",
* cryptoKeyName: key.then(key => key.id),
* }, {
* dependsOn: [keyMember],
* });
* ```
*
* ## Import
*
* GoogleChannelConfig can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/googleChannelConfig`
*
* * `{{project}}/{{location}}`
*
* * `{{location}}`
*
* When using the `pulumi import` command, GoogleChannelConfig can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:eventarc/googleChannelConfig:GoogleChannelConfig default projects/{{project}}/locations/{{location}}/googleChannelConfig
* ```
*
* ```sh
* $ pulumi import gcp:eventarc/googleChannelConfig:GoogleChannelConfig default {{project}}/{{location}}
* ```
*
* ```sh
* $ pulumi import gcp:eventarc/googleChannelConfig:GoogleChannelConfig default {{location}}
* ```
*/
export declare class GoogleChannelConfig extends pulumi.CustomResource {
/**
* Get an existing GoogleChannelConfig 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?: GoogleChannelConfigState, opts?: pulumi.CustomResourceOptions): GoogleChannelConfig;
/**
* Returns true if the given object is an instance of GoogleChannelConfig. 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 GoogleChannelConfig;
/**
* Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data. It must match the pattern `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
*/
readonly cryptoKeyName: pulumi.Output<string | undefined>;
/**
* The location for the resource
*
*
* - - -
*/
readonly location: pulumi.Output<string>;
/**
* Required. The resource name of the config. Must be in the format of, `projects/{project}/locations/{location}/googleChannelConfig`.
*/
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>;
/**
* Output only. The last-modified time.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a GoogleChannelConfig 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: GoogleChannelConfigArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering GoogleChannelConfig resources.
*/
export interface GoogleChannelConfigState {
/**
* Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data. It must match the pattern `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
*/
cryptoKeyName?: pulumi.Input<string>;
/**
* The location for the resource
*
*
* - - -
*/
location?: pulumi.Input<string>;
/**
* Required. The resource name of the config. Must be in the format of, `projects/{project}/locations/{location}/googleChannelConfig`.
*/
name?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* Output only. The last-modified time.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a GoogleChannelConfig resource.
*/
export interface GoogleChannelConfigArgs {
/**
* Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data. It must match the pattern `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
*/
cryptoKeyName?: pulumi.Input<string>;
/**
* The location for the resource
*
*
* - - -
*/
location: pulumi.Input<string>;
/**
* Required. The resource name of the config. Must be in the format of, `projects/{project}/locations/{location}/googleChannelConfig`.
*/
name?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
}