Henry Thor Baldursson
08/22/2025, 12:37 PMprovider "infisical" {
host = "https://eu.infisical.com"
auth = {
oidc = {
token_environment_variable_name = "TFC_INFISICAL_WORKLOAD_IDENTITY_AUDIENCE"
}
}
}
I set TFC_INFISICAL_WORKLOAD_IDENTITY_AUDIENCE as an env var for my workspace, I set INFISICAL_MACHINE_IDENTITY_ID as an env var for the correct machine identity id, but when I run TFC on my pull request it gets the following error:
Error: Unable to Create Infisical API Client
with provider["registry.terraform.io/infisical/infisical"]
on terraform.tf line 27, in provider "infisical":
provider "infisical" {
An unexpected error occurred when creating the Infisical API client. If the error is not clear, please get in touch at infisical.com/slack.
Infisical Client Error: unable to authenticate with machine identity [err=CallOidcMachineIdentityAuth Unsuccessful response [POST https://eu.infisical.com/api/v1/auth/oidc-auth/login] [status-code=401] [request-id=req-swEYY3eehkFk2X] [message="Invalid JWT"]]
There's nothing in my audit logs related to this.
The "glob pattern" that we are able to use for subjects isnt documented or an example given anywhere, what I'm doing is:
organization:<org>:project:<project>:workspace:<workspace>:run_phase:*Danny De Clercq
08/22/2025, 12:46 PMHenry Thor Baldursson
08/22/2025, 12:51 PMprovider "infisical" {
host = "https://eu.infisical.com"
auth = {
oidc = {
token_environment_variable_name = "TFC_WORKLOAD_IDENTITY_TOKEN_INFISICAL"
}
}
}
and setting TFC_WORKLOAD_IDENTITY_AUDIENCE_INFISICAL as an env var in TFCHenry Thor Baldursson
08/22/2025, 12:51 PMDanny De Clercq
08/25/2025, 6:51 AM