Closed User7845 closed 2 months ago
Hi @User7845
If you need the id token, you can use the Azure CLI task: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-cli-v2?view=azure-pipelines
If you set addSpnToEnvironment
to true
it will output the ID Token to an environment variable called idToken
that you can then use to populate your file.
HI @jaredfholgate , thanks for your response, was hoping the terraform task
would provide something which makes it easier to authenticate the providers using the WIF token.
Ill add an extra step to add the id to a file, thanks!
Hi, i have setup the azure devops service connections with Workload Identity Federation (WIF).
i am trying to authenticate the kubernetes terraform provider with this identity using kubelogin:
kubelogin get-token --login workloadidentity --federated-token-file
in the exec pluginIs it possible the Terraform Task adds the idToken to a file which can be used to authenticate within the terraform providers? Or is there an other way to authenticate terraform providers through WIF service connections?
kubelogin source