{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues/7","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues/7/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues/7/events","html_url":"https://github.com/terraform-providers/terraform-provider-openstack/issues/7","id":235632219,"number":7,"title":"Compute instance doesn't remember it's network.port in Openstack.","user":{"login":"hashibot","id":26720499,"avatar_url":"https://avatars2.githubusercontent.com/u/26720499?v=3","gravatar_id":"","url":"https://api.github.com/users/hashibot","html_url":"https://github.com/hashibot","followers_url":"https://api.github.com/users/hashibot/followers","following_url":"https://api.github.com/users/hashibot/following{/other_user}","gists_url":"https://api.github.com/users/hashibot/gists{/gist_id}","starred_url":"https://api.github.com/users/hashibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashibot/subscriptions","organizations_url":"https://api.github.com/users/hashibot/orgs","repos_url":"https://api.github.com/users/hashibot/repos","events_url":"https://api.github.com/users/hashibot/events{/privacy}","received_events_url":"https://api.github.com/users/hashibot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-13T17:39:26Z","updated_at":"2017-06-16T16:29:28Z","closed_at":null,"body":"_This issue was originally opened by @matthughes as hashicorp/terraform#7558. It was migrated here as part of the [provider split](https://www.hashicorp.com/blog/upcoming-provider-changes-in-terraform-0-10/). The original body of the issue is below._\r\n\r\n<hr>\r\n\r\n### Terraform Version\n\n0.6.16\n### Affected Resource(s)\n\nPlease list the resources as a list, for example:\n- openstack_compute_instance_v2\n### Terraform Configuration Files\n\n``` hcl\nresource \"openstack_compute_instance_v2\" \"test\" {\n  region = \"ndc_as_b\"\n  name = \"test_ports\"\n  image_name = \"ubuntu\"\n  flavor_name = \"m1.medium\"\n\n  network  {\n    name = \"Public_AGILE\"\n  }\n  key_pair = \"test\"\n}\n```\n### Expected Behavior\n\nI should be able to reference a VIPs `self.network.0.port`\n### Actual Behavior\n\nPort isn't defined:\n\n```\nterraform show\nterraform show\nopenstack_compute_instance_v2.k8s_vip:\n...\n  network.# = 1\n  network.0.access_network = false\n  network.0.fixed_ip_v4 = 96.118.55.135\n  network.0.fixed_ip_v6 = [2001:558:fc11:1:f816:3eff:fea6:8ce0]\n  network.0.floating_ip =\n  network.0.mac = fa:16:3e:a6:8c:e0\n  network.0.name = Public_AGILE\n  network.0.port =\n  network.0.uuid = 3ab7132d-d0b7-4cb2-94a2-e105f728c796\n```\n\nNote that the uuid listed is the network uuid.  The port UUID is undefined.\n\nMy current work around is to 1) create a port resource 2) assign that port resource to the network.  This doesn't really work very well.  At least in my OS install, when a compute instance gets deleted, it cascade deletes the attached port.\n### Steps to Reproduce\n\nPlease list the steps required to reproduce the issue, for example:\n1. `terraform apply`\n"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues/comments/309072223","html_url":"https://github.com/terraform-providers/terraform-provider-openstack/issues/7#issuecomment-309072223","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues/7","id":309072223,"user":{"login":"fatmcgav","id":2235170,"avatar_url":"https://avatars1.githubusercontent.com/u/2235170?v=3","gravatar_id":"","url":"https://api.github.com/users/fatmcgav","html_url":"https://github.com/fatmcgav","followers_url":"https://api.github.com/users/fatmcgav/followers","following_url":"https://api.github.com/users/fatmcgav/following{/other_user}","gists_url":"https://api.github.com/users/fatmcgav/gists{/gist_id}","starred_url":"https://api.github.com/users/fatmcgav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatmcgav/subscriptions","organizations_url":"https://api.github.com/users/fatmcgav/orgs","repos_url":"https://api.github.com/users/fatmcgav/repos","events_url":"https://api.github.com/users/fatmcgav/events{/privacy}","received_events_url":"https://api.github.com/users/fatmcgav/received_events","type":"User","site_admin":false},"created_at":"2017-06-16T16:29:28Z","updated_at":"2017-06-16T16:29:28Z","body":"@matthughes The cascade deletion of associated resources is something I've hit aswell - See https://github.com/hashicorp/terraform/issues/13365 for the discussion around that. Currently, there doesn't seem to be a suitable way of modelling those sort of dependencies and behaviours in TF...\r\n\r\nWith regards to `network.0.port` not being populated, that may be related to #5. \r\nAt the moment, creating the `port` resource separately seems to be the generally accepted best practise, obviously with the understanding that destroying instances will also destroy some connected resources, such as ports and volumes.\r\n\r\n@jtopjian Care to add anything?\r\n\r\n "}}
{"actor":{"display_login":"fatmcgav"}}