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

chore(waf): add checkDeleted logic to the rule resource delete function #5402

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

ruwenqiang123
Copy link
Contributor

@ruwenqiang123 ruwenqiang123 commented Aug 15, 2024

What this PR does / why we need it:

Add checkDeleted logic to the rule rsource delete function.

Which issue this PR fixes:
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)
fixes #xxx

Special notes for your reviewer:

Release note:

1.Involved rule resources are as follows:
   information leakage prevention rule resource, known attack rule resource, precise protection rule resource, web tamper protection rule

PR Checklist

  • Tests added/passed.
$ make testacc TEST="./huaweicloud/services/acceptance/waf" TESTARGS="-run TestAccRuleLeakagePrevention_basic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/waf -v -run TestAccRuleLeakagePrevention_basic -timeout 360m -parallel 4
=== RUN   TestAccRuleLeakagePrevention_basic
=== PAUSE TestAccRuleLeakagePrevention_basic
=== CONT  TestAccRuleLeakagePrevention_basic
--- PASS: TestAccRuleLeakagePrevention_basic (562.38s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/waf       562.439s
$ make testacc TEST="./huaweicloud/services/acceptance/waf" TESTARGS="-run TestAccRuleKnownAttack_basic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/waf -v -run TestAccRuleKnownAttack_basic -timeout 360m -parallel 4
=== RUN   TestAccRuleKnownAttack_basic
=== PAUSE TestAccRuleKnownAttack_basic
=== CONT  TestAccRuleKnownAttack_basic
--- PASS: TestAccRuleKnownAttack_basic (545.48s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/waf       545.534s
$ make testacc TEST="./huaweicloud/services/acceptance/waf" TESTARGS="-run TestAccRulePreciseProtection_basic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/waf -v -run TestAccRulePreciseProtection_basic -timeout 360m -parallel 4
=== RUN   TestAccRulePreciseProtection_basic
=== PAUSE TestAccRulePreciseProtection_basic
=== CONT  TestAccRulePreciseProtection_basic
--- PASS: TestAccRulePreciseProtection_basic (567.10s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/waf       567.145s
$ make testacc TEST="./huaweicloud/services/acceptance/waf" TESTARGS="-run TestAccWafRuleWebTamperProtection_basic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/waf -v -run TestAccWafRuleWebTamperProtection_basic -timeout 360m -parallel 4
=== RUN   TestAccWafRuleWebTamperProtection_basic
=== PAUSE TestAccWafRuleWebTamperProtection_basic
=== CONT  TestAccWafRuleWebTamperProtection_basic
--- PASS: TestAccWafRuleWebTamperProtection_basic (534.88s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/waf       534.934s
  • Documentation updated.

  • Schema updated.

  • CheckDeleted.

    • a. During query operation (Read Context)
      aa. Resource not found
      >>>>>> Paste the screenshot here <<<<<<

information leakage prevention rule resource

image

known attack rule resource

image

precise protection rule resource

image

web tamper protection rule

image
ab. Related resources (parent resources) not found
>>>>>> Paste the screenshot here <<<<<<

information leakage prevention rule resource

image

known attack rule resource

image

precise protection rule resource

image

web tamper protection rule

image

  • b. During delete/disassociate/unbind operation (Delete Context)
    ba. Resource not found
    >>>>>> Paste the screenshot here <<<<<<

information leakage prevention rule resource

image

known attack rule resource

image

precise protection rule resource

image

web tamper protection rule

image

@Lance52259
Copy link
Contributor

watch your title and adjust the description that describe which resources or which type as you edit.

@ruwenqiang123 ruwenqiang123 changed the title chore(waf): add checkDeleted logic to delete function chore(waf): add checkDeleted logic to the rule resource delete function Aug 16, 2024
@jinyangyang222
Copy link
Contributor

/lgtm

@github-ci-robot github-ci-robot added the LGTM /lgtm label Aug 19, 2024
@deer-hang
Copy link
Contributor

/approve

@github-ci-robot github-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 20, 2024
Copy link
Collaborator

@github-ci-robot github-ci-robot left a comment

Choose a reason for hiding this comment

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

This PR has been approved by: @deer-hang

/approve

@github-ci-robot github-ci-robot merged commit 51d2539 into huaweicloud:master Aug 20, 2024
17 checks passed
@ruwenqiang123 ruwenqiang123 deleted the dev_web branch August 21, 2024 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. chore LGTM /lgtm size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants