-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Support key project resolution mode in autokey config #16067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Support key project resolution mode in autokey config #16067
Conversation
|
Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: For automatic test runs see go/terraform-auto-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. |
shuyama1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code generator was migrated from Ruby to Go.
Could you please update the code in this PR to align with the current Go-based implementation?
https://googlecloudplatform.github.io/magic-modules/reference/ruby-go-changes/
https://googlecloudplatform.github.io/magic-modules/develop/add-resource/
e3894b9 to
b37cd93
Compare
Have migrated to go @shuyama1 |
|
@shuyama1 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_kms_autokey_config" "primary" {
key_project_resolution_mode = # value needed
}
Resource: resource "google_kms_google_kms_autokey_config" "primary" {
folder = # value needed
}
|
Tests analyticsTotal tests: 50 Click here to see the affected service packages
Action takenFound 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
e8f3efd to
e769021
Compare
9bbb447 to
e517c6c
Compare
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_kms_autokey_config" "primary" {
key_project_resolution_mode = # value needed
}
|
Tests analyticsTotal tests: 50 Click here to see the affected service packages
Action takenFound 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
|
@GoogleCloudPlatform/terraform-team @shuyama1 This PR has been waiting for review for 1 week. Please take a look! Use the label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestAccDataSourceGoogleKmsAutokeyConfig_basic and TestAccKMSKeyHandle_kmsKeyHandleBasicExample seem to fail due to the change in this PR. Could you investigate the failures and get them fixed. The failures are not due to if the new feature is released and I think we can get them fixed now. Please let me know if you have any questions. Thanks!
mmv1/products/kms/AutokeyConfig.yaml
Outdated
| custom_code: | ||
| custom_import: templates/terraform/custom_import/kms_autokey_config.go.erb | ||
| encoder: templates/terraform/encoders/kms_autokey_config_update.go.erb | ||
| decoder: templates/terraform/decoders/kms_autokey_config.go.erb | ||
| custom_update: templates/terraform/custom_update/kms_autokey_config.go.erb | ||
| custom_create: templates/terraform/custom_create/kms_autokey_config.go.erb | ||
| pre_delete: templates/terraform/pre_delete/kms_autokey_config.go.erb | ||
| test_check_destroy: 'templates/terraform/custom_check_destroy/kms_autokey_config.go.tmpl' | ||
| constants: 'templates/terraform/constants/autokey_config_folder_diff.go.tmpl' | ||
|
|
||
| timeouts: | ||
| insert_minutes: 20 | ||
| update_minutes: 20 | ||
| delete_minutes: 20 | ||
|
|
||
| # Removed static create_url, update_url, delete_url, id_format, self_link from the top level | ||
| # These are now dynamic and handled by custom code. | ||
| exclude_sweeper: true | ||
| examples: | ||
| - name: 'kms_autokey_config_folder' # Example for folder | ||
| primary_resource_id: 'example-autokeyconfig-folder' | ||
| min_version: 'beta' | ||
| vars: | ||
| folder_name: 'my-folder' | ||
| key_project_name: 'key-proj' | ||
| org_id: 'ORG_ID' | ||
| billing_account: 'BILLING_ACCT' | ||
| - name: 'kms_autokey_config_project' # Example for project | ||
| primary_resource_id: 'example-autokeyconfig-project' | ||
| min_version: 'beta' | ||
| vars: | ||
| project_name: 'my-resource-proj' | ||
| org_id: 'ORG_ID' | ||
| billing_account: 'BILLING_ACCT' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move all these before the parameters section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made the change as per the comment.
| variable "org_id" { | ||
| type = string | ||
| } | ||
|
|
||
| variable "billing_account" { | ||
| type = string | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to pass billing account and org as test env vars. Please follow the existing example https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/templates/terraform/examples/kms_autokey_config_all.tf.tmpl
More details at https://googlecloudplatform.github.io/magic-modules/reference/resource/#examples
similar for the other example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed accordingly.
I saw this error in these failures: This is indeed due to code changes not deployed in production as keyProjectResolutionMode field is not visible. It'll be resolved once the code is deployed. |
5339af3 to
39f5e82
Compare
9c4e88f to
d681fc5
Compare
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 50 Click here to see the affected service packages
Action takenFound 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Uh oh!
There was an error while loading. Please reload this page.