magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

Add a new resource CmekConfig.

Open jialei-chen opened this issue 9 months ago • 58 comments

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

`google_discovery_engine_cmek_config`

jialei-chen avatar Mar 20 '25 21:03 jialei-chen

Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: see go/terraform-auto-test-runs to set up automatic test runs.

@shuyama1, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

github-actions[bot] avatar Mar 20 '25 21:03 github-actions[bot]

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 5 files changed, 865 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 5 files changed, 865 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 113 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_discovery_engine_cmek_config (0 total tests) Please add an acceptance test which includes these fields. The test should include the following:

resource "google_discovery_engine_cmek_config" "primary" {
  kms_key         = # value needed
  kms_key_version = # value needed
  location        = # value needed
  single_region_keys {
    kms_key = # value needed
  }
}


modular-magician avatar Mar 20 '25 22:03 modular-magician

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 5 files changed, 865 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 5 files changed, 865 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 113 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_discovery_engine_cmek_config (0 total tests) Please add an acceptance test which includes these fields. The test should include the following:

resource "google_discovery_engine_cmek_config" "primary" {
  kms_key         = # value needed
  kms_key_version = # value needed
  location        = # value needed
  single_region_keys {
    kms_key = # value needed
  }
}


modular-magician avatar Mar 20 '25 22:03 modular-magician

Tests analytics

Total tests: 14 Passed tests: 0 Skipped tests: 0 Affected tests: 14

Click here to see the affected service packages
  • discoveryengine

Action taken

Found 14 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccDiscoveryEngineChatEngine_discoveryengineChatEngineBasicExample
  • TestAccDiscoveryEngineChatEngine_discoveryengineChatEngineExistingDialogflowAgentExample
  • TestAccDiscoveryEngineChatEngine_discoveryengineChatengine_update
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreAdvancedSiteSearchConfigExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreBasicExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreBasicExample_update
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreDocumentProcessingConfigExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreDocumentProcessingConfigLayoutExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreDocumentProcessingConfigOcrExample
  • TestAccDiscoveryEngineSchema_discoveryengineSchemaBasicExample
  • TestAccDiscoveryEngineSearchEngine_discoveryengineSearchengineBasicExample
  • TestAccDiscoveryEngineSearchEngine_discoveryengineSearchengineBasicExample_update
  • TestAccDiscoveryEngineTargetSite_discoveryengineTargetsiteAdvancedExample
  • TestAccDiscoveryEngineTargetSite_discoveryengineTargetsiteBasicExample

Get to know how VCR tests work

modular-magician avatar Mar 20 '25 22:03 modular-magician

🔴 Tests failed during RECORDING mode: TestAccDiscoveryEngineChatEngine_discoveryengineChatEngineBasicExample [Error message] [Debug log] TestAccDiscoveryEngineChatEngine_discoveryengineChatEngineExistingDialogflowAgentExample [Error message] [Debug log] TestAccDiscoveryEngineChatEngine_discoveryengineChatengine_update [Error message] [Debug log] TestAccDiscoveryEngineDataStore_discoveryengineDatastoreAdvancedSiteSearchConfigExample [Error message] [Debug log] TestAccDiscoveryEngineDataStore_discoveryengineDatastoreBasicExample [Error message] [Debug log] TestAccDiscoveryEngineDataStore_discoveryengineDatastoreBasicExample_update [Error message] [Debug log] TestAccDiscoveryEngineDataStore_discoveryengineDatastoreDocumentProcessingConfigExample [Error message] [Debug log] TestAccDiscoveryEngineDataStore_discoveryengineDatastoreDocumentProcessingConfigLayoutExample [Error message] [Debug log] TestAccDiscoveryEngineDataStore_discoveryengineDatastoreDocumentProcessingConfigOcrExample [Error message] [Debug log] TestAccDiscoveryEngineSchema_discoveryengineSchemaBasicExample [Error message] [Debug log] TestAccDiscoveryEngineSearchEngine_discoveryengineSearchengineBasicExample [Error message] [Debug log] TestAccDiscoveryEngineSearchEngine_discoveryengineSearchengineBasicExample_update [Error message] [Debug log] TestAccDiscoveryEngineTargetSite_discoveryengineTargetsiteAdvancedExample [Error message] [Debug log] TestAccDiscoveryEngineTargetSite_discoveryengineTargetsiteBasicExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

modular-magician avatar Mar 20 '25 22:03 modular-magician

Tests analytics

Total tests: 14 Passed tests: 0 Skipped tests: 0 Affected tests: 14

Click here to see the affected service packages
  • discoveryengine

Action taken

Found 14 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccDiscoveryEngineChatEngine_discoveryengineChatEngineBasicExample
  • TestAccDiscoveryEngineChatEngine_discoveryengineChatEngineExistingDialogflowAgentExample
  • TestAccDiscoveryEngineChatEngine_discoveryengineChatengine_update
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreAdvancedSiteSearchConfigExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreBasicExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreBasicExample_update
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreDocumentProcessingConfigExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreDocumentProcessingConfigLayoutExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreDocumentProcessingConfigOcrExample
  • TestAccDiscoveryEngineSchema_discoveryengineSchemaBasicExample
  • TestAccDiscoveryEngineSearchEngine_discoveryengineSearchengineBasicExample
  • TestAccDiscoveryEngineSearchEngine_discoveryengineSearchengineBasicExample_update
  • TestAccDiscoveryEngineTargetSite_discoveryengineTargetsiteAdvancedExample
  • TestAccDiscoveryEngineTargetSite_discoveryengineTargetsiteBasicExample

Get to know how VCR tests work

modular-magician avatar Mar 20 '25 22:03 modular-magician

🔴 Tests failed during RECORDING mode: TestAccDiscoveryEngineChatEngine_discoveryengineChatEngineBasicExample [Error message] [Debug log] TestAccDiscoveryEngineChatEngine_discoveryengineChatEngineExistingDialogflowAgentExample [Error message] [Debug log] TestAccDiscoveryEngineChatEngine_discoveryengineChatengine_update [Error message] [Debug log] TestAccDiscoveryEngineDataStore_discoveryengineDatastoreAdvancedSiteSearchConfigExample [Error message] [Debug log] TestAccDiscoveryEngineDataStore_discoveryengineDatastoreBasicExample [Error message] [Debug log] TestAccDiscoveryEngineDataStore_discoveryengineDatastoreBasicExample_update [Error message] [Debug log] TestAccDiscoveryEngineDataStore_discoveryengineDatastoreDocumentProcessingConfigExample [Error message] [Debug log] TestAccDiscoveryEngineDataStore_discoveryengineDatastoreDocumentProcessingConfigLayoutExample [Error message] [Debug log] TestAccDiscoveryEngineDataStore_discoveryengineDatastoreDocumentProcessingConfigOcrExample [Error message] [Debug log] TestAccDiscoveryEngineSchema_discoveryengineSchemaBasicExample [Error message] [Debug log] TestAccDiscoveryEngineSearchEngine_discoveryengineSearchengineBasicExample [Error message] [Debug log] TestAccDiscoveryEngineSearchEngine_discoveryengineSearchengineBasicExample_update [Error message] [Debug log] TestAccDiscoveryEngineTargetSite_discoveryengineTargetsiteAdvancedExample [Error message] [Debug log] TestAccDiscoveryEngineTargetSite_discoveryengineTargetsiteBasicExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

modular-magician avatar Mar 20 '25 22:03 modular-magician

Hi reviewer, our resource CmekConfig only has Update/Get/List/Delete methods but doesn't have a Create method. I have 2 questions about the implementation. Could you help take a look? Thanks!

  1. Per https://googlecloudplatform.github.io/magic-modules/develop/add-resource/#add-a-resource-1, can we add a new resource leaving field create_url unset and only support update/get/list/delete operations?
  2. Per https://googlecloudplatform.github.io/magic-modules/test/test/#add-an-update-test, I tried to add an update test, but an update test is create-then-update. How to add an update test without create operation?

jialei-chen avatar Mar 20 '25 22:03 jialei-chen

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 5 files changed, 864 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 5 files changed, 864 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 113 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_discovery_engine_cmek_config (0 total tests) Please add an acceptance test which includes these fields. The test should include the following:

resource "google_discovery_engine_cmek_config" "primary" {
  kms_key         = # value needed
  kms_key_version = # value needed
  location        = # value needed
  single_region_keys {
    kms_key = # value needed
  }
}


modular-magician avatar Mar 20 '25 22:03 modular-magician

Tests analytics

Total tests: 14 Passed tests: 14 Skipped tests: 0 Affected tests: 0

Click here to see the affected service packages
  • discoveryengine

🟢 All tests passed!

View the build log

modular-magician avatar Mar 20 '25 22:03 modular-magician

@shuyama1 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

github-actions[bot] avatar Mar 25 '25 09:03 github-actions[bot]

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 5 files changed, 915 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 5 files changed, 915 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 113 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_discovery_engine_cmek_config (0 total tests) Please add an acceptance test which includes these fields. The test should include the following:

resource "google_discovery_engine_cmek_config" "primary" {
  kms_key         = # value needed
  kms_key_version = # value needed
  location        = # value needed
  single_region_keys {
    kms_key = # value needed
  }
}


modular-magician avatar Apr 01 '25 01:04 modular-magician

Hi reviewer, our resource CmekConfig only has Update/Get/List/Delete methods but doesn't have a Create method. I have 2 questions about the implementation. Could you help take a look? Thanks!

  1. Per googlecloudplatform.github.io/magic-modules/develop/add-resource#add-a-resource-1, can we add a new resource leaving field create_url unset and only support update/get/list/delete operations?

Is this a pre-created resource that only allows update. I think you can set the create_url and create_verb to be the one used to update this resource. So basically creating the resource in Terraform is actually updating the resource. Here's an example: https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/products/kms/AutokeyConfig.yaml

  1. Per googlecloudplatform.github.io/magic-modules/test/test#add-an-update-test, I tried to add an update test, but an update test is create-then-update. How to add an update test without create operation?

I believe after you've done question 1, this should be working fine.

I hope these answer your questions.

Thanks for your answers! Confirmed with resource owner, the update API is also used for create operation. Will set the create_url and create_verb following the given example and add test cases correspondingly.

I'm adding the create test now, but getting blocked by an ESF routing issue b/359238429#comment15. Temporarily waiting until the issue is fixed.

jialei-chen avatar Apr 01 '25 01:04 jialei-chen

Tests analytics

Total tests: 15 Passed tests: 15 Skipped tests: 0 Affected tests: 0

Click here to see the affected service packages
  • discoveryengine

🟢 All tests passed!

View the build log

modular-magician avatar Apr 01 '25 01:04 modular-magician

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 5 files changed, 915 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 5 files changed, 915 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 113 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_discovery_engine_cmek_config (0 total tests) Please add an acceptance test which includes these fields. The test should include the following:

resource "google_discovery_engine_cmek_config" "primary" {
  kms_key         = # value needed
  kms_key_version = # value needed
  location        = # value needed
  single_region_keys {
    kms_key = # value needed
  }
}


modular-magician avatar Apr 04 '25 21:04 modular-magician

Tests analytics

Total tests: 15 Passed tests: 15 Skipped tests: 0 Affected tests: 0

Click here to see the affected service packages
  • discoveryengine

🟢 All tests passed!

View the build log

modular-magician avatar Apr 04 '25 21:04 modular-magician

@jialei-chen I'm moving this PR to draft as it's awaiting test coverage (assuming currently blocked by some internal issues). Setting it to draft disables the review-reminder for now to avoid noise. Please add the tests once unblocked and mark this PR as Ready for Review. I'll start the review then. Thank you!

shuyama1 avatar Apr 07 '25 18:04 shuyama1

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 5 files changed, 915 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 5 files changed, 915 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 113 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_discovery_engine_cmek_config (0 total tests) Please add an acceptance test which includes these fields. The test should include the following:

resource "google_discovery_engine_cmek_config" "primary" {
  kms_key         = # value needed
  kms_key_version = # value needed
  location        = # value needed
  single_region_keys {
    kms_key = # value needed
  }
}


modular-magician avatar Apr 08 '25 00:04 modular-magician

Tests analytics

Total tests: 15 Passed tests: 15 Skipped tests: 0 Affected tests: 0

Click here to see the affected service packages
  • discoveryengine

🟢 All tests passed!

View the build log

modular-magician avatar Apr 08 '25 00:04 modular-magician

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 6 files changed, 1079 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 6 files changed, 1079 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 113 insertions(+)) Open in Cloud Shell: Diff ( 4 files changed, 108 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_discovery_engine_cmek_config (1 total tests) Please add an acceptance test which includes these fields. The test should include the following:

resource "google_discovery_engine_cmek_config" "primary" {
  single_region_keys {
    kms_key = # value needed
  }
}


modular-magician avatar Apr 17 '25 18:04 modular-magician

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 6 files changed, 1079 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 6 files changed, 1079 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 113 insertions(+)) Open in Cloud Shell: Diff ( 4 files changed, 108 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_discovery_engine_cmek_config (1 total tests) Please add an acceptance test which includes these fields. The test should include the following:

resource "google_discovery_engine_cmek_config" "primary" {
  single_region_keys {
    kms_key = # value needed
  }
}


modular-magician avatar Apr 17 '25 18:04 modular-magician

Tests analytics

Total tests: 16 Passed tests: 15 Skipped tests: 0 Affected tests: 1

Click here to see the affected service packages
  • discoveryengine

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigBasicExample

Get to know how VCR tests work

modular-magician avatar Apr 17 '25 18:04 modular-magician

🔴 Tests failed during RECORDING mode: TestAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigBasicExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

modular-magician avatar Apr 17 '25 18:04 modular-magician

Tests analytics

Total tests: 16 Passed tests: 15 Skipped tests: 0 Affected tests: 1

Click here to see the affected service packages
  • discoveryengine

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigBasicExample

Get to know how VCR tests work

modular-magician avatar Apr 17 '25 18:04 modular-magician

🔴 Tests failed during RECORDING mode: TestAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigBasicExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

modular-magician avatar Apr 17 '25 18:04 modular-magician

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 6 files changed, 1079 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 6 files changed, 1079 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 113 insertions(+)) Open in Cloud Shell: Diff ( 4 files changed, 108 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_discovery_engine_cmek_config (1 total tests) Please add an acceptance test which includes these fields. The test should include the following:

resource "google_discovery_engine_cmek_config" "primary" {
  single_region_keys {
    kms_key = # value needed
  }
}


modular-magician avatar Apr 17 '25 18:04 modular-magician

Tests analytics

Total tests: 16 Passed tests: 15 Skipped tests: 0 Affected tests: 1

Click here to see the affected service packages
  • discoveryengine

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigBasicExample

Get to know how VCR tests work

modular-magician avatar Apr 17 '25 18:04 modular-magician

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 6 files changed, 1079 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 6 files changed, 1079 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 113 insertions(+)) Open in Cloud Shell: Diff ( 4 files changed, 108 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_discovery_engine_cmek_config (1 total tests) Please add an acceptance test which includes these fields. The test should include the following:

resource "google_discovery_engine_cmek_config" "primary" {
  single_region_keys {
    kms_key = # value needed
  }
}


modular-magician avatar Apr 17 '25 18:04 modular-magician

🔴 Tests failed during RECORDING mode: TestAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigBasicExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

modular-magician avatar Apr 17 '25 18:04 modular-magician

Tests analytics

Total tests: 16 Passed tests: 15 Skipped tests: 0 Affected tests: 1

Click here to see the affected service packages
  • discoveryengine

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigBasicExample

Get to know how VCR tests work

modular-magician avatar Apr 17 '25 18:04 modular-magician