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

refactor(apig/acl): support refresh functions for associate resource #4787

Conversation

Lance52259
Copy link
Collaborator

What this PR does / why we need it:
Support the refresh functions for the ACL policy associate resource.

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. supprot refresh functions for associate resource

PR Checklist

  • Tests added/passed.
  • Documentation updated.
  • Schema updated.

Acceptance Steps Performed

make testacc TEST='./huaweicloud/services/acceptance/apig' TESTARGS='-run=TestAccAclPolicyAssociate_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/apig -v -run=TestAccAclPolicyAssociate_basic -timeout 360m -parallel 4
=== RUN   TestAccAclPolicyAssociate_basic
=== PAUSE TestAccAclPolicyAssociate_basic
=== CONT  TestAccAclPolicyAssociate_basic
--- PASS: TestAccAclPolicyAssociate_basic (699.11s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/apig      699.151s

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

[APPROVALNOTIFIER] This PR is APPROVED

This PR has been approved by: @Lance52259

@Lance52259 Lance52259 changed the title refactor(apig/acl): supprot refresh functions for associate resource refactor(apig/acl): support refresh functions for associate resource May 11, 2024
@Lance52259 Lance52259 force-pushed the br_acl_associate_resource_upgrade branch from 98c56c5 to 4597f3a Compare May 11, 2024 09:11
@@ -61,6 +70,80 @@ func ResourceAclPolicyAssociate() *schema.Resource {
}
}

func aclPolicyBindingRefreshFunc(client *golangsdk.ServiceClient, instanceId, policyId string,
Copy link
Contributor

Choose a reason for hiding this comment

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

What this method actually does is unbind.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

when we are binding APIs to a ACL policy, we will check whether include any API which is not bound again and again, and this operation is during the creation, so I names it as the aclPolicyBindingRefreshFunc.

@deer-hang
Copy link
Contributor

/lgtm

@github-ci-robot github-ci-robot added the LGTM /lgtm label May 16, 2024
@github-ci-robot github-ci-robot merged commit 97769ad into huaweicloud:master May 16, 2024
13 checks passed
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. LGTM /lgtm refactor size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants