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

China Azure #490

Closed
m1rl0k opened this issue Dec 19, 2023 · 3 comments
Closed

China Azure #490

m1rl0k opened this issue Dec 19, 2023 · 3 comments
Labels
question Further information is requested

Comments

@m1rl0k
Copy link

m1rl0k commented Dec 19, 2023

I get errors when trying to authenticate to use tfexport against az china;

image this is without a service principal;

this is with service principal and azureprofile.json set to to use; image

obviously have set to azure china cloud, did az login.. gave owner to service principal on the sub trying to read... have tried multiple resource groups; etc what may i be missing? Any insights @magodo

@magodo
Copy link
Collaborator

magodo commented Dec 19, 2023

@m1rl0k I've tested via the SP auth way (i.e. ARM_CLIENT_ID + ARM_CLIENT_SECRET), would you mind give that a try? Currently, I don't have an Azure China account to test the CLI auth scenario.

@magodo magodo added the question Further information is requested label Dec 19, 2023
@magodo
Copy link
Collaborator

magodo commented Dec 19, 2023

Update: I've successfully to make aztfexport work for China cloud via CLI auth, by the following steps:

  1. az cloud set --name AzureChinaCloud
  2. az login --service-principal <options>
  3. aztfexport <command> <options>

@m1rl0k
Copy link
Author

m1rl0k commented Dec 21, 2023

yes thank you this worked; however we had to export arm_environment: china and then all works with your metbod

@m1rl0k m1rl0k closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants