Skip to content

Commit f264e39

Browse files
tongyimingmikatong
andauthored
fix crossplane cam policy (#1423)
Co-authored-by: mikatong <mikatong@tencent.com>
1 parent 20363a4 commit f264e39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tencentcloud/resource_tc_cam_policy_by_name.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func resourceTencentCloudCamPolicyByNameRead(d *schema.ResourceData, meta interf
215215
return err
216216
}
217217
if len(policies) == 0 {
218-
return fmt.Errorf("Can not find policy by name!")
218+
return nil
219219
}
220220
var instance *cam.GetPolicyResponse
221221
err = resource.Retry(readRetryTimeout, func() *resource.RetryError {
@@ -330,7 +330,7 @@ func resourceTencentCloudCamPolicyByNameDelete(d *schema.ResourceData, meta inte
330330
return err
331331
}
332332
if len(policies) == 0 {
333-
return fmt.Errorf("Can not find policy by name!")
333+
return nil
334334
}
335335

336336
policyId := policies[0].PolicyId

0 commit comments

Comments
 (0)