Hello, i’ve created a multi provider deployment - while it works locally from my machine, in the pipeline it fails with “InvalidIdentityToken: Couldn’t retrieve verification key from your identity provider, please reference AssumeRoleWithWebIdentity documentation for requirements status code: 400”
This is the provider file:
terraform {
required_version = ">= 0.13.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.1.15"
}
}
}
provider "aws" {
region = "ap-northeast-2"
alias = "ap-northeast-2"
}
provider "aws" {
region = "ap-northeast-1"
alias = "ap-northeast-1"
}
...
...
as part of the setting up the env var, we use $AWS_WEB_IDENTITY_TOKEN_FILE environment variable. and then it fails
Error: error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found.
Please see https://registry.terraform.io/providers/hashicorp/aws
for more information about providing credentials.
Error: WebIdentityErr: failed to retrieve credentials
caused by: InvalidIdentityToken: Couldn't retrieve verification key from your identity provider, please reference AssumeRoleWithWebIdentity documentation for requirements
status code: 400, request id: 1e15aed2-804d-4e00-aa67-6ced459d24e0
with module.base-multi-region-resources.provider["registry.terraform.io/hashicorp/aws"].eu-central-1,
on ../../modules/base-multi-region-resources/versions.tf line 32, in provider "aws":
32: provider "aws" {
Error: error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found.
Please see https://registry.terraform.io/providers/hashicorp/aws
for more information about providing credentials.
Error: WebIdentityErr: failed to retrieve credentials
caused by: InvalidIdentityToken: Couldn't retrieve verification key from your identity provider, please reference AssumeRoleWithWebIdentity documentation for requirements
status code: 400, request id: 07a89838-9fea-41f0-88e9-12d271212a64
with module.base-multi-region-resources.provider["registry.terraform.io/hashicorp/aws"].eu-west-1,
on ../../modules/base-multi-region-resources/versions.tf line 97, in provider "aws":
97: provider "aws" {
I have no idea what to do, when applying it locally with my AWS creds it works…