Skip to content

Commit 0ea9330

Browse files
authored
fix(cam): [123456789] Update tencentcloud_cam_policy error message (#2902)
* add * add
1 parent 9d24c9e commit 0ea9330

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.changelog/2902.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_cam_policy: Update error message
3+
```

tencentcloud/services/cam/service_tencentcloud_cam.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,20 +1207,20 @@ func (me *CamService) PolicyDocumentForceCheck(document string) error {
12071207
//multi value case in elemant `resource`, `action`: input:""/[""], output: [""]
12081208
if state.Resource != nil {
12091209
if reflect.TypeOf(state.Resource) == reflect.TypeOf("string") {
1210-
return fmt.Errorf("The format of `resource` in policy document is invalid, its type must be array")
1210+
return fmt.Errorf("The format of `resource` in policy document is invalid, its type must be array.")
12111211
}
12121212
}
12131213

12141214
if state.Action != nil {
12151215
if reflect.TypeOf(state.Action) == reflect.TypeOf("string") {
1216-
return fmt.Errorf("The format of `resource` in policy document is invalid, its type must be array")
1216+
return fmt.Errorf("The format of `action` in policy document is invalid, its type must be array.")
12171217
}
12181218

12191219
}
12201220
//multi value case in elemant `principal.qcs`:input :root/[uin of the user], output:[uin of the user]
12211221
for _, qcs := range state.Principal.Qcs {
12221222
if strings.Contains(qcs, "root") {
1223-
return fmt.Errorf("`root` format is not supported, please replace it with uin")
1223+
return fmt.Errorf("`root` format is not supported, please replace it with uin.")
12241224
}
12251225
}
12261226
}

0 commit comments

Comments
 (0)