-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Support import for network interface #119
Support import for network interface #119
Conversation
make testacc TEST=./azurerm TESTARGS="-run TestAccAzureRMNetworkInterface_import" ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./azurerm -v -run TestAccAzureRMNetworkInterface_import -timeout 120m === RUN TestAccAzureRMNetworkInterface_importBasic --- PASS: TestAccAzureRMNetworkInterface_importBasic (117.50s) === RUN TestAccAzureRMNetworkInterface_importIPForwarding --- PASS: TestAccAzureRMNetworkInterface_importIPForwarding (116.48s) === RUN TestAccAzureRMNetworkInterface_importWithTags --- PASS: TestAccAzureRMNetworkInterface_importWithTags (126.00s) === RUN TestAccAzureRMNetworkInterface_importMultipleLoadBalancers --- PASS: TestAccAzureRMNetworkInterface_importMultipleLoadBalancers (156.05s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 516.124s
d.Set("applied_dns_servers", appliedDNSServers) | ||
d.Set("dns_servers", dnsServers) | ||
d.Set("enable_ip_forwarding", resp.EnableIPForwarding) | ||
d.Set("location", resp.Location) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: it'd be good to use:
d.Set("location", azureRMNormalizeLocation(*resp.Location))
here which ensures consistency in the statefile - I'll push this change in a follow up PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR - I've taken a look and this LGTM :)
The tests pass (ignoring an unrelated test failure, which I'll push a PR for separately):
$ TF_ACC=1 envchain azurerm go test ./azurerm -v -run TestAccAzureRMNetworkInterface -timeout 3
=== RUN TestAccAzureRMNetworkInterface_importBasic
--- PASS: TestAccAzureRMNetworkInterface_importBasic (118.24s)
=== RUN TestAccAzureRMNetworkInterface_importIPForwarding
--- PASS: TestAccAzureRMNetworkInterface_importIPForwarding (101.74s)
=== RUN TestAccAzureRMNetworkInterface_importWithTags
--- PASS: TestAccAzureRMNetworkInterface_importWithTags (116.74s)
=== RUN TestAccAzureRMNetworkInterface_importMultipleLoadBalancers
--- PASS: TestAccAzureRMNetworkInterface_importMultipleLoadBalancers (139.78s)
=== RUN TestAccAzureRMNetworkInterface_basic
--- PASS: TestAccAzureRMNetworkInterface_basic (101.66s)
=== RUN TestAccAzureRMNetworkInterface_disappears
--- PASS: TestAccAzureRMNetworkInterface_disappears (117.32s)
=== RUN TestAccAzureRMNetworkInterface_enableIPForwarding
--- PASS: TestAccAzureRMNetworkInterface_enableIPForwarding (102.37s)
=== RUN TestAccAzureRMNetworkInterface_multipleLoadBalancers
--- PASS: TestAccAzureRMNetworkInterface_multipleLoadBalancers (138.21s)
=== RUN TestAccAzureRMNetworkInterface_withTags
--- PASS: TestAccAzureRMNetworkInterface_withTags (133.94s)
=== RUN TestAccAzureRMNetworkInterface_bug7986
--- FAIL: TestAccAzureRMNetworkInterface_bug7986 (120.08s)
testing.go:428: Step 0 error: Check failed: Check 1/1 error: Not found: azurerm_network_interface.test
FAIL
exit status 1
FAIL github.com/terraform-providers/terraform-provider-azurerm/azurerm 1190.109s
Thanks!
Support import for network interface
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 👉 hashibot-feedback@hashicorp.com. Thanks! |
Addresses #25