* Cleanup some of the repo, prep for release

* Rework docs to new registry structure

* Add docs generator tooling

* Generate the docs

* update deps

* docs: add docs generation command to readme

Co-authored-by: Jeff Malnick <malnick@gmail.com>
This commit is contained in:
Paul TyngandJeff Malnick authored and GitHub committed 2020-10-06 17:34:16 -07:00
1 parent 7ee5c9c47b
commit 8bb38f1fd6
74 files changed
+1315 -1085

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
---
page_title: "Provider: Boundary"
subcategory: ""
description: |-
Terraform provider for configuring Boundary.
---
# Boundary Provider
Terraform provider for configuring Boundary.
## Example Usage
Do not keep your authentication password in HCL for production environments, use Terraform environment variables.
```terraform
provider "boundary" {
addr = "http://127.0.0.1:9200"
auth_method_id = "ampw_1234567890" # changeme
password_auth_method_login_name = "myuser" # changeme
password_auth_method_password = "passpass" # changeme
}
```
## Schema
### Required
- **addr** (String, Required) The base url of the Boundary API, e.g. "http://127.0.0.1". If not set, it will be read from the "BOUNDARY_ADDR" env var.
### Optional
- **auth_method_id** (String, Optional) The auth method ID e.g. ampw_1234567890
- **password_auth_method_login_name** (String, Optional) The auth method login name for password-style auth methods
- **password_auth_method_password** (String, Optional) The auth method password for password-style auth methods
- **recovery_kms_hcl** (String, Optional) Can be a heredoc string or a path on disk. If set, the string/file will be parsed as HCL and used with the recovery KMS mechanism. While this is set, it will override any other authentication information; the KMS mechanism will always be used.
- **token** (String, Optional) The Boundary token to use, as a string or path on disk containing just the string. If set, the token read here will be used in place of authenticating with the auth method specified in "auth_method_id", although the recovery KMS mechanism will still override this. Can also be set with the BOUNDARY_TOKEN environment variable.
+50
View File
@@ -0,0 +1,50 @@
---
page_title: "boundary_account Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The account resource allows you to configure a Boundary account.
---
# Resource `boundary_account`
The account resource allows you to configure a Boundary account.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
}
resource "boundary_auth_method" "password" {
scope_id = boundary_scope.org.id
type = "password"
}
resource "boundary_account" "jeff" {
auth_method_id = boundary_auth_method.password.id
type = "password"
login_name = "jeff"
password = "$uper$ecure"
}
```
## Schema
### Required
- **auth_method_id** (String, Required) The resource ID for the authentication method.
- **type** (String, Required) The resource type.
### Optional
- **description** (String, Optional) The account description.
- **id** (String, Optional) The ID of this resource.
- **login_name** (String, Optional) The login name for this account.
- **name** (String, Optional) The account name. Defaults to the resource name.
- **password** (String, Optional) The account password.
+43
View File
@@ -0,0 +1,43 @@
---
page_title: "boundary_auth_method Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The auth method resource allows you to configure a Boundary auth_method.
---
# Resource `boundary_auth_method`
The auth method resource allows you to configure a Boundary auth_method.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
}
resource "boundary_auth_method" "password" {
scope_id = boundary_scope.org.id
type = "password"
}
```
## Schema
### Required
- **scope_id** (String, Required) The scope ID.
- **type** (String, Required) The resource type.
### Optional
- **description** (String, Optional) The auth method description.
- **id** (String, Optional) The ID of this resource.
- **min_login_name_length** (Number, Optional) The minimum login name length.
- **min_password_length** (Number, Optional) The minimum password length.
- **name** (String, Optional) The auth method name. Defaults to the resource name.
+76
View File
@@ -0,0 +1,76 @@
---
page_title: "boundary_group Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The group resource allows you to configure a Boundary group.
---
# Resource `boundary_group`
The group resource allows you to configure a Boundary group.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
}
resource "boundary_user" "foo" {
description = "foo user"
scope_id = boundary_scope.org.id
}
resource "boundary_group" "example" {
name = "My group"
description = "My first group!"
member_ids = [boundary_user.foo.id]
scope_id = boundary_scope.org.id
}
```
Usage for project-specific group:
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
}
resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
}
resource "boundary_user" "foo" {
description = "foo user"
scope_id = boundary_scope.org.id
}
resource "boundary_group" "example" {
name = "My group"
description = "My first group!"
member_ids = [boundary_user.foo.id]
scope_id = boundary_scope.project.id
}
```
## Schema
### Required
- **scope_id** (String, Required) The scope ID in which the resource is created. Defaults to the provider's `default_scope` if unset.
### Optional
- **description** (String, Optional) The group description.
- **id** (String, Optional) The ID of this resource.
- **member_ids** (Set of String, Optional) Resource IDs for group members, these are most likely boundary users.
- **name** (String, Optional) The group name. Defaults to the resource name.
+51
View File
@@ -0,0 +1,51 @@
---
page_title: "boundary_host Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The host resource allows you to configure a Boundary static host. Hosts are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host.
---
# Resource `boundary_host`
The host resource allows you to configure a Boundary static host. Hosts are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
}
resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
}
resource "boundary_host" "example" {
name = "My catalog"
description = "My first host!"
address = "10.0.0.1"
scope_id = boundary_scope.project.id
}
```
## Schema
### Required
- **host_catalog_id** (String, Required)
- **type** (String, Required)
### Optional
- **address** (String, Optional) The static address of the host resource as `<IP>:<port>` or a domain name.
- **description** (String, Optional) The host description.
- **id** (String, Optional) The ID of this resource.
- **name** (String, Optional) The host name. Defaults to the resource name.
+50
View File
@@ -0,0 +1,50 @@
---
page_title: "boundary_host_catalog Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The host catalog resource allows you to configure a Boundary host catalog. Host catalogs are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host catalog.
---
# Resource `boundary_host_catalog`
The host catalog resource allows you to configure a Boundary host catalog. Host catalogs are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host catalog.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = boundary_scope.global.id
auto_create_role = true
}
resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
}
resource "boundary_host_catalog" "example" {
name = "My catalog"
description = "My first host catalog!"
type = "Static"
scope_id = boundary_scope.project.id
}
```
## Schema
### Required
- **scope_id** (String, Required) The scope ID in which the resource is created.
- **type** (String, Required) The host catalog type. Only `Static` (yes, title case) is supported.
### Optional
- **description** (String, Optional) The host catalog description.
- **id** (String, Optional) The ID of this resource.
- **name** (String, Optional) The host catalog name. Defaults to the resource name.
+72
View File
@@ -0,0 +1,72 @@
---
page_title: "boundary_host_set Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The host_set resource allows you to configure a Boundary host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
---
# Resource `boundary_host_set`
The host_set resource allows you to configure a Boundary host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
}
resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
}
resource "boundary_host_catalog" "static" {
scope_id = boundary_scope.project.id
}
resource "boundary_host" "1" {
name = "host_1"
description = "My first host!"
address = "10.0.0.1"
host_catalog_id = boundary_host_catalog.static.id
scope_id = boundary_scope.project.id
}
resource "boundary_host" "2" {
name = "host_2"
description = "My second host!"
address = "10.0.0.2"
host_catalog_id = boundary_host_catalog.static.id
scope_id = boundary_scope.project.id
}
resource "boundary_host_set" "web" {
host_catalog_id = boundary_host_catalog.static.id
host_ids = [
boundary_host.1.id,
boundary_host.2.id,
]
}
```
## Schema
### Required
- **host_catalog_id** (String, Required) The catalog for the hostset.
- **type** (String, Required)
### Optional
- **description** (String, Optional) The hostset description.
- **host_ids** (Set of String, Optional) The list of host IDs contained in this set.
- **id** (String, Optional) The ID of this resource.
- **name** (String, Optional) The hostset name. Defaults to the resource name.
+130
View File
@@ -0,0 +1,130 @@
---
page_title: "boundary_role Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The role resource allows you to configure a Boundary role.
---
# Resource `boundary_role`
The role resource allows you to configure a Boundary role.
## Example Usage
Basic usage:
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
}
resource "boundary_role" "example" {
name = "My role"
description = "My first role!"
scope_id = boundary_scope.org.id
}
```
Usage with a user resource:
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
}
resource "boundary_user" "foo" {
name = "User 1"
scope_id = boundary_scope.org.id
}
resource "boundary_user" "bar" {
name = "User 2"
scope_id = boundary_scope.org.id
}
resource "boundary_role" "example" {
name = "My role"
description = "My first role!"
principals = [boundary_user.foo.id, boundary_user.bar.id]
scope_id = boundary_scope.org.id
}
```
Usage with user and grants resource:
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
}
resource "boundary_user" "readonly" {
name = "readonly"
description = "A readonly user"
scope_id = boundary_scope.org.id
}
resource "boundary_role" "readonly" {
name = "readonly"
description = "A readonly role"
principals = [boundary_user.readonly.id]
grants = ["id=*;action=read"]
scope_id = boundary_scope.org.id
}
```
Usage for a project-specific role:
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
}
resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
}
resource "boundary_user" "readonly" {
name = "readonly"
description = "A readonly user"
scope_id = boundary_scope.org.id
}
resource "boundary_role" "readonly" {
name = "readonly"
description = "A readonly role"
principals = [boundary_user.readonly.id]
grants = ["id=*;action=read"]
scope_id = boundary_scope.project.id
}
```
## Schema
### Required
- **scope_id** (String, Required) The scope ID in which the resource is created. Defaults to the provider's `default_scope` if unset.
### Optional
- **default_role** (Boolean, Optional) Indicates that the role containing this value is the default role (that is, has the id 'r_default'), which triggers some specialized behavior to allow it to be imported and managed.
- **description** (String, Optional) The role description.
- **grant_scope_id** (String, Optional)
- **grant_strings** (Set of String, Optional) A list of stringified grants for the role.
- **id** (String, Optional) The ID of this resource.
- **name** (String, Optional) The role name. Defaults to the resource name.
- **principal_ids** (Set of String, Optional) A list of principal (user or group) IDs to add as principals on the role.
+76
View File
@@ -0,0 +1,76 @@
---
page_title: "boundary_scope Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The scope resource allows you to configure a Boundary scope.
---
# Resource `boundary_scope`
The scope resource allows you to configure a Boundary scope.
## Example Usage
Creating the global scope:
```terraform
resource "boundary_scope" "global" {
global_scope = true
scope_id = "global"
auto_create_role = true
}
```
Creating an organization scope within global:
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = boundary_scope.global.id
auto_create_role = true
}
```
Creating an project scope within an organization:
```terraform
resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
}
```
Creating an organization scope with a managed role for administration (auto create role set false):
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = boundary_scope.global.id
}
resource "boundary_role" "org_admin" {
scope_id = boundary_scope.global.id
grant_scope_id = boundary_scope.org.id
grant_strings = ["id=*;type=*;actions=*"]
principal_ids = ["u_auth"]
}
```
## Schema
### Required
- **scope_id** (String, Required) The scope ID containing the sub scope resource.
### Optional
- **auto_create_admin_role** (Boolean, Optional) If set, when a new scope is created, the provider will not disable the functionality that automatically creates a role in the new scope and gives permissions to manage the scope to the provider's user. Marking this true makes for simpler HCL but results in role resources that are unmanaged by Terraform.
- **auto_create_default_role** (Boolean, Optional) If set, when a new scope is created, the provider will not disable the functionality that automatically creates a role in the new scope and gives listing of scopes and auth methods and the ability to authenticate to the anonymous user. Marking this true makes for simpler HCL but results in role resources that are unmanaged by Terraform.
- **description** (String, Optional) The scope description.
- **global_scope** (Boolean, Optional) Indicates that the scope containing this value is the global scope, which triggers some specialized behavior to allow it to be imported and managed.
- **id** (String, Optional) The ID of this resource.
- **name** (String, Optional) The scope name. Defaults to the resource name.
+94
View File
@@ -0,0 +1,94 @@
---
page_title: "boundary_target Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The target resource allows you to configure a Boundary target.
---
# Resource `boundary_target`
The target resource allows you to configure a Boundary target.
## Example Usage
```terraform
resource "boundary_scope" "global" {
global_scope = true
scope_id = "global"
auto_create_role = true
}
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = boundary_scope.global.id
auto_create_role = true
}
resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
}
resource "boundary_host_catalog" "foo" {
name = "test"
description = "test catalog"
scope_id = boundary_scope.project.id
type = "static"
}
resource "boundary_host" "foo" {
name = "foo"
host_catalog_id = boundary_host_catalog.foo.id
scope_id = boundary_scope.project.id
address = "10.0.0.1"
}
resource "boundary_host" "bar" {
name = "bar"
host_catalog_id = boundary_host_catalog.foo.id
scope_id = boundary_scope.project.id
address = "10.0.0.1"
}
resource "boundary_host_set" "foo" {
name = "foo"
host_catalog_id = boundary_host_catalog.foo.id
host_ids = [
boundary_host.foo.id,
boundary_host.bar.id,
]
}
resource "boundary_target" "foo" {
name = "foo"
description = "Foo target"
default_port = "22"
scope_id = boundary_scope.project.id
host_set_ids = [
boundary_host_set.foo.id
]
}
```
## Schema
### Required
- **scope_id** (String, Required) The scope ID in which the resource is created. Defaults to the provider's `default_scope` if unset.
- **type** (String, Required) The target resource type.
### Optional
- **default_port** (Number, Optional) The default port for this target.
- **description** (String, Optional) The target description.
- **host_set_ids** (Set of String, Optional) A list of host set ID's.
- **id** (String, Optional) The ID of this resource.
- **name** (String, Optional) The target name. Defaults to the resource name.
- **session_connection_limit** (Number, Optional)
- **session_max_seconds** (Number, Optional)
+55
View File
@@ -0,0 +1,55 @@
---
page_title: "boundary_user Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The user resource allows you to configure a Boundary user.
---
# Resource `boundary_user`
The user resource allows you to configure a Boundary user.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
}
resource "boundary_auth_method" "password" {
scope_id = boundary_scope.org.id
type = "password"
}
resource "boundary_account" "jeff" {
auth_method_id = boundary_auth_method.password.id
type = "password"
login_name = "jeff"
password = "$uper$ecure"
}
resource "boundary_user" "jeff" {
name = "jeff"
description = "Jeff's user resource"
account_ids = [boundary_account.jeff.id]
scope_id = boundary_scope.org.id
}
```
## Schema
### Required
- **scope_id** (String, Required) The scope ID in which the resource is created. Defaults to the provider's `default_scope` if unset.
### Optional
- **account_ids** (Set of String, Optional) Account ID's to associate with this user resource.
- **description** (String, Optional) The user description.
- **id** (String, Optional) The ID of this resource.
- **name** (String, Optional) The username. Defaults to the resource name.