google_eventarc_google_channel_config

The Eventarc GoogleChannelConfig resource

Example Usage - basic

data "google_project" "test_project" {
    project_id  = "my-project-name"
}

data "google_kms_key_ring" "test_key_ring" {
    name     = "keyring"
    location = "us-west1"
}

data "google_kms_crypto_key" "key" {
    name     = "key"
    key_ring = data.google_kms_key_ring.test_key_ring.id
}

resource "google_kms_crypto_key_iam_member" "key1_member" {
    crypto_key_id = data.google_kms_crypto_key.key1.id
    role      = "roles/cloudkms.cryptoKeyEncrypterDecrypter"

    member = "serviceAccount:service-${data.google_project.test_project.number}@gcp-sa-eventarc.iam.gserviceaccount.com"
}

resource "google_eventarc_google_channel_config" "primary" {
  location = "us-west1"
  name     = "channel"
  project  = "${data.google_project.test_project.project_id}"
  crypto_key_name =  "${data.google_kms_crypto_key.key1.id}"
  depends_on = [google_kms_crypto_key_iam_member.key1_member]
}

Argument Reference

The following arguments are supported:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

GoogleChannelConfig can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import GoogleChannelConfig using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/{{location}}/googleChannelConfig"
  to = google_eventarc_google_channel_config.default
}

When using the terraform import command, GoogleChannelConfig can be imported using one of the formats above. For example:

$ terraform import google_eventarc_google_channel_config.default projects/{{project}}/locations/{{location}}/googleChannelConfig
$ terraform import google_eventarc_google_channel_config.default {{project}}/{{location}}
$ terraform import google_eventarc_google_channel_config.default {{location}}