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

Exit Code 1 #315

Closed
John-Donalson opened this issue Nov 29, 2022 · 12 comments
Closed

Exit Code 1 #315

John-Donalson opened this issue Nov 29, 2022 · 12 comments
Labels
question Further information is requested

Comments

@John-Donalson
Copy link

Unable to copy exact text, but as executing against a RG, getting exit code 1 cannot connect to terraform registry; afterwards when trying to aztfy specific RG, starts to list resources and skips to command line on both interactive and --non. all other RGs in subscription work, only 2 (out of 8) specifically this occurs with. Nothing I can notice in common or out of place...

@magodo magodo added the question Further information is requested label Nov 30, 2022
@magodo
Copy link
Collaborator

magodo commented Nov 30, 2022

@John-Donalson Thank you for submitting this!

For cannot connect to terraform registry, this is an error from terraform itself, usually indicates the network problem when connecting to the terraform registry.

For starts to list resources and skips to command line, can you please run it with --log-path <path2log>, and attach the log here so that I can further investigate?

@magodo
Copy link
Collaborator

magodo commented Dec 1, 2022

@John-Donalson The logs look good to me, it just stops after listing the resources via ARG. Do you see anything output from the command line?

@John-Donalson
Copy link
Author

negative; command line goes blank back to prompt and only a provider file, tf directory are made (no main.tf, etc generated)

@John-Donalson
Copy link
Author

so i dont get the interactive option to import, if i use -n -k, same thing lists reaources then crashes back to prompt and nothing is actually generated in the directory.

@magodo
Copy link
Collaborator

magodo commented Dec 1, 2022

@John-Donalson crash back, do you mean there is some panic log printed in the terminal? Would you mind provide a screen shot?

@John-Donalson
Copy link
Author

no panic log printed; just stops and gives me an empty c prompt in my directory like before i ran the command. usually if it terrafys the resource i get a count or some output or the generation message.. ill try to provide a screenshot in the morning

@magodo
Copy link
Collaborator

magodo commented Dec 1, 2022

@John-Donalson We didn't instrument too much information in the log at this moment, I plan to add more logs in the future to make the log helpful. Right now, are you able to debug the tool to see when it was quit? From the log, it entered: https://github.com/magodo/azlist/blob/005f5e4c380423ea88b796aa138400d73d65adc0/azlist/azlist.go#L75, but didn't see any log which are expected to print from https://github.com/magodo/azlist/blob/005f5e4c380423ea88b796aa138400d73d65adc0/azlist/azlist.go#L91.

@magodo
Copy link
Collaborator

magodo commented Dec 1, 2022

@John-Donalson I've made a PR (#317) to add more logs to aztfy, do you want to check it out and run again?

@John-Donalson
Copy link
Author

going to rerun this again and try to debug; this is only on my latin america/asia subscriptions as well; going to try to log what happens with the four total resource groups that have this issue

@magodo
Copy link
Collaborator

magodo commented Dec 2, 2022

@John-Donalson The first picture indicates you are still in aztfy's TUI. The second picture indicates a network problem on your environment.

@John-Donalson
Copy link
Author

the first picture usually i can select the resource or hit w to import… not back to enter any command. it lists resources but never counts or actually generates the files. the second picture … okay but if i aztfy any other resource group under the sub it works. mind you; this sub has 8 resources 6 of which will go perfectly up until last two.

for now i extracted the log, converted to json and am manually converting these to terraform by hand. i just dont understand why it will give me provider.tf, the lock file, but refuses to make me a main.tf

@John-Donalson
Copy link
Author

deleting logs due to contents of ip data though. thanks :/ sorry couldnt provide more useful errors

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