GoogleChannelConfigArgs

data class GoogleChannelConfigArgs(val cryptoKeyName: Output<String>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<GoogleChannelConfigArgs>

The Eventarc GoogleChannelConfig resource

Example Usage

Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.kms.KmsFunctions;
import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs;
import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyArgs;
import com.pulumi.gcp.kms.CryptoKeyIAMMember;
import com.pulumi.gcp.kms.CryptoKeyIAMMemberArgs;
import com.pulumi.gcp.eventarc.GoogleChannelConfig;
import com.pulumi.gcp.eventarc.GoogleChannelConfigArgs;
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) {
final var testProject = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.projectId("my-project-name")
.build());
final var testKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder()
.name("keyring")
.location("us-west1")
.build());
final var key = KmsFunctions.getKMSCryptoKey(GetKMSCryptoKeyArgs.builder()
.name("key")
.keyRing(testKeyRing.applyValue(getKMSKeyRingResult -> getKMSKeyRingResult.id()))
.build());
var key1Member = new CryptoKeyIAMMember("key1Member", CryptoKeyIAMMemberArgs.builder()
.cryptoKeyId(data.google_kms_crypto_key().key1().id())
.role("roles/cloudkms.cryptoKeyEncrypterDecrypter")
.member(String.format("serviceAccount:service-%s@gcp-sa-eventarc.iam.gserviceaccount.com", testProject.applyValue(getProjectResult -> getProjectResult.number())))
.build());
var primary = new GoogleChannelConfig("primary", GoogleChannelConfigArgs.builder()
.location("us-west1")
.project(testProject.applyValue(getProjectResult -> getProjectResult.projectId()))
.cryptoKeyName(data.google_kms_crypto_key().key1().id())
.build(), CustomResourceOptions.builder()
.dependsOn(key1Member)
.build());
}
}

Import

GoogleChannelConfig can be imported using any of these accepted formats

$ pulumi import gcp:eventarc/googleChannelConfig:GoogleChannelConfig default projects/{{project}}/locations/{{location}}/googleChannelConfig
$ pulumi import gcp:eventarc/googleChannelConfig:GoogleChannelConfig default {{project}}/{{location}}
$ pulumi import gcp:eventarc/googleChannelConfig:GoogleChannelConfig default {{location}}

Constructors

Link copied to clipboard
constructor(cryptoKeyName: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, project: Output<String>? = null)

Properties

Link copied to clipboard
val cryptoKeyName: Output<String>? = null

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/*.

Link copied to clipboard
val location: Output<String>? = null

The location for the resource

Link copied to clipboard
val name: Output<String>? = null

Required. The resource name of the config. Must be in the format of, projects/{project}/locations/{location}/googleChannelConfig.

Link copied to clipboard
val project: Output<String>? = null

The project for the resource ////

Functions

Link copied to clipboard
open override fun toJava(): GoogleChannelConfigArgs