Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device is not in required device state: compliant #767

Closed
AFengKK opened this issue Sep 28, 2022 · 6 comments
Closed

Device is not in required device state: compliant #767

AFengKK opened this issue Sep 28, 2022 · 6 comments
Assignees
Milestone

Comments

@AFengKK
Copy link

AFengKK commented Sep 28, 2022

Describe the issue:
Failed when we try to run the command bash ./test-templates.sh -c false -t todo-python-mongo-terraform -b pr/743

Repro Steps:

  1. Run azd login --use-device-code
  2. Run bash ./test-templates.sh -c false -t todo-python-mongo-terraform -b pr/743

Error Message:

image

Environment:
OS: Codespaces
Template: https://github.com/Azure-Samples/todo-python-mongo-terraform

Expected behavior:
Run command: bash ./test-templates.sh -c false -t todo-python-mongo-terraform -b pr/743 can success

@rajeshkamal5050 for notification.

@HadwaAbdelhalem
Copy link
Contributor

@AFengKK the failure is regarding the az login with --device code on wsl , details here . Can you please run az login using a service principal or user and rerun the commands.

@AFengKK
Copy link
Author

AFengKK commented Sep 30, 2022

@HadwaAbdelhalem, I have the way az login --service-principal, but when execute the command bash ./test-templates.sh -c false -t todo-python-mongo-terraform -b pr/743 on Codespaces, and the following error occurred. Any ideas?

Error Message:
image

@HadwaAbdelhalem
Copy link
Contributor

@AFengKK looks like you did not configure the ARM variables with the service principle details . you need to set the ARM variables if you used a service principle for az login .

$ export ARM_CLIENT_ID="00000000-0000-0000-0000-000000000000"
$ export ARM_CLIENT_SECRET="00000000-0000-0000-0000-000000000000"
$ export ARM_TENANT_ID="00000000-0000-0000-0000-000000000000"
detailed step by step here

@rajeshkamal5050
Copy link

@AFengKK did you try the above from @HadwaAbdelhalem ?

@AFengKK
Copy link
Author

AFengKK commented Oct 11, 2022

@HadwaAbdelhalem According to your comments, we configured the ARM variables with the service principle to az login, and the deployment was successful. Now, this issue can no longer be reproduced. But when running the command azd pipeline config and azd pipeline config --provider azdo, we ran into the old issue #197.

@jongio Following the comment #370 (comment), we log in this way az login --use-device-code in Codespaces. But in this issue, HadwaAbdelhalem suggest that we can log in use a service principle. So for the test in the Codespaces environment, which way should we log in?

@rajeshkamal5050
Copy link

According to your comments, we configured the ARM variables with the service principle to az login, and the deployment was successful. Now, this issue can no longer be reproduced.

Too many bugs going around for similar issues. Closing this one since can no longer be reproduced.

@AFengKK @HadwaAbdelhalem please double check on the external terraform documentation is clear. If any updates are needed based on this issue, please make it.

For the azd pipeline config issues refer to these,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants