Code Monkey home page Code Monkey logo

Comments (7)

andyt530 avatar andyt530 commented on August 22, 2024 3

posted an attempt to fix

from py-az2tf.

andyt530 avatar andyt530 commented on August 22, 2024

Hi
We need to solve the first problem - please re-run capturing the debug output:

./az2tf.sh -s “id-sub” -v yes -d yes

(i need to see the json structure returned to see why that line ename=azr2[j]["name"] failed.)

The second issue looks like a temporary connection error - although using -f is complex as you must also use -r and understand the terraform dependancies - it's more a debugging tool than for general use.

from py-az2tf.

emanuelaguna avatar emanuelaguna commented on August 22, 2024

Hi Andy.
Here is the output with the error after use -d option:

# File generated by py-az2tf see: https://github.com/andyt530/py-az2tf
resource azurerm_virtual_machine production-asr__Production {
	 name = "Production"
	 location = "southcentralus"
	 resource_group_name = "PRODUCTION-ASR"
	 vm_size = "Standard_DS13_v2"
	 network_interface_ids = [
	 azurerm_network_interface.production-asr__production917.id,	]
	 primary_network_interface_id = azurerm_network_interface.production-asr__production917.id
	 delete_data_disks_on_termination = "false"
	 delete_os_disk_on_termination = "false"
storage_os_disk {
		name = "Production-Production"
		caching = "ReadWrite"
		create_option = "Attach"
		os_type = "Windows"
		 disk_size_gb = "127"
		vhd_uri = "https://gestionixproductionasr.blob.core.windows.net/asr-d70f02924194cad3ab/copied-%7B4182950656%7D.vhd"
}
tags = {
}
}

# azurerm_virtual_machine_extension
7
Traceback (most recent call last):
  File "../../scripts/az2tf.py", line 382, in <module>
    azurerm_virtual_machine_extension.azurerm_virtual_machine_extension(crf,cde,crg,headers,requests,sub,json,az2tfmess,cldurl)
  File "/py-az2tf/scripts/azurerm_virtual_machine_extension.py", line 51, in azurerm_virtual_machine_extension
    print(json.dumps(azr2[j], indent=4, separators=(',', ': ')))
IndexError: list index out of range
IndexError: list index out of range
Error in az2tf.py

from py-az2tf.

andyt530 avatar andyt530 commented on August 22, 2024

just posted another update - this will give me a little more debug output than the above

If you could please re-run the debug with that and post here.

from py-az2tf.

emanuelaguna avatar emanuelaguna commented on August 22, 2024

Andy, it seems I got the same output:

        "provisioningState": "Succeeded"
    }
}
# File generated by py-az2tf see: https://github.com/andyt530/py-az2tf
resource azurerm_virtual_machine production-asr__Production {
	 name = "Production"
	 location = "southcentralus"
	 resource_group_name = "PRODUCTION-ASR"
	 vm_size = "Standard_DS13_v2"
	 network_interface_ids = [
	 azurerm_network_interface.production-asr__production917.id,	]
	 primary_network_interface_id = azurerm_network_interface.production-asr__production917.id
	 delete_data_disks_on_termination = "false"
	 delete_os_disk_on_termination = "false"
storage_os_disk {
		name = "Production-Production"
		caching = "ReadWrite"
		create_option = "Attach"
		os_type = "Windows"
		 disk_size_gb = "127"
		vhd_uri = "https://gestionixproductionasr.blob.core.windows.net/asr-d70f02924194cad3ab/copied-%7B4182950656%7D.vhd"
}
tags = {
}
}

# azurerm_virtual_machine_extension
7
[]
Traceback (most recent call last):
  File "../../scripts/az2tf.py", line 382, in <module>
    azurerm_virtual_machine_extension.azurerm_virtual_machine_extension(crf,cde,crg,headers,requests,sub,json,az2tfmess,cldurl)
  File "/py-az2tf/scripts/azurerm_virtual_machine_extension.py", line 52, in azurerm_virtual_machine_extension
    ename=azr2[j]["name"]
IndexError: list index out of range
IndexError: list index out of range
Error in az2tf.py

from py-az2tf.

andyt530 avatar andyt530 commented on August 22, 2024

Not quite - the [] after the 7 tells me something !

from py-az2tf.

emanuelaguna avatar emanuelaguna commented on August 22, 2024

Hey Andy, It works!!!
Now I have another issue but it seems something different maybe it could be something with my subscription id or user role. Here is the output just to confirm. Thanks for the fix.

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: //subscriptions/xxxx-xxxx-xxxx-xxxx-xxxxxxx/resourceGroups/boa/providers/Microsoft.Web/sites/gx-boa-ms-users/config/appsettings/list?api-version=2018-02-01 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa7b5f08c18>: Failed to establish a new connection: [Errno -3] Try again',))
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7fa7b5f08c18>: Failed to establish a new connection: [Errno -3] Try again
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: //subscriptions/xxxxx-xxxx-xxxx-xxxxx-xxxxxxxxx/resourceGroups/boa/providers/Microsoft.Web/sites/gx-boa-ms-users/config/appsettings/list?api-version=2018-02-01 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa7b5f08c18>: Failed to establish a new connection: [Errno -3] Try again',))
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: //subscriptions/xxxx-xxx-xxxx-xxxx-xxxxxxxxxx/resourceGroups/boa/providers/Microsoft.Web/sites/gx-boa-ms-users/config/appsettings/list?api-version=2018-02-01 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa7b5f08c18>: Failed to establish a new connection: [Errno -3] Try again',))
Error in az2tf.py

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.