Closed
Description
Terraform Core Version
Terraform v1.6.2 on darwin_amd64
AWS Provider Version
5.27.0
Affected Resource(s)
aws provider authentication using the credential process on 5.27.0
5.26.0 works as expected
Expected Behavior
should authenticate properly using the credential_process to source credentials
Actual Behavior
fails to source AWS credentials from an external process
Relevant Error/Panic Output Snippet
╷
│ Error: No valid credential sources found
│
│ with provider["registry.terraform.io/hashicorp/aws"],
│ on <empty> line 0:
│ (source code not available)
│
│ Please see https://registry.terraform.io/providers/hashicorp/aws
│ for more information about providing credentials.
│
│ Error: failed to refresh cached credentials, operation error STS: AssumeRole, get identity: get credentials: process provider error: error in credential_process: exit status 127
│
╵
Terraform Configuration Files
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.27.0"
}
}
}
provider "aws" {}
data "aws_caller_identity" "current" {}
output "caller" {
value = data.aws_caller_identity.current.id
}
Steps to Reproduce
- create a config file that uses the credential process (we use something internal but works fine for 5.26.0)
[profile sample]
credential_process = '<some CLI command that generates the expected JSON output (see article above)'
- set env variables:
AWS_CONFIG_FILE=<config_file>
AWS_DEFAULT_REGION=us-west-2
AWS_PROFILE=<profile_name that points to a credential process>
AWS_SDK_LOAD_CONFIG=1
terraform apply --auto-approve
- error detailing unable to find credentials
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No