mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-16 01:00:22 -04:00
provider/aws: Update calling_identity
Updates `aws_caller_identity` data source to actually include the correct attributes from the `GetCallerIdentity` API function. ``` $ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCallerIdentity_basic' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/03/27 09:26:13 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCallerIdentity_basic -timeout 120m === RUN TestAccAWSCallerIdentity_basic --- PASS: TestAccAWSCallerIdentity_basic (12.74s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 12.767s ```
This commit is contained in:
@@ -9,8 +9,8 @@ description: |-
|
||||
|
||||
# aws\_caller\_identity
|
||||
|
||||
Use this data source to get the access to the effective Account ID in
|
||||
which Terraform is working.
|
||||
Use this data source to get the access to the effective Account ID, User ID, and ARN in
|
||||
which Terraform is authorized.
|
||||
|
||||
~> **NOTE on `aws_caller_identity`:** - an Account ID is only available
|
||||
if `skip_requesting_account_id` is not set on the AWS provider. In such
|
||||
@@ -24,6 +24,14 @@ data "aws_caller_identity" "current" {}
|
||||
output "account_id" {
|
||||
value = "${data.aws_caller_identity.current.account_id}"
|
||||
}
|
||||
|
||||
output "caller_arn" {
|
||||
value = "${data.aws_caller_identity.current.arn}"
|
||||
}
|
||||
|
||||
output "caller_user" {
|
||||
value = "${data.aws_caller_identity.current.user_id}"
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
@@ -32,4 +40,6 @@ There are no arguments available for this data source.
|
||||
|
||||
## Attributes Reference
|
||||
|
||||
`account_id` is set to the ID of the AWS account.
|
||||
`account_id` - The AWS Account ID number of the account that owns or contains the calling entity.
|
||||
`arn` - The AWS ARN associated with the calling entity.
|
||||
`user_id` - The unique identifier of the calling entity.
|
||||
|
||||
Reference in New Issue
Block a user