Code Monkey home page Code Monkey logo

Comments (4)

rjohnson318 avatar rjohnson318 commented on July 21, 2024

Thanks for the tool!! I am new to terraform and was referred here. I am attempting to use this tool in the Azure Government sector specifically usdodeast and I ran into a python error.
ENV details:
OS: CentOS 7.6

Package Versions:
azure-cli v2.0.71
Terraform v0.12.7
Python v2.7.5
export ARM_ENVIRONMENT=usgovernment

python2.7 ../../scripts/az2tf.py -s <subscriptionID> 2>&1 | tee -a import.log
Traceback (most recent call last):
  File "../../scripts/az2tf.py", line 4, in <module>
    import requests
ImportError: No module named requests
ImportError: No module named requests
Error in az2tf.py

Ok fixed that error and other import errors no module named ..... with pip install requests. Now getting :

python2.7 ../../scripts/az2tf.py -s <subscriptionID> 2>&1 | tee -a import.log
Get Access Token from CLI
Subscription: <subscriptionID>
Error getting subscription list
ErrorGettingSubscriptionList
Error getting subscription list
ErrorGettingSubscriptionList
Error in az2tf.py

from py-az2tf.

rjohnson318 avatar rjohnson318 commented on July 21, 2024

I tested the tool in the public cloud all is good but in the government cloud, I get the error getting subscription list errors. Somewhere in the code is missing where to find the gov subscriptions b/c it finds the public ones just fine.

from py-az2tf.

rjohnson318 avatar rjohnson318 commented on July 21, 2024

figured out that if I generate a token and use this command I can pull resources. I just don't know how to put that into the code in place of what is already there.

curl -X GET --header "Authorization: Bearer $token" https://management.usgovcloudapi.net/subscriptions/<subscriptionID>/resources?api-version=2019-05-10

from py-az2tf.

andyt530 avatar andyt530 commented on July 21, 2024

There would need to be a lot of changes to support Azure Gov. It's not on my priorities right now, not least as I don't have access.

If you want to have a go - you'd need to figure out the correct URL's and API versions for every REST api call that is made.

from py-az2tf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.