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

feat: add update delete protect #2037

Merged
merged 7 commits into from
Aug 10, 2023
Merged

feat: add update delete protect #2037

merged 7 commits into from
Aug 10, 2023

Conversation

WeiMengXS
Copy link
Collaborator

No description provided.

@WeiMengXS WeiMengXS added the run check run check label Aug 9, 2023
"delete_protect": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

没有read, 为什么要computed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

changelog还没有?

@@ -642,7 +648,33 @@ func resourceTencentCloudClbInstanceCreate(d *schema.ResourceData, meta interfac
return err
}
}

if v, ok := d.GetOk("delete_protect"); ok {
Copy link
Collaborator

Choose a reason for hiding this comment

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

这样写false是进不去的

log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, mRequest.GetAction(), mRequest.ToJsonString(), mResponse.ToJsonString())
requestId := *mResponse.Response.RequestId
retryErr := waitForTaskFinish(requestId, meta.(*TencentCloudClient).apiV3Conn.UseClbClient())
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个操作是异步操作?

@WeiMengXS WeiMengXS added run check run check and removed run check run check labels Aug 9, 2023
@@ -739,6 +770,7 @@ func resourceTencentCloudClbInstanceUpdate(d *schema.ResourceData, meta interfac
internet := clb.InternetAccessible{}
changed := false
isLoadBalancerPassToTgt := false
isDeleteProtect := false
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里为什么要给个默认值?

@hellertang hellertang added run check run check and removed run check run check labels Aug 10, 2023
@hellertang hellertang merged commit 7f60893 into master Aug 10, 2023
7 checks passed
@hellertang hellertang deleted the dev/clb-delete-protect branch August 10, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run check run check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants