Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

azurerm_virtual_network_gateway_connection issue #50

Closed
pbosle opened this issue Feb 12, 2020 · 7 comments
Closed

azurerm_virtual_network_gateway_connection issue #50

pbosle opened this issue Feb 12, 2020 · 7 comments

Comments

@pbosle
Copy link

pbosle commented Feb 12, 2020

Hi everyone

I do get the following error:

azurerm_virtual_network_gateway_connection

4
Traceback (most recent call last):
File "../../scripts/az2tf.py", line 367, in
azurerm_virtual_network_gateway_connection.azurerm_virtual_network_gateway_connection(crf,cde,crg,headers,requests,sub,json,az2tfmess,cldurl)
File "/home/philippe/py-az2tf-master/scripts/azurerm_virtual_network_gateway_connection.py", line 104, in azurerm_virtual_network_gateway_connection
fr.write('\t peer_virtual_network_gateway_id = azurerm_virtual_network_gateway.' + peerrg +'__' + peernam + '.id\n')
UnboundLocalError: local variable 'peerrg' referenced before assignment
UnboundLocalError: local variable 'peerrg' referenced before assignment
Error in az2tf.py

Cheers Philippe

@andyt530
Copy link
Owner

andyt530 commented Feb 12, 2020

Hi Phiippe

Could you post the debug output - I should be able to fix it quickly then:

./az2tf.sh -s xxxxxxx -v yes -d yes -g [resource group where the gateway is]

Thanks

@pbosle
Copy link
Author

pbosle commented Feb 13, 2020

Hi Andy

Thanks for the fast reply. I have attached the output.

Cheers Philippe

debug.log

@andyt530
Copy link
Owner

attempt at a fix posted

@pbosle
Copy link
Author

pbosle commented Feb 14, 2020

Hi Andy

Thanks! It looks like the former issue is solved as I hit now at least another error (from terraform?):

_Warning: "location": [DEPRECATED] location is no longer used

on azurerm_virtual_machine_extension.dga-central-rg__vm-central-linux-1__AzureNetworkWatcherExtension.tf line 2, in resource "azurerm_virtual_machine_extension" "dga-central-rg__vm-central-linux-1__AzureNetworkWatcherExtension":
2: resource azurerm_virtual_machine_extension dga-central-rg__vm-central-linux-1__AzureNetworkWatcherExtension{

(and 6 more similar warnings elsewhere)

Warning: "resource_group_name": [DEPRECATED] This field has been deprecated and is no longer used - will be removed in 2.0 of the Azure Provider

on azurerm_virtual_machine_extension.dga-central-rg__vm-central-linux-1__AzureNetworkWatcherExtension.tf line 2, in resource "azurerm_virtual_machine_extension" "dga-central-rg__vm-central-linux-1__AzureNetworkWatcherExtension":
2: resource azurerm_virtual_machine_extension dga-central-rg__vm-central-linux-1__AzureNetworkWatcherExtension{

(and 6 more similar warnings elsewhere)

Warning: "virtual_machine_name": [DEPRECATED] This field has been deprecated in favor of virtual_machine_id - will be removed in 2.0 of the Azure Provider

on azurerm_virtual_machine_extension.dga-central-rg__vm-central-linux-1__AzureNetworkWatcherExtension.tf line 2, in resource "azurerm_virtual_machine_extension" "dga-central-rg__vm-central-linux-1__AzureNetworkWatcherExtension":
2: resource azurerm_virtual_machine_extension dga-central-rg__vm-central-linux-1__AzureNetworkWatcherExtension{

(and 6 more similar warnings elsewhere)

Error: Reference to undeclared resource

on azurerm_virtual_network_gateway_connection.dga-central-rg__conn-s2s-central-to-west.tf line 10, in resource "azurerm_virtual_network_gateway_connection" "dga-central-rg__conn-s2s-central-to-west":
10: peer_virtual_network_gateway_id = azurerm_virtual_network_gateway.dga-west-rg__vng-west-dmz-vpn.id

A managed resource "azurerm_virtual_network_gateway"
"dga-west-rg__vng-west-dmz-vpn" has not been declared in the root module._

Error Validating

Here is a new debug.log:
debug.log

For some reason the last output did not go into the debug.log:
A managed resource "azurerm_virtual_network_gateway"
"dga-west-rg__vng-west-dmz-vpn" has not been declared in the root module._

Error Validating

cheers Philippe

@andyt530
Copy link
Owner

Hi - fix posted for error.
I'll work through those warnings in the next few days - they are a new thing !

@pbosle
Copy link
Author

pbosle commented Feb 14, 2020

Hi Andy

Muchas gracias!

Philippe

@andyt530
Copy link
Owner

Warnings should have gone now
Closing - reopen if further issues

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

No branches or pull requests

2 participants