Comments (22)
it's the quotes around the Group causing the problem - I've committed an attempt to fix it, please try again.
from py-az2tf.
Thanks I now get:
Traceback (most recent call last): File "../../scripts/az2tf.py", line 385, in <module> azurerm_virtual_machine_scale_set.azurerm_virtual_machine_scale_set(crf,cde,crg,headers,requests,sub,json,az2tfmess,cldurl) File "/py-az2tf/scripts/azurerm_virtual_machine_scale_set.py", line 247, in azurerm_virtual_machine_scale_set ddname = datadisks["name"] TypeError: list indices must be integers or slices, not str TypeError: list indices must be integers or slices, not str Error in az2tf.py
from py-az2tf.
fix posted please give it another go
from py-az2tf.
Getting there ;)
Traceback (most recent call last): File "../../scripts/az2tf.py", line 431, in <module> azurerm_function_app.azurerm_function_app(crf,cde,crg,headers,requests,sub,json,az2tfmess,cldurl) File "/py-az2tf/scripts/azurerm_function_app.py", line 143, in azurerm_function_app fr.write('\t version = "' + vers + '"\n') UnboundLocalError: local variable 'vers' referenced before assignment UnboundLocalError: local variable 'vers' referenced before assignment Error in az2tf.py
from py-az2tf.
another fix posted :-)
from py-az2tf.
Thanks for your efforts Andy,
fqdns again.
Error: Invalid number literal
on azurerm_application_gateway.grp.tf line 30, in resource "azurerm_application_gateway" "test__grp":
30: fqdns = x.x.x.x
Failed to recognize the value of this number literal.
Error: Attribute redefined
on azurerm_application_gateway.grp.tf line 31, in resource "azurerm_application_gateway" "test__grp":
31: fqdns = x.x.x.x
The argument "fqdns" was already set at
azurerm_application_gateway.grp.tf:30,3-8. Each argument may be
set only once.
from py-az2tf.
will need the debug output on that one please
from py-az2tf.
reproduced your issue here - fix posted
from py-az2tf.
Sorry got bogged down in something else
[{'ipAddress': 'x.x.x.x'}, {'ipAddress': 'x.x.x.x'}]
Traceback (most recent call last):
File "../../scripts/az2tf.py", line 361, in <module>
azurerm_application_gateway.azurerm_application_gateway(crf,cde,crg,headers,requests,sub,json,az2tfmess,cldurl)
File "/scripts/azurerm_application_gateway.py", line 205, in azurerm_application_gateway
fr.write('\t path = "' + bhtpath + '"\n')
TypeError: can only concatenate str (not "NoneType") to str
TypeError: can only concatenate str (not "NoneType") to str
Error in az2tf.py
from py-az2tf.
More complicated to fix than I thought - another attempt posted - thanks for your patience with this.
from py-az2tf.
np u got nothing else todo on a Sunday ;)
Error: Error parsing /py-az2tf/generated/tf.8999dec3-0104-4a27-94ee-6588559729d1/azurerm_app_service_slot.bard-api-grp__bard-api-grp__staging.tf: At 5:25: Unknown token: 5:25 IDENT azurerm_resource_group.bard-api-grp.name
Error with terraform init
sorry not possible to upload debug
in that .tf file:
resource azurerm_app_service_slot bard-api-grp__bard-api-grp__test {
name = "test"
...
resource_group_name = azurerm_resource_group.bard-api-grp.name
from py-az2tf.
Think that one is a case issue with the resource group name could you do:
$ cd generated/tf.8999dec3-0104-4a27-94ee-6588559729d1
$ terraform state list | grep resource_group
and post the output of whatever it says for the resource group "bard-api-grp" or "BARD-API-GRP" or what ever else it lists
Thanks
from py-az2tf.
Might also be worth clearing out (rm -rf tf.8999dec3-0104-4a27-94ee-6588559729d1) as - there shouldn't be any .tf files hanging around in there at the "terraform init" step.
from py-az2tf.
re-cloned, get same error on tf state list
Failed to load backend: Error loading backend config: Error parsing /py-az2tf/generated/tf.8999dec3-0104-4a27-94ee-6588559729d1/azurerm_app_service_slot.bard-api-grp__bard-api-grp__test.tf:
At 5:25: Unknown token: 5:25 IDENT azurerm_resource_group.bard-api-grp.name
think this is the app service slot name?
in GUI it reads:
test (bard-api-grp/test)
App Service (Slot)
this is in RG: bard-api-grp
from py-az2tf.
ok - backed out some of the name de-referencing of "name" values in app slots - simpler but not elegant. Lets see if that gets us past this issue in azurerm_app_service_slot
from py-az2tf.
it does, agw again.
resource azurerm_application_gateway nom-net-prod__nom-net-prod {
…
gateway_ip_configuration {
name = "appGatewayIpConfig"
subnet_id = azurerm_subnet.main-inf-grp__nom-net.id <---- Unknown token: IDENT
}
from py-az2tf.
id is:
"id": "[concat(parameters('virtualNetworks_main_inf_vnet_grp_externalid'), '/subnets/nom-net')]"
from py-az2tf.
Hi,
I'm going to need the output of ./az2tf.sh -s xxxxx -v yes -d yes
To progress that one.
from py-az2tf.
no easy way to scrub output i'm afraid
from py-az2tf.
Ok - how about:
terraform state list | grep azurerm_subnet
Look for the relevant subnet we're trying to reference in the gateway and paste that line here.
Then also look at the "source of truth" for az2tf - login to
https://resources.azure.com
select your subscription
& resource group
& providers
& Microsoft.Net
& applicationGateways
& your-gateway (nom-net-prod)
Look in there for the gatewayIPConfiguration block and
"subnet" : { within and on the next line
"id" : {
And paste the value of that id line here (you can remove the subscription id) - but I need to see the rest of it along with the terraform state list from above to see if they match and if not why not.
from py-az2tf.
do the terraform state list from the generated/tf.xxxxxxxxxxxxxxxx directory
from py-az2tf.
Project archived with the release of the 2.0 azurerm providers
from py-az2tf.
Related Issues (20)
- Invalid escape sequence HOT 3
- Error in az2tf.py Unicode for Policy info HOT 3
- ValueError malformed string in ast.py HOT 5
- Support for other Azure Clouds HOT 3
- Support for Python 3 HOT 1
- Warning: "network_security_group_id": [DEPRECATED] Use the `azurerm_subnet_network_security_group_association` resource instead. HOT 1
- Traffic manager endpoint issue with app service as type HOT 23
- IndexError: list index out of range HOT 7
- Error HOT 17
- Error naming slots resources HOT 1
- The argument "fqdns" was already set at fqdns = ["x.x.x.x"] HOT 2
- azurerm_virtual_network_gateway_connection issue HOT 7
- Azure Role Definition Import fails when role definition has no description HOT 1
- terraform validate fails because storage profile block is never created in vmss import HOT 1
- KeyError for loadBalancerBackendAddressPools in vmss HOT 1
- Invalid multi-line string error HOT 4
- Azurerm 2.0 fails to validate HOT 1
- Tool isnt working
- Still active? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-az2tf.