This data source provides the identity of the current user.
data "alicloud_caller_identity" "current" {
}
output "current_user_arn" {
value = "${data.alicloud_caller_identity.current.id}"
}
The following attributes are exported:
id
- Principal ID.arn
- The Alibaba Cloud Resource Name (ARN) of the user making the call.account_id
- Account ID.identity_type
- The type of the princiapal. RAMUser for users.