I would like to be able to inherit environment variables from the execution environment so these can be dynamic between plan and apply.
My use case is that to authenticate with OIDC in a GitHub actions workflow the ID token needs to not have expired and if the shell resource is executing after that's happened I can't authenticate. If I can access the ACTIONS_ID_TOKEN_REQUEST_URL & ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variables I can generate a new ID token, but as these values are only valid within a single GitHub Actions step they can't be passed in to Terraform as a variable and then used in a different step.
Ignore this, I was paying too much attention to the error output which only showed the env inputs. By running export I can see that the environment variables are all set.
I would like to be able to inherit environment variables from the execution environment so these can be dynamic between plan and apply.
My use case is that to authenticate with OIDC in a GitHub actions workflow the ID token needs to not have expired and if the shell resource is executing after that's happened I can't authenticate. If I can access the
ACTIONS_ID_TOKEN_REQUEST_URL
&ACTIONS_ID_TOKEN_REQUEST_TOKEN
environment variables I can generate a new ID token, but as these values are only valid within a single GitHub Actions step they can't be passed in to Terraform as a variable and then used in a different step.