Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs and Makefile target #57

Merged
merged 5 commits into from
Oct 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
default: update-deps testacc
default: testacc
GOOS=$(shell go env GOOS)
GOARCH=$(shell go env GOARCH)
INSTALL_PATH=~/.local/share/terraform/plugins/localhost/providers/boundary/0.0.1/linux_$(GOARCH)
Expand All @@ -11,8 +11,10 @@ ifeq ($(GOOS), "windows")
INSTALL_PATH=%APPDATA%/HashiCorp/Terraform/plugins/localhost/providers/boundary/0.0.1/windows_$(GOARCH)
endif

tools:
go generate -tags tools tools/tools.go

# Run acceptance tests
.PHONY: testacc
testacc:
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m

Expand All @@ -22,9 +24,6 @@ testacc-ci: install-go

install-go:
./ci/goinstall.sh

update-deps:
GOPROXY=direct GOSUMDB=off go get -u

dev:
mkdir -p $(INSTALL_PATH)
Expand All @@ -38,3 +37,5 @@ all:

rm-id-flag-from-docs:
find docs/ -name "*.md" -type f | xargs sed -i -e '/- \*\*id\*\*/d'

.PHONY: testacc tools
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ resource "boundary_scope" "global" {
}

resource "boundary_scope" "corp" {
scope_id = boundary_scope.global.id
auto_create_role = true
scope_id = boundary_scope.global.id
auto_create_admin_role = true
auto_create_default_role = true
}

resource "boundary_user" "users" {
Expand Down Expand Up @@ -156,9 +157,9 @@ resource "boundary_role" "organization_admin" {

// create a project for core infrastructure
resource "boundary_scope" "core_infra" {
description = "Core infrastrcture"
scope_id = boundary_scope.corp.id
auto_create_role = true
description = "Core infrastrcture"
scope_id = boundary_scope.corp.id
auto_create_admin_role = true
}

resource "boundary_host_catalog" "backend_servers" {
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ provider "boundary" {
- **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. See Boundary's KMS docs for examples: https://boundaryproject.io/docs/configuration/kms
- **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.
- **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.
9 changes: 5 additions & 4 deletions docs/resources/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ The account resource allows you to configure a Boundary account.

```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}

resource "boundary_auth_method" "password" {
Expand Down
9 changes: 5 additions & 4 deletions docs/resources/auth_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ The auth method resource allows you to configure a Boundary auth_method.

```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}

resource "boundary_auth_method" "password" {
Expand Down
26 changes: 14 additions & 12 deletions docs/resources/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ The group resource allows you to configure a Boundary group.

```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}

resource "boundary_user" "foo" {
Expand All @@ -36,17 +37,18 @@ Usage for project-specific group:

```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}

resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
}

resource "boundary_user" "foo" {
Expand Down
19 changes: 10 additions & 9 deletions docs/resources/host.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,22 @@ The host resource allows you to configure a Boundary static host. Hosts are alwa

```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}

resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
}

resource "boundary_host" "example" {
name = "My catalog"
name = "example_host"
description = "My first host!"
address = "10.0.0.1"
scope_id = boundary_scope.project.id
Expand Down
17 changes: 9 additions & 8 deletions docs/resources/host_catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ The host catalog resource allows you to configure a Boundary host catalog. Host

```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = boundary_scope.global.id
auto_create_role = true
name = "organization_one"
description = "My first scope!"
scope_id = boundary_scope.global.id
auto_create_admin_role = true
auto_create_default_role = true
}

resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
}

resource "boundary_host_catalog" "example" {
Expand Down
17 changes: 9 additions & 8 deletions docs/resources/host_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ The host_set resource allows you to configure a Boundary host set. Host sets are

```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}

resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
}

resource "boundary_host_catalog" "static" {
Expand Down
46 changes: 25 additions & 21 deletions docs/resources/role.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ Basic usage:

```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}

resource "boundary_role" "example" {
Expand All @@ -32,10 +33,11 @@ Usage with a user resource:

```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_role = true
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}

resource "boundary_user" "foo" {
Expand All @@ -60,10 +62,11 @@ 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
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}

resource "boundary_user" "readonly" {
Expand All @@ -85,17 +88,18 @@ 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
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}

resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
}

resource "boundary_user" "readonly" {
Expand Down Expand Up @@ -134,4 +138,4 @@ Import is supported using the following syntax:

```shell
terraform import boundary_role.foo <my-id>
```
```
26 changes: 13 additions & 13 deletions docs/resources/scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@ Creating the global scope:

```terraform
resource "boundary_scope" "global" {
global_scope = true
scope_id = "global"
auto_create_role = true
global_scope = true
scope_id = "global"
}
```

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
name = "organization_one"
description = "My first scope!"
scope_id = boundary_scope.global.id
auto_create_admin_role = true
auto_create_default_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
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
}
```

Expand Down Expand Up @@ -69,7 +69,7 @@ resource "boundary_role" "org_admin" {
### 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.
- **auto_create_default_role** (Boolean, Optional) Only relevant when creating an org scope. 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.
- **name** (String, Optional) The scope name. Defaults to the resource name.
Expand All @@ -80,4 +80,4 @@ Import is supported using the following syntax:

```shell
terraform import boundary_scope.foo <my-id>
```
```
Loading