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

Terraform import crashes for azurerm_private_link_service #5221

Closed
mbashtovaya opened this issue Dec 19, 2019 · 4 comments
Closed

Terraform import crashes for azurerm_private_link_service #5221

mbashtovaya opened this issue Dec 19, 2019 · 4 comments

Comments

@mbashtovaya
Copy link

Terraform import crashes for azurerm_private_link_service.
PLS is created using az cli in this case as the azure resource was not available until recently.

Command executed:
terraform import azurerm_private_link_service.pls /subscriptions/myS/resourceGroups/myRG/providers/Microsoft.Network/privateLinkServices/myPLS

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 (and AzureRM Provider) Version

Terraform v0.12.18

  • provider.azurerm v1.39.0
  • provider.null v2.1.2

Affected Resource(s)

  • azurerm_private_link_service

Terraform Configuration Files

# retrieve subnet details
data "azurerm_subnet" "lb" {
  name                 = "test"
  virtual_network_name = "myVNET"
  resource_group_name  = "myRG"
}
# Create Load Balancer and front IP configuration
resource "azurerm_lb" "lb" {
  name                = "myLB"
  resource_group_name = "myRG"
  location            = "East US2"
  sku                 = "standard"

  frontend_ip_configuration {
    name                          = "lb_frontend"
    subnet_id                     = data.azurerm_subnet.lb.id
    private_ip_address_allocation = "Static"
    private_ip_address			      = "10.253.92.22"
  }
}
resource "azurerm_private_link_service" "pls" {
  name                = "myPLS"
  resource_group_name = "myRG"
  location            = "East US2"
  load_balancer_frontend_ip_configuration_ids = [azurerm_lb.lb.frontend_ip_configuration.0.id]

  nat_ip_configuration {
    name                       = "primary"
    subnet_id                  = data.azurerm_subnet.lb.id
    primary                    = true
  }
}

Debug Output

<script src="https://gist.github.com/mb139h/de68e1c4cb880ff5ffe0f5a2a1357398.js"></script>

Panic Output

<script src="https://gist.github.com/mb139h/de68e1c4cb880ff5ffe0f5a2a1357398.js"></script>

Expected Behavior

terraform should successfully import existing PLS

Actual Behavior

terraform crashes

Steps to Reproduce

  1. Create vnet and subnet
  2. terraform import azurerm_private_link_service.pls /subscriptions/myS/resourceGroups/myRG/providers/Microsoft.Network/privateLinkServices/myPLS

Important Factoids

References

  • #0000
@mbashtovaya
Copy link
Author

@tombuildsstuff
Copy link
Contributor

Crash log:

2019-12-19T11:48:16.904-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: github.com/terraform-providers/terraform-provider-azurerm/azurerm.resourceArmPrivateLinkServiceRead(0xc0003e6a10, 0x37a05a0, 0xc000a48400, 0x0, 0x0)
2019-12-19T11:48:16.904-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/resource_arm_private_link_service.go:273 +0x7c5
2019-12-19T11:48:16.905-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc00067cd80, 0xc0008d6500, 0x37a05a0, 0xc000a48400, 0xc00000e9e8, 0x0, 0x0)
2019-12-19T11:48:16.905-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go:455 +0x119
2019-12-19T11:48:16.905-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc0001448f0, 0x447e260, 0xc000c5ca20, 0xc0008d6320, 0xc0001448f0, 0xc000c5ca20, 0xc0008ccbd0)
2019-12-19T11:48:16.905-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin/grpc_provider.go:525 +0x3d7
2019-12-19T11:48:16.906-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadResource_Handler(0x3b08160, 0xc0001448f0, 0x447e260, 0xc000c5ca20, 0xc000a9c060, 0x0, 0x447e260, 0xc000c5ca20, 0xc000aa0000, 0x1bd)
2019-12-19T11:48:16.906-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.pb.go:3153 +0x23e
2019-12-19T11:48:16.906-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002e0580, 0x44d2400, 0xc0004f0480, 0xc000a00000, 0xc000676cf0, 0x7f70530, 0x0, 0x0, 0x0)
2019-12-19T11:48:16.906-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:995 +0x466
2019-12-19T11:48:16.906-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc.(*Server).handleStream(0xc0002e0580, 0x44d2400, 0xc0004f0480, 0xc000a00000, 0x0)
2019-12-19T11:48:16.906-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:1275 +0xda6
2019-12-19T11:48:16.907-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0005b4530, 0xc0002e0580, 0x44d2400, 0xc0004f0480, 0xc000a00000)
2019-12-19T11:48:16.907-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:710 +0x9f
2019-12-19T11:48:16.907-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: created by github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc.(*Server).serveStreams.func1
2019-12-19T11:48:16.907-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.39.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:708 +0xa1

@mbashtovaya
Copy link
Author

This can be closed as it was resolved in the v2

@ghost
Copy link

ghost commented May 6, 2020

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 May 6, 2020
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