-
Notifications
You must be signed in to change notification settings - Fork 143
feat: organization add resource #2521
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
Conversation
return err | ||
} | ||
shareMemberUins := strings.Join(shareMemberUin, tccommon.COMMA_SP) | ||
d.SetId(strings.Join(append([]string{area, unitId, shareMemberUins}), tccommon.FILED_SP)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为啥 Id 中要把 shareMemberUins 加进来呢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不加进来的话,查询到时候,没办法知道传入的uin是否绑定成功。
return nil | ||
} | ||
|
||
_ = d.Set("unit_id", unitId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为啥要单独 set unit_id 呢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id有些特殊,没办法直接引用到另一个资源上
Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_organization_org_share_unit_member.org_share_unit_member", "id"), | ||
resource.TestCheckResourceAttrSet("tencentcloud_organization_org_share_unit_member.org_share_unit_member", "unit_id"), | ||
resource.TestCheckResourceAttrSet("tencentcloud_organization_org_share_unit_member.org_share_unit_member", "area"), | ||
resource.TestCheckResourceAttrSet("tencentcloud_organization_org_share_unit_member.org_share_unit_member", "members.#"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不支持导入吗,测试用量貌似没有导入的用例?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是attachment
cdfde35
to
34bae35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
add resource tencentcloud_organization_org_share_unit