github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/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 in
    13  which Terraform is working.
    14  
    15  ~> **NOTE on `aws_caller_identity`:** - an Account ID is only available
    16  if `skip_requesting_account_id` is not set on the AWS provider. In such
    17  cases, the data source will return an error.
    18  
    19  ## Example Usage
    20  
    21  ```
    22  data "aws_caller_identity" "current" {}
    23  
    24  output "account_id" {
    25    value = "${data.aws_caller_identity.current.account_id}"
    26  }
    27  ```
    28  
    29  ## Argument Reference
    30  
    31  There are no arguments available for this data source.
    32  
    33  ## Attributes Reference
    34  
    35  `account_id` is set to the ID of the AWS account.