Skip to content

Add Terraform support for antivirus threat override #13444

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

Merged

Conversation

maxi-cit
Copy link
Contributor

@maxi-cit maxi-cit commented Mar 24, 2025

Release Note Template for Downstream PRs (will be copied)

networksecurity: added `antivirus_overrides` field to `google_network_security_security_profile.threat_prevention_profile` resource

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Mar 24, 2025
@maxi-cit maxi-cit marked this pull request as ready for review March 24, 2025 16:36
@github-actions github-actions bot requested a review from melinath March 24, 2025 16:37
Copy link

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.

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

@maxi-cit
Copy link
Contributor Author

Hello @melinath could you run tests and check if everything is ok with the PR, please?

@modular-magician modular-magician added service/network-security-distributed-firewall and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Mar 24, 2025
@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.

google provider: Diff ( 5 files changed, 195 insertions(+))
google-beta provider: Diff ( 5 files changed, 195 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 45 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 62
Passed tests: 56
Skipped tests: 4
Affected tests: 2

Click here to see the affected service packages
  • networksecurity

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
  • TestAccNetworkSecuritySecurityProfile_networkSecuritySecurityProfileOverridesExample
  • TestAccNetworkSecuritySecurityProfiles_antivirusOverrides

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccNetworkSecuritySecurityProfile_networkSecuritySecurityProfileOverridesExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccNetworkSecuritySecurityProfiles_antivirusOverrides [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

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

Error:

    resource_network_security_security_profile_test.go:53: Step 3/4 error: Error running pre-apply refresh: exit status 1
        
        Error: Missing required argument
        
          on terraform_plugin_test.tf line 14, in resource "google_network_security_security_profile" "foobar":
          14:         antivirus_overrides {
        
        The argument "protocol" is required, but no definition was found.
        
        Error: Unsupported argument
        
          on terraform_plugin_test.tf line 16, in resource "google_network_security_security_profile" "foobar":
          16:             severity = "FTP"
        
        An argument named "severity" is not expected here.
        
        Error: Missing required argument
        
          on terraform_plugin_test.tf line 19, in resource "google_network_security_security_profile" "foobar":
          19:         antivirus_overrides {
        
        The argument "protocol" is required, but no definition was found.
        
        Error: Unsupported argument
        
          on terraform_plugin_test.tf line 21, in resource "google_network_security_security_profile" "foobar":
          21:             severity = "HTTP"
        
        An argument named "severity" is not expected here.
        
        Error: Missing required argument
        
          on terraform_plugin_test.tf line 24, in resource "google_network_security_security_profile" "foobar":
          24: 		antivirus_overrides {
        
        The argument "protocol" is required, but no definition was found.
        
        Error: Unsupported argument
        
          on terraform_plugin_test.tf line 26, in resource "google_network_security_security_profile" "foobar":
          26:             severity = "HTTP2"
        
        An argument named "severity" is not expected here.

@github-actions github-actions bot requested a review from melinath March 25, 2025 05:35
@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Mar 25, 2025
@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.

google provider: Diff ( 5 files changed, 195 insertions(+))
google-beta provider: Diff ( 5 files changed, 195 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 45 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 62
Passed tests: 57
Skipped tests: 4
Affected tests: 1

Click here to see the affected service packages
  • networksecurity

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
  • TestAccNetworkSecuritySecurityProfiles_antivirusOverrides

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccNetworkSecuritySecurityProfiles_antivirusOverrides [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@maxi-cit
Copy link
Contributor Author

Hello @melinath checks seem to be ok, do you think this is ready to merge?

@github-actions github-actions bot requested a review from melinath March 25, 2025 18:12
@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Mar 25, 2025
@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.

google provider: Diff ( 5 files changed, 214 insertions(+))
google-beta provider: Diff ( 5 files changed, 214 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 45 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • networksecurity
#### Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccNetworkSecuritySecurityProfiles_antivirusOverrides
    🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.

View the build log

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Mar 25, 2025
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Mar 25, 2025
@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.

google provider: Diff ( 5 files changed, 215 insertions(+))
google-beta provider: Diff ( 5 files changed, 215 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 45 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 62
Passed tests: 57
Skipped tests: 4
Affected tests: 1

Click here to see the affected service packages
  • networksecurity

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
  • TestAccNetworkSecuritySecurityProfiles_antivirusOverrides

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccNetworkSecuritySecurityProfiles_antivirusOverrides [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@maxi-cit
Copy link
Contributor Author

Hello @melinath, I just saw your suggestions. Thanks for the feedback and commit. I will take them into account for next PRs.

JaylonmcShan03 pushed a commit to JaylonmcShan03/magic-modules-jmcshan that referenced this pull request Mar 30, 2025
Dawid212 pushed a commit to Dawid212/magic-modules that referenced this pull request Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants