When using "terraform import" on an already existing machine, the "networks" attribute is not created in the terraform.tfstate file. This causes terraform to think that the network needs to modified upon running "terraform plan".
Terraform should pull the networks attribute similar to how the nic attributes are created on import.
Actual Behavior
Terraform does not currently create a networks attribute which causes terraform to report that it will modify the network when running "terraform plan". These are snippets from debug output:
Terraform will perform the following actions:
~ triton_machine.network-test4
networks.#: "0" => "1"
networks.0: "" => "bedef3af-49b1-445c-b3ac-0b7f0112afcf"
Plan: 0 to add, 1 to change, 0 to destroy.
triton_machine.network-test4: Modifying... (ID: 3773107d-8396-e319-820f-f17448ecd7b3)
networks.#: "0" => "1"
networks.0: "" => "bedef3af-49b1-445c-b3ac-0b7f0112afcf"
Error: Error applying plan:
1 error(s) occurred:
* triton_machine.network-test4: 1 error(s) occurred:
* triton_machine.network-test4: unable to add NIC to machine: unable to decode error response: EOF
Hello,
When using "terraform import" on an already existing machine, the "networks" attribute is not created in the terraform.tfstate file. This causes terraform to think that the network needs to modified upon running "terraform plan".
Terraform Version
Terraform version: 0.11.7 Triton provider: 0.5.1
Terraform Configuration Files
Terraform.tfstate file: https://gist.github.com/amalleo25/ed6400e04d1a5300d8d9458b5b4eb0c1#file-terraform-tfstate
Debug Output
https://gist.github.com/amalleo25/226b93c44873d9197d5f2eeb90b40f64#file-terraform-debug-txt
Expected Behavior
Terraform should pull the networks attribute similar to how the nic attributes are created on import.
Actual Behavior
Terraform does not currently create a networks attribute which causes terraform to report that it will modify the network when running "terraform plan". These are snippets from debug output:
Steps to Reproduce
terraform import triton_machine.network-test4 3773107d-8396-e319-820f-f17448ecd7b3
terraform plan
terraform apply
Important Factoids
This is on a private instance of triton not the triton public cloud.
Thank you.