diff --git a/.changelog/7479.txt b/.changelog/7479.txt new file mode 100644 index 00000000000..8ec013c0699 --- /dev/null +++ b/.changelog/7479.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google/resource_eventarc_google_channel_config_test.go b/google/resource_eventarc_google_channel_config_test.go index 29494d9072c..acf2a88eb6e 100644 --- a/google/resource_eventarc_google_channel_config_test.go +++ b/google/resource_eventarc_google_channel_config_test.go @@ -75,6 +75,9 @@ func TestAccEventarcGoogleChannelConfig_cryptoKeyUpdate(t *testing.T) { ImportState: true, ImportStateVerify: true, }, + { + Config: testAccEventarcGoogleChannelConfig_deleteCryptoKey(context), + }, }, }) } @@ -152,6 +155,16 @@ resource "google_eventarc_google_channel_config" "primary" { `, context) } +func testAccEventarcGoogleChannelConfig_deleteCryptoKey(context map[string]interface{}) string { + return Nprintf(` +resource "google_eventarc_google_channel_config" "primary" { + location = "%{region}" + name = "projects/%{project_name}/locations/%{region}/googleChannelConfig" + crypto_key_name = "" +} + `, context) +} + func testAccCheckEventarcGoogleChannelConfigDestroyProducer(t *testing.T) func(s *terraform.State) error { return func(s *terraform.State) error { for name, rs := range s.RootModule().Resources {