github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/d/caller_identity.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_caller_identity"
     4  sidebar_current: "docs-aws-datasource-caller-identity"
     5  description: |-
     6    Get information about the identity of the caller for the provider
     7    connection to AWS.
     8  ---
     9  
    10  # aws\_caller\_identity
    11  
    12  Use this data source to get the access to the effective Account ID, User ID, and ARN in
    13  which Terraform is authorized.
    14  
    15  ## Example Usage
    16  
    17  ```hcl
    18  data "aws_caller_identity" "current" {}
    19  
    20  output "account_id" {
    21    value = "${data.aws_caller_identity.current.account_id}"
    22  }
    23  
    24  output "caller_arn" {
    25    value = "${data.aws_caller_identity.current.arn}"
    26  }
    27  
    28  output "caller_user" {
    29    value = "${data.aws_caller_identity.current.user_id}"
    30  }
    31  ```
    32  
    33  ## Argument Reference
    34  
    35  There are no arguments available for this data source.
    36  
    37  ## Attributes Reference
    38  
    39  * `account_id` - The AWS Account ID number of the account that owns or contains the calling entity.
    40  * `arn` - The AWS ARN associated with the calling entity.
    41  * `user_id` - The unique identifier of the calling entity.