Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include access_key, secret_key, and session_token in aws_caller_identity #8517

Closed
wants to merge 1 commit into from
Closed

Include access_key, secret_key, and session_token in aws_caller_identity #8517

wants to merge 1 commit into from

Commits on May 3, 2019

  1. Include access_key, secret_key, and session_token in aws_caller_identity

    This allows local-exec provisioners to be able to retrieve the
    credentials that the aws provider is using.
    
    Ex:
    ```
    provider "aws" {}
    data "aws_caller_identity" "current" {}
    
    resource "null_resource" "my_resource" {
      provisioner "local-exec" {
        command = "some-command"
        environment {
          AWS_ACCESS_KEY_ID = "${data.aws_caller_identity.current.access_key}"
          AWS_SECRET_ACCESS_KEY = "${data.aws_caller_identity.current.secret_key}"
          AWS_SESSION_TOKEN = "${data.aws_caller_identity.current.session_token}"
        }
      }
    }
    
    closes: #8242
    ```
    Tommy Wang authored and Tommy Wang committed May 3, 2019
    Configuration menu
    Copy the full SHA
    8e034d9 View commit details
    Browse the repository at this point in the history