Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tencentcloud/resource_tc_cam_policy_by_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func resourceTencentCloudCamPolicyByNameRead(d *schema.ResourceData, meta interf
return err
}
if len(policies) == 0 {
return fmt.Errorf("Can not find policy by name!")
return nil
}
var instance *cam.GetPolicyResponse
err = resource.Retry(readRetryTimeout, func() *resource.RetryError {
Expand Down Expand Up @@ -330,7 +330,7 @@ func resourceTencentCloudCamPolicyByNameDelete(d *schema.ResourceData, meta inte
return err
}
if len(policies) == 0 {
return fmt.Errorf("Can not find policy by name!")
return nil
}

policyId := policies[0].PolicyId
Expand Down