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

Support import for network interface #119

Merged

Conversation

thiagocaiubi
Copy link
Contributor

Addresses #25

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

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)
Copy link
Contributor

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

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @thiagocaiubi

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!

@tombuildsstuff tombuildsstuff merged commit 71485be into hashicorp:master Jun 22, 2017
tombuildsstuff added a commit that referenced this pull request Jun 22, 2017
@thiagocaiubi thiagocaiubi mentioned this pull request Jun 22, 2017
tombuildsstuff added a commit that referenced this pull request Jul 4, 2017
tombuildsstuff added a commit that referenced this pull request Jul 4, 2017
@ghost
Copy link

ghost commented Apr 1, 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 👉 hashibot-feedback@hashicorp.com. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants