Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .changelog/2994.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_identity_center_scim_credential: support param `credential_secret`
```
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ func ResourceTencentCloudIdentityCenterScimCredential() *schema.Resource {
Description: "SCIM key ID. scimcred-prefix and followed by 12 random digits/lowercase letters.",
},

"credential_secret": {
Type: schema.TypeString,
Computed: true,
Sensitive: true,
Description: "SCIM key.",
},

"credential_type": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -104,6 +111,9 @@ func resourceTencentCloudIdentityCenterScimCredentialCreate(d *schema.ResourceDa
credentialId = *response.Response.CredentialId

d.SetId(strings.Join([]string{zoneId, credentialId}, tccommon.FILED_SP))
if response.Response != nil && response.Response.CredentialSecret != nil {
_ = d.Set("credential_secret", *response.Response.CredentialSecret)
}

return resourceTencentCloudIdentityCenterScimCredentialRead(d, meta)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ func TestAccTencentCloudIdentityCenterScimCredentialResource_basic(t *testing.T)
resource.TestCheckResourceAttrSet("tencentcloud_identity_center_scim_credential.identity_center_scim_credential", "credential_type"),
resource.TestCheckResourceAttrSet("tencentcloud_identity_center_scim_credential.identity_center_scim_credential", "create_time"),
resource.TestCheckResourceAttrSet("tencentcloud_identity_center_scim_credential.identity_center_scim_credential", "expire_time"),
resource.TestCheckResourceAttrSet("tencentcloud_identity_center_scim_credential.identity_center_scim_credential", "credential_secret"),
),
},
{
ResourceName: "tencentcloud_identity_center_scim_credential.identity_center_scim_credential",
ImportState: true,
ImportStateVerify: true,
ResourceName: "tencentcloud_identity_center_scim_credential.identity_center_scim_credential",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"credential_secret"},
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ In addition to all arguments above, the following attributes are exported:
* `id` - ID of the resource.
* `create_time` - SCIM create time.
* `credential_id` - SCIM key ID. scimcred-prefix and followed by 12 random digits/lowercase letters.
* `credential_secret` - SCIM key.
* `credential_type` - SCIM credential type.
* `expire_time` - SCIM expire time.
* `status` - SCIM key status, Enabled-On, Disabled-Closed.
Expand Down
Loading