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

Resource Group and VNET Names Swapped in Not Found Error #2016

Closed
beh9540 opened this issue Oct 3, 2018 · 5 comments
Closed

Resource Group and VNET Names Swapped in Not Found Error #2016

beh9540 opened this issue Oct 3, 2018 · 5 comments

Comments

@beh9540
Copy link
Contributor

beh9540 commented Oct 3, 2018

The error message in data.azurerm_subnet not found has resource group where vnet should be and vice versa.

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

0.11.8

Affected Resource(s)

  • azurerm_subnet

Terraform Configuration Files

# Find the subnet
data "azurerm_subnet" "subnet" {
  name                 = "${var.subnet_name}"
  virtual_network_name = "${data.azurerm_virtual_network.api_vnet.name}"
  resource_group_name  = "${var.resource_group_name}"
}

Debug Output

Panic Output

Expected Behavior

Error: Error refreshing state: 1 error(s) occurred:

  • module.apis.data.azurerm_subnet.api_subnet_aks: 1 error(s) occurred:

  • module.apis.data.azurerm_subnet.api_subnet_aks: data.azurerm_subnet.api_subnet_aks: Error: Subnet "subnet" (Virtual Network "VNET_NAME" / Resource Group "RESOURCE_GROUP_NAME") was not found

Actual Behavior

Error: Error refreshing state: 1 error(s) occurred:

  • module.apis.data.azurerm_subnet.api_subnet_aks: 1 error(s) occurred:

  • module.apis.data.azurerm_subnet.api_subnet_aks: data.azurerm_subnet.api_subnet_aks: Error: Subnet "subnet" (Virtual Network "RESOURCE_GROUP_NAME" / Resource Group "VNET_NAME") was not found

Steps to Reproduce

  1. terraform plan

Important Factoids

None

References

  • #0000
@tombuildsstuff
Copy link
Contributor

Fixed via #2017 - thanks @beh9540 :)

@arcotek-ltd
Copy link

Hi,
I'm seeing exactly the same error. Init pulls down version 1.16. Is this the fixed version? If not, is there a way to force it to get the fixed version?

Thanks

@arcotek-ltd
Copy link

arcotek-ltd commented Oct 10, 2018

Ok, I've found the changelog and I see this issue is in 1.17.0 which is currently unreleased.

I've also found that I should be able to add version = ">= 1.17.0" to get it to use 1.17.0, as described here, however, it's still using the broken version.

Any suggestions? Any idea when 1.17.0 will be release?

Thanks

@arcotek-ltd
Copy link

It seems like this is also happening for azurerm_virtual_network:

Error: Error refreshing state: 1 error(s) occurred:

* data.azurerm_virtual_network.shared: 1 error(s) occurred:

* data.azurerm_virtual_network.shared: data.azurerm_virtual_network.shared: Error: Virtual Network "$(var.shared_virtual_network_name)" (Resource Group "$(var.shared_resource_group_name)") was not found

@ghost
Copy link

ghost commented Mar 6, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants