Skip to content
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

Add resource EventThreatDetectionCustomModule #9509

Merged
merged 7 commits into from
Dec 1, 2023

Conversation

luobopi
Copy link
Contributor

@luobopi luobopi commented Nov 21, 2023

Related to b/306108528. Add support for https://cloud.google.com/security-command-center/docs/reference/rest/v1/organizations.eventThreatDetectionSettings.customModules.

Release Note Template for Downstream PRs (will be copied)

`google_scc_event_threat_detection_custom_module`

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will run automatically.

@roaks3, 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.

@modular-magician
Copy link
Collaborator

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.

Terraform GA: Diff ( 5 files changed, 889 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 889 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 108 insertions(+))

@modular-magician
Copy link
Collaborator

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.

Terraform GA: Diff ( 5 files changed, 889 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 889 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 108 insertions(+))

@luobopi luobopi marked this pull request as ready for review November 21, 2023 23:57
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3238
Passed tests 2907
Skipped tests: 330
Affected tests: 1

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
TestAccSecurityCenterEventThreatDetectionCustomModule

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccSecurityCenterEventThreatDetectionCustomModule[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

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.

Terraform GA: Diff ( 5 files changed, 889 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 889 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 108 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3238
Passed tests 2906
Skipped tests: 330
Affected tests: 2

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccDataSourceGoogleServiceAccountIdToken_impersonation|TestAccSecurityCenterEventThreatDetectionCustomModule

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDataSourceGoogleServiceAccountIdToken_impersonation[Debug log]
TestAccSecurityCenterEventThreatDetectionCustomModule[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a few preliminary comments, but I also have a meta-question regarding the tests: when this resource is created against our test organizations, will that change how the organization behaves? If so, we may want to use GetTestOrgTargetFromEnv instead, which can support behavior changes (since it doesn't actually hold all of the resources we use for tests), and also have the benefit of isolating by environment (because we have 3 of them, 1 dedicated to each env).

@modular-magician
Copy link
Collaborator

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.

Terraform GA: Diff ( 5 files changed, 889 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 889 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 108 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3242
Passed tests 2910
Skipped tests: 331
Affected tests: 1

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
TestAccSecurityCenterEventThreatDetectionCustomModule

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccSecurityCenterEventThreatDetectionCustomModule[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

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.

Terraform GA: Diff ( 5 files changed, 889 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 889 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 108 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3243
Passed tests 2910
Skipped tests: 331
Affected tests: 2

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccDataprocClusterIamPolicy|TestAccSecurityCenterEventThreatDetectionCustomModule

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDataprocClusterIamPolicy[Debug log]
TestAccSecurityCenterEventThreatDetectionCustomModule[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@roaks3 roaks3 self-requested a review November 30, 2023 18:11
Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a few more small changes, but for the most part things look good, and we should be able to merge after the remaining feedback is addressed.

@modular-magician
Copy link
Collaborator

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.

Terraform GA: Diff ( 5 files changed, 888 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 888 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 108 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3255
Passed tests 2922
Skipped tests: 331
Affected tests: 2

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEHub2Fleet_gkehubFleetBasicExample_update|TestAccSecurityCenterEventThreatDetectionCustomModule

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccGKEHub2Fleet_gkehubFleetBasicExample_update[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{red}{\textsf{Tests failed when rerunning REPLAYING mode:}}$
TestAccGKEHub2Fleet_gkehubFleetBasicExample_update[Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccSecurityCenterEventThreatDetectionCustomModule[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

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.

Terraform GA: Diff ( 5 files changed, 879 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 879 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 108 insertions(+))

Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, will just wait for test results to merge

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3255
Passed tests 2921
Skipped tests: 331
Affected tests: 3

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEHub2Fleet_gkehubFleetBasicExample_update|TestAccLoggingProjectSink_updatePreservesCustomWriter|TestAccSecurityCenterEventThreatDetectionCustomModule

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccGKEHub2Fleet_gkehubFleetBasicExample_update[Debug log]
TestAccSecurityCenterEventThreatDetectionCustomModule[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{red}{\textsf{Tests failed when rerunning REPLAYING mode:}}$
TestAccGKEHub2Fleet_gkehubFleetBasicExample_update[Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccLoggingProjectSink_updatePreservesCustomWriter[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@roaks3
Copy link
Contributor

roaks3 commented Dec 1, 2023

trodge pushed a commit to trodge/magic-modules that referenced this pull request Dec 8, 2023
* Add resource EventThreatDetectionCustomModule

* Fix yaml format issue

* Fix TestAccSecurityCenterEventThreatDetectionCustomModule test

* Address comments

* Change back to use GetTestOrgFromEnv in testing

* Improve test example

* Change parameter type to be immutable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants