question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

šŸ› Azure Credentials missing SubscriptionId and TenantId

See original GitHub issue

Describe the bug It is possible to define environment variables under the settings area. However these variables arenā€™t actually passed to the runner. Only the environment variables defined under Credentials are actually available to the runner.

image

Hence, terraform plan fails in Azure with the following error:

Error: Error building AzureRM Client: 2 errors occurred:
 	* A Subscription ID must be configured when authenticating as a Service Principal using a Client Secret.
 	* A Tenant ID must be configured when authenticating as a Service Principal using a Client Secret.

To Reproduce Steps to reproduce the behavior:

  1. Go to Settings and define your environment variables
  2. Click on a stack and run it
  3. Scroll down to the logs
  4. See error:
Error: Error building AzureRM Client: 2 errors occurred:
 	* A Subscription ID must be configured when authenticating as a Service Principal using a Client Secret.
 	* A Tenant ID must be configured when authenticating as a Service Principal using a Client Secret.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image

A look in the live docker image used during Terraform Plan shows that only the credentials are passed:

image

Desktop (please complete the following information):

  • OSX
  • Chrome
  • Version 92.0.4515.107 (Official Build) (x86_64)

Additional context None

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
juwitcommented, Aug 3, 2021

Iā€™m working on a fix for the env var settings, itā€™s almost ready.

Iā€™ll be happy to review your PR when itā€™s ready šŸ˜ƒ

1reaction
candidsoncommented, Aug 3, 2021

Hi @juwit I think I was able to fix it. I added the variables as part of the credentials. I will create a PR

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to find your Azure Active Directory tenant ID
Find tenant ID through the Azure portal Ā· Sign in to the Azure portal. Ā· Select Azure Active Directory. Ā· Select Properties. Ā·...
Read more >
Azure.Identity: VisualStudioCodeCredential causes difficult to ...
I believe this is a bug in Azure.Identity because I have no other issues using the VSCode azure login plugin without explicitly setting...
Read more >
Fixing the missing Azure Context in Azure Powershell
No tenant found in the context. Please ensure that the credentials you provided are authorized to access an Azure subscription, then run ConnectĀ ......
Read more >
Azure automation: Authentication succeeds but no ...
Remove-AzureRMSqlDatabase : No subscription found in the context. Please ensure that the credentials you provided are authorized to access anĀ ...
Read more >
Create a Microsoft Azure service principal - ServiceNow Docs
In the Azure portal, navigate to Subscriptions ( Subscriptions icon ). Ā· Copy the Subscription ID and paste it into the text file....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found