-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Openstack provider / openstack_compute_instance_v2 resources do not export access_ip_vX addresses since v0.6.11 #5358
Comments
I'm quite positive this is a Rackspace issue. I just used 0.6.12 yesterday to register an However, with that said, if it worked before with Rackspace, maybe it can work again. There were some changes to how fixed and floating IPs were used starting in 0.6.11. Are you using a Can you also post the Terraform configuration you're using? |
Unfortunately adding access_network = true to the network block I want to use for the access_ip_v4 didn't have any effect. Tried again with 0.6.10 (without the access_network param) and worked fine. This is the Terraform config for one of the compute resources: resource "openstack_compute_instance_v2" "test-instance" { The access ip should be computed, and I can still ssh to the server just fine, I just can't get the ip back from terraform, as it is empty in the state file. Everything else works fine. |
@jtopjian I've just compiled the openstack provider from source, after updating the code with your changes, and it works fine now. I can retrieve the access IPs properly. Many thanks for taking the time to look into this. I hope that this makes it through to the next Terraform release; in the meantime we'll probably have to work with v0.6.10. Again, many thanks for your help! |
@bkarypid That's great news! I've just merged the code in, so it'll definitely be part of 0.6.13 when it's released. Until then feel free to use the binary you compiled :) |
@bkarypid Also, it's very interesting to know that you're using the OpenStack provider successfully with Rackspace. I think you're the first to mention that (though others may be doing it). Can you provide any customizations you do with your provider and resource configurations? I could add it to the documentation for other users to follow. 😄 |
@jtopjian Unfortunately I'm not doing anything too fancy really. The issue about not being able to create networking resources for Rackspace with Terraform (for the reason mentioned here: #1560) still persists and, in addition, security groups can't be created as well, I believe because Rackspace expects an API call to /security-groups, but I think Terraform uses the default Openstack endpoint /os-security-groups. That being said, we can still create networks (and probably other resources that might not be possible to create through Terraform at the moment) by means outside from Terraform (eg. through the Rackspace console or via the nova client) and then pass the IDs and names into the appropriate Terraform variables, so that they can be referenced in the network blocks of the compute instances. If the Rackspace provider is completed it would be great of course, but this still isn't an extreme compromise, given for example that instances can be provisioned without any issues through Terraform. In terms of config, nothing really special in the provider configuration; an auth_url with the value of https://identity.api.rackspacecloud.com/v2.0 along with a region (for example LON) will be fine, provided that user_name password and tenant_name are provided correctly. For more details on resource config you could have a look at the repo I referenced above (though as I said, nothing quite fancy). |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I upgraded to version 0.6.11 from 0.6.3 and I noticed that the openstack_compute_instance_v2 resources do not export the access_ip_v4 and v6 addresses anymore. An excerpt from my terraform.tfstate file:
...................................................................................................................................
I tried with v0.6.12 and the issue remains. It works fine in versions 0.6.10 and below with the exact same config (i tried with 0.6.3 and 0.6.10 and the access IPs were exported properly), so something must have been introduced in the Openstack provider in v0.6.11 that causes this issue.
FYI this might only affect the Rackspace implementation of Openstack (I've only tried it in Rackspace), so I understand that there are differences anyway, however until v0.6.10 I was able to retrieve these values without any problems.
Any thoughts?
The text was updated successfully, but these errors were encountered: