» alicloud_caller_identity

This data source provides the identity of the current user.

» Example Usage

data "alicloud_caller_identity" "current" {
}

output "current_user_arn" {
  value = "${data.alicloud_caller_identity.current.id}"
}

» Attributes Reference

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.