Skip to content

Migrate google_compute_firewall_policy resource from DCL to MMv1 #11357

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
merged 14 commits into from
Feb 4, 2025

Conversation

Samir-Cit
Copy link
Contributor

@Samir-Cit Samir-Cit commented Aug 5, 2024

Hello folks.
This PR is to move the Compute Firewall Policy (google_compute_firewall_policy) resource from DCL to MMv1. And this PR includes:

  • Creation of the resource on MMv1.
  • Creation of the examples and tests.
  • Remove references to DCL resource.

Note: This PR doesn't include the deletion of the DCL resource. This change will be done on the Delarative Resource Client Library repository.

Release Note Template for Downstream PRs (will be copied)

compute: `google_compute_firewall_policy` now uses MMv1 engine instead of DCL.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Aug 5, 2024
@Samir-Cit Samir-Cit marked this pull request as ready for review August 9, 2024 22:18
@github-actions github-actions bot requested a review from shuyama1 August 9, 2024 22:19
Copy link

github-actions bot commented Aug 9, 2024

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

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

@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 Aug 9, 2024
@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 ( 6 files changed, 524 insertions(+), 188 deletions(-))
google-beta provider: Diff ( 6 files changed, 524 insertions(+), 188 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 99 insertions(+))

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field firewall_policy_id within resource google_compute_firewall_policy was either removed or renamed - reference

If you believe this detection to be incorrect please raise the concern with your reviewer.
If you intend to make this change you will need to wait for a major release window.
An override-breaking-change label can be added to allow merging.

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 980
Passed tests: 901
Skipped tests: 72
Affected tests: 7

Click here to see the affected service packages
  • compute

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeFirewallPolicyAssociation_basic
  • TestAccComputeFirewallPolicyRule_BasicFirSecRuleHandWritten
  • TestAccComputeFirewallPolicyRule_multipleRules
  • TestAccComputeFirewallPolicyRule_securityProfileGroup_update
  • TestAccComputeFirewallPolicyRule_update
  • TestAccComputeFirewallPolicy_firewallPolicyExample
  • TestAccComputeFirewallPolicy_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

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


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccComputeFirewallPolicyAssociation_basic[Error message] [Debug log]
TestAccComputeFirewallPolicyRule_BasicFirSecRuleHandWritten[Error message] [Debug log]
TestAccComputeFirewallPolicyRule_multipleRules[Error message] [Debug log]
TestAccComputeFirewallPolicyRule_securityProfileGroup_update[Error message] [Debug log]
TestAccComputeFirewallPolicyRule_update[Error message] [Debug log]
TestAccComputeFirewallPolicy_update[Error message] [Debug log]

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@shuyama1 shuyama1 requested review from slevenick and trodge and removed request for shuyama1 August 12, 2024 22:04
@trodge trodge self-assigned this Aug 12, 2024
@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 Aug 13, 2024
@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 ( 11 files changed, 554 insertions(+), 272 deletions(-))
google-beta provider: Diff ( 11 files changed, 554 insertions(+), 272 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 99 insertions(+))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 982
Passed tests: 904
Skipped tests: 72
Affected tests: 6

Click here to see the affected service packages
  • compute

Action taken

Found 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeFirewallPolicyAssociation_basic
  • TestAccComputeFirewallPolicyRule_BasicFirSecRuleHandWritten
  • TestAccComputeFirewallPolicyRule_multipleRules
  • TestAccComputeFirewallPolicyRule_securityProfileGroup_update
  • TestAccComputeFirewallPolicyRule_update
  • TestAccComputeFirewallPolicy_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeFirewallPolicyAssociation_basic[Debug log]
TestAccComputeFirewallPolicyRule_BasicFirSecRuleHandWritten[Debug log]
TestAccComputeFirewallPolicyRule_securityProfileGroup_update[Debug log]
TestAccComputeFirewallPolicyRule_update[Debug log]
TestAccComputeFirewallPolicy_update[Debug log]

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


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

$\textcolor{red}{\textsf{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

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

@Samir-Cit Samir-Cit marked this pull request as draft August 16, 2024 15:16
@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 Aug 21, 2024
@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 ( 11 files changed, 554 insertions(+), 204 deletions(-))
google-beta provider: Diff ( 11 files changed, 554 insertions(+), 204 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 99 insertions(+))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 986
Passed tests: 903
Skipped tests: 77
Affected tests: 6

Click here to see the affected service packages
  • compute

Action taken

Found 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeFirewallPolicyAssociation_basic
  • TestAccComputeFirewallPolicyRule_BasicFirSecRuleHandWritten
  • TestAccComputeFirewallPolicyRule_multipleRules
  • TestAccComputeFirewallPolicyRule_securityProfileGroup_update
  • TestAccComputeFirewallPolicyRule_update
  • TestAccComputeFirewallPolicy_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeFirewallPolicyAssociation_basic[Debug log]
TestAccComputeFirewallPolicyRule_BasicFirSecRuleHandWritten[Debug log]
TestAccComputeFirewallPolicyRule_securityProfileGroup_update[Debug log]
TestAccComputeFirewallPolicyRule_update[Debug log]

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


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

$\textcolor{red}{\textsf{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 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 Aug 23, 2024
@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 ( 11 files changed, 559 insertions(+), 207 deletions(-))
google-beta provider: Diff ( 11 files changed, 559 insertions(+), 207 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 99 insertions(+))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 986
Passed tests: 907
Skipped tests: 77
Affected tests: 2

Click here to see the affected service packages
  • compute

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
  • TestAccComputeFirewallPolicyRule_multipleRules
  • TestAccComputeFirewallPolicy_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\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

@Samir-Cit
Copy link
Contributor Author

@shuyama1, @trodge and @slevenick
Can you do the Code Review in this Pull Request?

This is the last one regading move the Firewall Policy resources from DCL to MMv1.

Thanks.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Dec 19, 2024
Copy link

@GoogleCloudPlatform/terraform-team @shuyama1 This PR has been waiting for review for 7 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link

@GoogleCloudPlatform/terraform-team @shuyama1 This PR has been waiting for review for 8 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link

github-actions bot commented Jan 3, 2025

@GoogleCloudPlatform/terraform-team @shuyama1 This PR has been waiting for review for 9 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

base_url: 'locations/global/firewallPolicies'
self_link: 'locations/global/firewallPolicies/{{name}}'
create_url: 'locations/global/firewallPolicies?parentId={{parent}}'
update_verb: 'PATCH'
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this resource be using legacy_long_form_project?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This resource is not bind to the project.
I tryied to use this legacy_long_form_project and the resource fails to create because it remove the reference from the parent.

Eg.: You are using the parent as organizations/<ORG_ID>, the code removes the organizations/ so it will try to use only the <ORG_ID> and then throws the following error

{
  "error": {
    "code": 404,
    "message": "The resource '<ORG_ID>' was not found",
    "errors": [
      {
        "message": "The resource '<ORG_ID>' was not found",
        "domain": "global",
        "reason": "notFound"
      }
    ]
  }
}

@trodge
Copy link
Contributor

trodge commented Jan 8, 2025

/gcbrun

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 8, 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 ( 2 files changed, 58 insertions(+), 33 deletions(-))
google-beta provider: Diff ( 8 files changed, 458 insertions(+), 200 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 99 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4412
Passed tests: 3976
Skipped tests: 429
Affected tests: 7

Click here to see the affected service packages

All service packages are affected

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeDeveloper_apigeeDeveloperUpdateTest
  • TestAccApigeeEnvironmentAddonsConfig_apigeeEnvAddonsAnalyticsTestExample
  • TestAccComputeFirewallPolicyAssociation_basic
  • TestAccComputeFirewallPolicyAssociation_organization
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccEphemeralServiceAccountKey_basic
  • TestAccStorageTransferReplicationJob_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccApigeeDeveloper_apigeeDeveloperUpdateTest [Debug log]
TestAccComputeFirewallPolicyAssociation_basic [Debug log]
TestAccComputeFirewallPolicyAssociation_organization [Debug log]
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]
TestAccStorageTransferReplicationJob_basic [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]
TestAccStorageTransferReplicationJob_basic [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.


🔴 Tests failed during RECORDING mode:
TestAccApigeeEnvironmentAddonsConfig_apigeeEnvAddonsAnalyticsTestExample [Error message] [Debug log]
TestAccEphemeralServiceAccountKey_basic [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

@Samir-Cit, this PR is waiting for action from you. If no action is taken, this PR will be closed in 28 days.

Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

Image showing the re-request review button

This notification can be disabled with the disable-automatic-closure label.

@maxi-cit
Copy link
Contributor

Hello @trodge, I updated this PR could you run tests again please?

@github-actions github-actions bot requested a review from trodge January 30, 2025 15:29
@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 Jan 30, 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 ( 2 files changed, 58 insertions(+), 33 deletions(-))
google-beta provider: Diff ( 8 files changed, 470 insertions(+), 200 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 99 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4531
Passed tests: 4093
Skipped tests: 430
Affected tests: 8

Click here to see the affected service packages

All service packages are affected

Action taken

Found 8 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeEnvironmentAddonsConfig_apigeeEnvAddonsAnalyticsTestExample
  • TestAccCloudbuildWorkerPool_basic
  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleExample
  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleNetworkScopeExample
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccEphemeralServiceAccountKey_basic
  • TestAccNetworkSecurityAuthzPolicy_networkServicesAuthzPolicyAdvancedExample
  • TestAccStorageTransferReplicationJob_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccComputeFirewallPolicyRule_firewallPolicyRuleExample [Debug log]
TestAccComputeFirewallPolicyRule_firewallPolicyRuleNetworkScopeExample [Debug log]
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]
TestAccStorageTransferReplicationJob_basic [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [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.


🔴 Tests failed during RECORDING mode:
TestAccApigeeEnvironmentAddonsConfig_apigeeEnvAddonsAnalyticsTestExample [Error message] [Debug log]
TestAccCloudbuildWorkerPool_basic [Error message] [Debug log]
TestAccEphemeralServiceAccountKey_basic [Error message] [Debug log]
TestAccNetworkSecurityAuthzPolicy_networkServicesAuthzPolicyAdvancedExample [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

github-actions bot commented Feb 4, 2025

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

@trodge trodge added this pull request to the merge queue Feb 4, 2025
Merged via the queue into GoogleCloudPlatform:main with commit 7d21e3a Feb 4, 2025
14 of 15 checks passed
Dawid212 pushed a commit to Dawid212/magic-modules that referenced this pull request Feb 12, 2025
niharika-98 pushed a commit to niharika-98/magic-modules that referenced this pull request Feb 17, 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.

5 participants