You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write some modules for OpenStack resources, and the openstack_compute_instance_v2 resource doesn't take a project/tenant argument. Instead it seems to only create the instance in the project authenticated to in the provider configuration.
Within the module, I would like to up at least the project that I'm authenticated against. While I can pass the project name to each module use the data source by name, but I'd prefer if there is a way to do access the provisioner details or use a data source on the current provisioner.
the openstack_compute_instance_v2 resource doesn't take a project/tenant argument. Instead it seems to only create the instance in the project authenticated to in the provider configuration.
This is correct. The OpenStack Compute API does not support project scoping per resource like the Networking API does.
The openstack_identity_auth_scope_v3 data source will retrieve information about the current authenticated use (ie: the user configured in the provider). Does this help?
Wellllll that's exactly what I was looking for! With the amount of googling I did over the last two days I'm rather annoyed I didn't happen upon that myself. Thanks.
PS - I meant to put data "openstack_identity_project_v3" "current" in the example module code.
I'm trying to write some modules for OpenStack resources, and the
openstack_compute_instance_v2
resource doesn't take a project/tenant argument. Instead it seems to only create the instance in the project authenticated to in the provider configuration.Within the module, I would like to up at least the project that I'm authenticated against. While I can pass the project name to each module use the data source by name, but I'd prefer if there is a way to do access the provisioner details or use a data source on the current provisioner.
Terraform Version
Terraform Configuration Files
Caller
Module
Using the data resource with no arguments appears to return the full list of projects visible to the user I'm authenticating as.
References
hashicorp/terraform#9221
The text was updated successfully, but these errors were encountered: