terraform-provider-openstack: Error with os-tenant-networks
I think a recent change in v0.2.0 caused a weird error for me.
I was able to do terraform plan and terraform apply to bring up a VM on openstack successfully. I then tried to do terraform destroy, and got this error:
openstack_compute_instance_v2.instance: Refreshing state... (ID: 732f11df-e122-4918-9554-42eff4de533e)
openstack_compute_floatingip_v2.ip: Refreshing state... (ID: 833)
Error refreshing state: 1 error(s) occurred:
* module.fe_master.module.compute.openstack_compute_instance_v2.instance: 1 error(s) occurred:
* module.fe_master.module.compute.openstack_compute_instance_v2.instance: openstack_compute_instance_v2.instance: Error trying to get network information from the Nova API: An error occured while querying the Nova API for network information: Expected HTTP response code [200 204] when accessing [GET https://openstack.url/v2.1/ec64afd6f5e547bb8b1a503cc08e2c7f/os-tenant-networks], but got 403 instead
{"forbidden": {"message": "Policy doesn't allow os_compute_api:os-tenant-networks to be performed.", "code": 403}}
Then when I do terraform plan again, I see the same error.
I checked with our cloud infrastructure team and they said that they do not allow access on os_compute_api:os-tenant-networks because they don’t want me to delete tenant networks.
Is this a bug? I just want to delete the compute instance and floating IP, but not the network.
I think this might be due to https://github.com/terraform-providers/terraform-provider-openstack/commit/52adfae4febe4dba1cde5652fd382d9b2e5a69e5, but I’m not sure.
Terraform Version
v0.10.1
Affected Resource(s)
Please list the resources as a list, for example:
openstack_compute_instance_v1.instance
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 35 (16 by maintainers)
That’s actually a really good question. There’s only one place where a connection to the network service should be made and that’s during Create.
I’m going to have to dig into this a little more. Give me a day or so and I’ll get back to you.