* add scope datasource, tests, and docs * add details on the global scope to docs
43 lines
1.0 KiB
Markdown
43 lines
1.0 KiB
Markdown
---
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
|
page_title: "boundary_scope Data Source - terraform-provider-boundary"
|
|
subcategory: ""
|
|
description: |-
|
|
The scope data source allows you to discover an existing Boundary scope by name.
|
|
---
|
|
|
|
# boundary_scope (Data Source)
|
|
|
|
The scope data source allows you to discover an existing Boundary scope by name.
|
|
Please note that the Global scope will always have an id of "global", and does not need to be discovered with this data source.
|
|
|
|
## Example Usage
|
|
|
|
Basic usage:
|
|
|
|
```terraform
|
|
data "boundary_scope" "org" {
|
|
name = "SecOps"
|
|
parent_scope_id = "global"
|
|
}
|
|
|
|
data "boundary_scope" "project" {
|
|
name = "2111"
|
|
parent_scope_id = data.boundary_scope.id
|
|
}
|
|
```
|
|
|
|
|
|
<!-- schema generated by tfplugindocs -->
|
|
## Schema
|
|
|
|
### Required
|
|
|
|
- `name` (String) The name of the scope to retrieve.
|
|
- `scope_id` (String) The parent scope ID that will be queried for the scope.
|
|
|
|
### Read-Only
|
|
|
|
- `description` (String) The description of the retrieved scope.
|
|
- `id` (String) The ID of the retrieved scope.
|