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

Wrong references of unwanted resources #346

Closed
xescugc opened this issue Feb 23, 2023 · 0 comments · Fixed by #351
Closed

Wrong references of unwanted resources #346

xescugc opened this issue Feb 23, 2023 · 0 comments · Fixed by #351
Labels
Type: Bug Something isn't working

Comments

@xescugc
Copy link
Member

xescugc commented Feb 23, 2023

General information:

  • Operating System:
  • Terracognita version / tag:
  • Did you build Terracognita from sources or did you use the Docker image:

Describe the bug:

Sometimes 2 resources get referenced on the attributes because they have the same value, we should try to improve the logic to not just match the first one it founds, but the closer one.

For example

resource "azurerm_virtual_machine_data_disk_attachment" "test10_datadisks_nedisk102" {
  virtual_machine_id = azurerm_network_interface.networkinterfaces_test10336.virtual_machine_id
}

It should try to search for a resource that matches virtual_machine if possible instead of the first attribute it found that has the same value as if even this is valid HCL, during terraform runs this will not be (for example destroy and recreate)

Log message

Here you can paste the log message or paste the link to console logs. If the log message is too big, you can use a tool like https://pastebin.com/.

Additional context

Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant