feat: use scope_id instead of project_id (#19)
This commit is contained in:
1 parent
0bcb0ed506
commit
c1069f7303
18 files changed
+499
-639
No files matched your search
@@ -17,7 +17,7 @@ Do not keep your authentication password in HCL for production environments, use
|
||||
```hcl
|
||||
provider "boundary" {
|
||||
base_url = "https://127.0.0.1:9200"
|
||||
default_organization = "o_0000000000"
|
||||
default_scope = "o_0000000000"
|
||||
auth_method_id = "am_1234567890"
|
||||
auth_method_username = "foo"
|
||||
auth_method_password = "bar"
|
||||
|
||||
@@ -18,9 +18,23 @@ resource "boundary_group" "example" {
|
||||
}
|
||||
```
|
||||
|
||||
Usage for project-specific group:
|
||||
|
||||
```hcl
|
||||
resource "boundary_project" "foo" {
|
||||
name = "foo_project"
|
||||
}
|
||||
|
||||
resource "boundary_group" "example" {
|
||||
name = "My group"
|
||||
description = "My first group!"
|
||||
scope_id = boundary_project.foo.id
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
The following arguments are optional:
|
||||
* `name` - The group name. Defaults to the resource name.
|
||||
* `description` - The group description.
|
||||
|
||||
* `name` - The group name. Defaults to the resource name.
|
||||
* `scope_id` - The scope ID in which the resource is created. Defaults to the provider's `default_scope` if unset.
|
||||
@@ -22,7 +22,7 @@ resource "boundary_host_catalog" "example" {
|
||||
name = "My catalog"
|
||||
description = "My first host catalog!"
|
||||
type = "Static"
|
||||
project_id = boundary_project.example.id
|
||||
scope_id = boundary_project.example.id
|
||||
}
|
||||
```
|
||||
|
||||
@@ -30,9 +30,8 @@ resource "boundary_host_catalog" "example" {
|
||||
|
||||
The following arguments are required:
|
||||
* `type` - The host catalog type. Only `Static` (yes, title case) is supported.
|
||||
* `project_id` - The project in which to create this host catalog.
|
||||
* `scope_id` - The scope ID in which the resource is created.
|
||||
|
||||
The following arguments are optional:
|
||||
* `name` - The host catalog name. Defaults to the resource name.
|
||||
* `description` - The host catalog description.
|
||||
|
||||
@@ -54,9 +54,32 @@ resource "boundary_role" "readonly" {
|
||||
}
|
||||
```
|
||||
|
||||
Usage for a project-specific role:
|
||||
|
||||
```hcl
|
||||
resource "boundary_project" "foo" {
|
||||
name = "foo_project"
|
||||
}
|
||||
|
||||
resource "boundary_user" "readonly" {
|
||||
name = "readonly"
|
||||
description = "A readonly user"
|
||||
}
|
||||
|
||||
resource "boundary_role" "readonly" {
|
||||
name = "readonly"
|
||||
description = "A readonly role"
|
||||
principals = [boundary_user.readonly.id]
|
||||
grants = ["id=*;action=read"]
|
||||
scope_id = boundary_project.foo.id
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
The following arguments are optional:
|
||||
* `name` - The role name. Defaults to the resource name.
|
||||
* `description` - The role description.
|
||||
* `grants` - A list of stringified grants for the role.
|
||||
* `name` - The role name. Defaults to the resource name.
|
||||
* `principals` - A list of principal (user or group) IDs to add as principals on the role.
|
||||
* `scope_id` - The scope ID in which the resource is created. Defaults to the provider's `default_scope` if unset.
|
||||
@@ -18,9 +18,19 @@ resource "boundary_user" "example" {
|
||||
}
|
||||
```
|
||||
|
||||
Usage for non-default organization (users are organization level only resources):
|
||||
|
||||
```hcl
|
||||
resource "boundary_user" "example" {
|
||||
name = "My user"
|
||||
description = "My first user!"
|
||||
scope_id = "o_1234567890"
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
The following arguments are optional:
|
||||
* `name` - The username. Defaults to the resource name.
|
||||
* `description` - The user description.
|
||||
|
||||
* `scope_id` - The scope ID in which the resource is created. Defaults to the provider's `default_scope` if unset.
|
||||
Reference in new issue
Block a user