openstack_identity_auth_scope_v3
openstack_identity_auth_scope_v3
к сведению
Эта инструкция — копия официальной документации OpenStack Terraform-провайдера в Terraform Registry.
Use this data source to get authentication information about the current auth scope in use. This can be used as self-discovery or introspection of the username or project name currently in use as well as the service catalog.
осторожно
While the set_token_id
is true
this data source will store an unencrypted session token in your Terraform state file. Use of this data source with set_token_id = true
in production deployments is not recommended. Read more about sensitive data in state.
Example Usage
Simple
data "openstack_identity_auth_scope_v3" "scope" {
name = "my_scope"
}
To find the the public object storage endpoint for "region1" as listed in the service catalog:
locals {
object_store_service = [for entry in data.openstack_identity_auth_scope_v3.scope.service_catalog:
entry if entry.type=="object-store"][0]
object_store_endpoint = [for endpoint in local.object_store_service.endpoints:
endpoint if (endpoint.interface=="public" && endpoint.region=="region1")][0]
object_store_public_url = local.object_store_endpoint.url
}
In a combination with an http data source provider
See http provider for reference.
data "openstack_identity_auth_scope_v3" "scope" {
name = "my_scope"
}