import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * 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. * * > **Important Security Notice** While the `setTokenId` is `true` this data * source will store an *unencrypted* session token in your Terraform state file. * **Use of this data source with `setTokenId = true` in production deployments * is *not* recommended**. * Read more about sensitive data in state. * * ## Example Usage * * ### Simple * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const scope = openstack.identity.getAuthScope({ * name: "my_scope", * }); * ``` * * To find the the public object storage endpoint for "region1" as listed in the * service catalog: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * * const objectStoreService = .filter(entry => entry.type == "object-store").map(entry => (entry))[0]; * const objectStoreEndpoint = .filter(endpoint => endpoint["interface"] == "public" && endpoint.region == "region1").map(endpoint => (endpoint))[0]; * const objectStorePublicUrl = objectStoreEndpoint.url; * ``` * * ### In a combination with an http data source provider * * See [http](https://www.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) provider for reference. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const scope = openstack.identity.getAuthScope({ * name: "my_scope", * }); * ``` */ export declare function getAuthScope(args: GetAuthScopeArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getAuthScope. */ export interface GetAuthScopeArgs { /** * The name of the scope. This is an arbitrary name which is * only used as a unique identifier so an actual token isn't used as the ID. */ name: string; /** * The region in which to obtain the V3 Identity client. * A Identity client is needed to retrieve tokens IDs. If omitted, the * `region` argument of the provider is used. */ region?: string; /** * A boolean argument that determines whether to * export the current auth scope token ID. When set to `true`, the `tokenId` * attribute will contain an unencrypted token that can be used for further API * calls. **Warning**: please note that the leaked token may allow unauthorized * access to other OpenStack services within the current auth scope, so use this * option with caution. */ setTokenId?: boolean; } /** * A collection of values returned by getAuthScope. */ export interface GetAuthScopeResult { /** * The domain ID of the scope. */ readonly domainId: string; /** * The domain name of the scope. */ readonly domainName: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * The name of the service. */ readonly name: string; /** * The domain ID of the project. */ readonly projectDomainId: string; /** * The domain name of the project. */ readonly projectDomainName: string; /** * The project ID of the scope. */ readonly projectId: string; /** * The project name of the scope. */ readonly projectName: string; /** * The region of the endpoint. */ readonly region: string; /** * A list of roles in the current scope. See reference below. */ readonly roles: outputs.identity.GetAuthScopeRole[]; /** * A list of service catalog entries returned with the token. */ readonly serviceCatalogs: outputs.identity.GetAuthScopeServiceCatalog[]; readonly setTokenId?: boolean; /** * The token ID of the scope. */ readonly tokenId: string; /** * The domain ID of the user. */ readonly userDomainId: string; /** * The domain name of the user. */ readonly userDomainName: string; /** * The user ID the of the scope. */ readonly userId: string; /** * The username of the scope. */ readonly userName: string; } /** * 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. * * > **Important Security Notice** While the `setTokenId` is `true` this data * source will store an *unencrypted* session token in your Terraform state file. * **Use of this data source with `setTokenId = true` in production deployments * is *not* recommended**. * Read more about sensitive data in state. * * ## Example Usage * * ### Simple * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const scope = openstack.identity.getAuthScope({ * name: "my_scope", * }); * ``` * * To find the the public object storage endpoint for "region1" as listed in the * service catalog: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * * const objectStoreService = .filter(entry => entry.type == "object-store").map(entry => (entry))[0]; * const objectStoreEndpoint = .filter(endpoint => endpoint["interface"] == "public" && endpoint.region == "region1").map(endpoint => (endpoint))[0]; * const objectStorePublicUrl = objectStoreEndpoint.url; * ``` * * ### In a combination with an http data source provider * * See [http](https://www.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) provider for reference. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const scope = openstack.identity.getAuthScope({ * name: "my_scope", * }); * ``` */ export declare function getAuthScopeOutput(args: GetAuthScopeOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getAuthScope. */ export interface GetAuthScopeOutputArgs { /** * The name of the scope. This is an arbitrary name which is * only used as a unique identifier so an actual token isn't used as the ID. */ name: pulumi.Input; /** * The region in which to obtain the V3 Identity client. * A Identity client is needed to retrieve tokens IDs. If omitted, the * `region` argument of the provider is used. */ region?: pulumi.Input; /** * A boolean argument that determines whether to * export the current auth scope token ID. When set to `true`, the `tokenId` * attribute will contain an unencrypted token that can be used for further API * calls. **Warning**: please note that the leaked token may allow unauthorized * access to other OpenStack services within the current auth scope, so use this * option with caution. */ setTokenId?: pulumi.Input; } //# sourceMappingURL=getAuthScope.d.ts.map