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

Add support for secure tags in hierarchical firewall policies

Open LucaPrete opened this issue 7 months ago • 18 comments

Adds support for secure tags in hierarchical firewall policies.

Reference hashicorp/terraform-provider-google/issues/22859

Release Note Template for Downstream PRs (will be copied)

compute: added `match.src_secure_tags` and `target_secure_tags` fields to `google_compute_firewall_policy_rule` resource
compute: added `match.src_secure_tags` and `target_secure_tags` fields to `google_compute_firewall_policy_with_rules` resource

LucaPrete avatar May 19 '25 12:05 LucaPrete

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.

@zli82016, 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 May 19 '25 12:05 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 ( 8 files changed, 821 insertions(+)) google-beta provider: Diff ( 8 files changed, 821 insertions(+)) terraform-google-conversion: Diff ( 2 files changed, 175 insertions(+))

Missing test report

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

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

resource "google_compute_firewall_policy_with_rules" "primary" {
  rule {
    match {
      src_secure_tag {
        name = # value needed
      }
    }
    target_secure_tag {
      name = # value needed
    }
  }
}


modular-magician avatar Jun 09 '25 09:06 modular-magician

Tests analytics

Total tests: 772 Passed tests: 683 Skipped tests: 81 Affected tests: 8

Click here to see the affected service packages
  • compute
#### 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
  • TestAccComputeFirewallPolicyRule_basic
  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleExample
  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleNetworkScopeExample
  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleSecureTagsExample
  • TestAccComputeFirewallPolicyRule_multipleRules
  • TestAccComputeFirewallPolicyRule_securityProfileGroup_update
  • TestAccComputeFirewallPolicyRule_update
  • TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample

Get to know how VCR tests work

modular-magician avatar Jun 09 '25 10:06 modular-magician

🟢 Tests passed during RECORDING mode: TestAccComputeFirewallPolicyRule_basic [Debug log] TestAccComputeFirewallPolicyRule_firewallPolicyRuleExample [Debug log] TestAccComputeFirewallPolicyRule_firewallPolicyRuleNetworkScopeExample [Debug log] TestAccComputeFirewallPolicyRule_multipleRules [Debug log] TestAccComputeFirewallPolicyRule_securityProfileGroup_update [Debug log] TestAccComputeFirewallPolicyRule_update [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode: TestAccComputeFirewallPolicyRule_firewallPolicyRuleSecureTagsExample [Error message] [Debug log] TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample [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 Jun 09 '25 10:06 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 ( 8 files changed, 893 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 8 files changed, 893 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 175 insertions(+))

modular-magician avatar Jun 09 '25 15:06 modular-magician

Tests analytics

Total tests: 914 Passed tests: 830 Skipped tests: 82 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_firewallPolicyRuleSecureTagsExample
  • TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample

Get to know how VCR tests work

modular-magician avatar Jun 09 '25 15:06 modular-magician

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

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode: TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample [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 Jun 09 '25 15:06 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 ( 8 files changed, 893 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 8 files changed, 893 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 175 insertions(+))

modular-magician avatar Jun 09 '25 15:06 modular-magician

Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleSecureTagsExample

Tests analytics

Total tests: 901 Passed tests: 824 Skipped tests: 77 Affected tests: 0

Click here to see the affected service packages
  • compute
🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.

View the build log

modular-magician avatar Jun 09 '25 16:06 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 ( 8 files changed, 893 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 8 files changed, 893 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 175 insertions(+))

modular-magician avatar Jun 09 '25 18:06 modular-magician

Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleSecureTagsExample

Tests analytics

Total tests: 895 Passed tests: 814 Skipped tests: 81 Affected tests: 0

Click here to see the affected service packages
  • compute
🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.

View the build log

modular-magician avatar Jun 09 '25 18:06 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 ( 8 files changed, 893 insertions(+), 2 deletions(-)) google-beta provider: Diff ( 8 files changed, 893 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 175 insertions(+))

modular-magician avatar Jun 10 '25 07:06 modular-magician

Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleSecureTagsExample

Tests analytics

Total tests: 1023 Passed tests: 940 Skipped tests: 82 Affected tests: 1

Click here to see the affected service packages
  • compute
#### 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
  • TestAccComputeRegionNetworkFirewallPolicyRule_secureTags

Get to know how VCR tests work

modular-magician avatar Jun 10 '25 08:06 modular-magician

🟢 Tests passed during RECORDING mode: TestAccComputeRegionNetworkFirewallPolicyRule_secureTags [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

modular-magician avatar Jun 10 '25 08:06 modular-magician

@LucaPrete, is this PR ready for review?

zli82016 avatar Jun 17 '25 18:06 zli82016

yes!

Il giorno mar 17 giu 2025 alle ore 21:10 Zhenhua Li < @.***> ha scritto:

zli82016 left a comment (GoogleCloudPlatform/magic-modules#14021) https://github.com/GoogleCloudPlatform/magic-modules/pull/14021#issuecomment-2981344930

@LucaPrete https://github.com/LucaPrete, is this PR ready for review?

— Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/magic-modules/pull/14021#issuecomment-2981344930, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARY7UAYEXVN5H3L5MJLO2D3EBKYHAVCNFSM6AAAAAB5NSDF6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOBRGM2DIOJTGA . You are receiving this because you were mentioned.Message ID: @.***>

LucaPrete avatar Jun 18 '25 11:06 LucaPrete

@zli82016 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 Jun 20 '25 09:06 github-actions[bot]

@LucaPrete, is this PR ready for review?

@zli82016 sorry I don't know if you have been notified from my previous message but yes. From my perspective it's ready for review.

LucaPrete avatar Jun 20 '25 11:06 LucaPrete

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 ( 10 files changed, 1181 insertions(+), 49 deletions(-)) google-beta provider: Diff ( 10 files changed, 1181 insertions(+), 49 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 175 insertions(+))

modular-magician avatar Jun 21 '25 13:06 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 ( 10 files changed, 1187 insertions(+), 55 deletions(-)) google-beta provider: Diff ( 10 files changed, 1187 insertions(+), 55 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 175 insertions(+))

modular-magician avatar Jun 21 '25 14:06 modular-magician

Tests analytics

Total tests: 1227 Passed tests: 1133 Skipped tests: 83 Affected tests: 11

Click here to see the affected service packages
  • compute
#### Action taken
Found 11 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeFirewallPolicyRule_basic
  • TestAccComputeFirewallPolicyRule_disabled_enabled
  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleExample
  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleNetworkScopeExample
  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleSecureTagsExample
  • TestAccComputeFirewallPolicyRule_multipleRules
  • TestAccComputeFirewallPolicyRule_secureTags
  • TestAccComputeFirewallPolicyRule_securityProfileGroup_update
  • TestAccComputeFirewallPolicyRule_update
  • TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample
  • TestAccComputeFirewallPolicyWithRules_update

Get to know how VCR tests work

modular-magician avatar Jun 21 '25 14:06 modular-magician

🟢 Tests passed during RECORDING mode: TestAccComputeFirewallPolicyRule_basic [Debug log] TestAccComputeFirewallPolicyRule_disabled_enabled [Debug log] TestAccComputeFirewallPolicyRule_firewallPolicyRuleExample [Debug log] TestAccComputeFirewallPolicyRule_firewallPolicyRuleNetworkScopeExample [Debug log] TestAccComputeFirewallPolicyRule_firewallPolicyRuleSecureTagsExample [Debug log] TestAccComputeFirewallPolicyRule_multipleRules [Debug log] TestAccComputeFirewallPolicyRule_secureTags [Debug log] TestAccComputeFirewallPolicyRule_securityProfileGroup_update [Debug log] TestAccComputeFirewallPolicyRule_update [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Several tests terminated during RECORDING mode.

🔴 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 Jun 21 '25 14:06 modular-magician

Tests analytics

Total tests: 1227 Passed tests: 1133 Skipped tests: 83 Affected tests: 11

Click here to see the affected service packages
  • compute
#### Action taken
Found 11 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeFirewallPolicyRule_basic
  • TestAccComputeFirewallPolicyRule_disabled_enabled
  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleExample
  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleNetworkScopeExample
  • TestAccComputeFirewallPolicyRule_firewallPolicyRuleSecureTagsExample
  • TestAccComputeFirewallPolicyRule_multipleRules
  • TestAccComputeFirewallPolicyRule_secureTags
  • TestAccComputeFirewallPolicyRule_securityProfileGroup_update
  • TestAccComputeFirewallPolicyRule_update
  • TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample
  • TestAccComputeFirewallPolicyWithRules_update

Get to know how VCR tests work

modular-magician avatar Jun 21 '25 14:06 modular-magician

🟢 Tests passed during RECORDING mode: TestAccComputeFirewallPolicyRule_basic [Debug log] TestAccComputeFirewallPolicyRule_disabled_enabled [Debug log] TestAccComputeFirewallPolicyRule_firewallPolicyRuleExample [Debug log] TestAccComputeFirewallPolicyRule_firewallPolicyRuleNetworkScopeExample [Debug log] TestAccComputeFirewallPolicyRule_firewallPolicyRuleSecureTagsExample [Debug log] TestAccComputeFirewallPolicyRule_multipleRules [Debug log] TestAccComputeFirewallPolicyRule_secureTags [Debug log] TestAccComputeFirewallPolicyRule_securityProfileGroup_update [Debug log] TestAccComputeFirewallPolicyRule_update [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Several tests terminated during RECORDING mode.

🔴 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 Jun 21 '25 14:06 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 ( 10 files changed, 1187 insertions(+), 55 deletions(-)) google-beta provider: Diff ( 10 files changed, 1187 insertions(+), 55 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 175 insertions(+))

modular-magician avatar Jun 24 '25 06:06 modular-magician

Tests analytics

Total tests: 1227 Passed tests: 1142 Skipped tests: 83 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
  • TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample
  • TestAccComputeFirewallPolicyWithRules_update

Get to know how VCR tests work

modular-magician avatar Jun 24 '25 07:06 modular-magician

🔴 Several tests terminated during RECORDING mode.

🔴 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 Jun 24 '25 07:06 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 ( 10 files changed, 1360 insertions(+), 55 deletions(-)) google-beta provider: Diff ( 10 files changed, 1360 insertions(+), 55 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 175 insertions(+))

modular-magician avatar Jun 25 '25 14:06 modular-magician

Tests analytics

Total tests: 1229 Passed tests: 1144 Skipped tests: 83 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
  • TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample
  • TestAccComputeFirewallPolicyWithRules_update

Get to know how VCR tests work

modular-magician avatar Jun 25 '25 14:06 modular-magician

🔴 Tests failed during RECORDING mode: TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample [Error message] [Debug log] TestAccComputeFirewallPolicyWithRules_update [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 Jun 25 '25 14:06 modular-magician