generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: update host catalog resource with correct value for type attribute * build: add Makefile target for auto-generating docs * bugfix: make OIDC account attribute for subject ForceNew * docs: update auto-generated docs * Add credential library resource for Vault (#114) * Integrate with Vault to retrieve and manage per session credentials Co-authored-by: Louis Ruch <[email protected]> * Update token/clientKey on hmac change (#125) * Update token/clientKey on hmac change * Update changelog * Update docs * Prep for 1.0.3 * v1.0.3 * Update terraform-plugin-sdk * Fix Typo * Adopt American spelling * fix the parameter that is actually being sent as the auth method id Co-authored-by: Jeff Malnick <[email protected]> Co-authored-by: Louis Ruch <[email protected]> Co-authored-by: Jeff Mitchell <[email protected]> Co-authored-by: tf-release-bot <[email protected]> Co-authored-by: Lewis Cowper <[email protected]>
- Loading branch information
1 parent
d80899a
commit 2db7be0
Showing
27 changed files
with
1,624 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "boundary_credential_library_vault Resource - terraform-provider-boundary" | ||
subcategory: "" | ||
description: |- | ||
The credential library for Vault resource allows you to configure a Boundary credential library for Vault. | ||
--- | ||
|
||
# boundary_credential_library_vault (Resource) | ||
|
||
The credential library for Vault resource allows you to configure a Boundary credential library for Vault. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "boundary_scope" "org" { | ||
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_admin_role = true | ||
} | ||
resource "boundary_credential_store_vault" "foo" { | ||
name = "foo" | ||
description = "My first Vault credential store!" | ||
address = "http://127.0.0.1:8200" # change to Vault address | ||
token = "s.0ufRo6XEGU2jOqnIr7OlFYP5" # change to valid Vault token | ||
scope_id = boundary_scope.project.id | ||
} | ||
resource "boundary_credential_library_vault" "foo" { | ||
name = "foo" | ||
description = "My first Vault credential library!" | ||
credential_store_id = boundary_credential_store_vault.foo.id | ||
path = "my/secret/foo" # change to Vault backend path | ||
http_method = "GET" | ||
} | ||
resource "boundary_credential_library_vault" "bar" { | ||
name = "bar" | ||
description = "My second Vault credential library!" | ||
credential_store_id = boundary_credential_store_vault.foo.id | ||
path = "my/secret/bar" # change to Vault backend path | ||
http_method = "POST" | ||
request_body = <<EOT | ||
{ | ||
"key": "Value", | ||
} | ||
EOT | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- **credential_store_id** (String) The ID of the credential store that this library belongs to. | ||
- **path** (String) The path in Vault to request credentials from. | ||
|
||
### Optional | ||
|
||
- **description** (String) The Vault credential library description. | ||
- **http_method** (String) The HTTP method the library uses when requesting credentials from Vault. Defaults to 'GET' | ||
- **http_request_body** (String) The body of the HTTP request the library sends to Vault when requesting credentials. Only valid if `http_method` is set to `POST`. | ||
- **name** (String) The Vault credential library name. Defaults to the resource name. | ||
|
||
### Read-Only | ||
|
||
- **id** (String) The ID of the Vault credential library. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import boundary_credential_library_vault.foo <my-id> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "boundary_credential_store_vault Resource - terraform-provider-boundary" | ||
subcategory: "" | ||
description: |- | ||
The credential store for Vault resource allows you to configure a Boundary credential store for Vault. | ||
--- | ||
|
||
# boundary_credential_store_vault (Resource) | ||
|
||
The credential store for Vault resource allows you to configure a Boundary credential store for Vault. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "boundary_scope" "org" { | ||
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_admin_role = true | ||
} | ||
resource "boundary_credential_store_vault" "example" { | ||
name = "foo" | ||
description = "My first Vault credential store!" | ||
address = "http://127.0.0.1:8200" # change to Vault address | ||
token = "s.0ufRo6XEGU2jOqnIr7OlFYP5" # change to valid Vault token | ||
scope_id = boundary_scope.project.id | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- **address** (String) The address to Vault server. This should be a complete URL such as 'https://127.0.0.1:8200' | ||
- **scope_id** (String) The scope for this credential store. | ||
- **token** (String, Sensitive) A token used for accessing Vault. | ||
|
||
### Optional | ||
|
||
- **ca_cert** (String) A PEM-encoded CA certificate to verify the Vault server's TLS certificate. | ||
- **client_certificate** (String) A PEM-encoded client certificate to use for TLS authentication to the Vault server. | ||
- **client_certificate_key** (String, Sensitive) A PEM-encoded private key matching the client certificate from 'client_certificate'. | ||
- **description** (String) The Vault credential store description. | ||
- **name** (String) The Vault credential store name. Defaults to the resource name. | ||
- **namespace** (String) The namespace within Vault to use. | ||
- **tls_server_name** (String) Name to use as the SNI host when connecting to Vault via TLS. | ||
- **tls_skip_verify** (Boolean) Whether or not to skip TLS verification. | ||
|
||
### Read-Only | ||
|
||
- **client_certificate_key_hmac** (String) The Vault client certificate key hmac. | ||
- **id** (String) The ID of the Vault credential store. | ||
- **token_hmac** (String) The Vault token hmac. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import boundary_credential_store_vault.foo <my-id> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import boundary_credential_library_vault.foo <my-id> |
43 changes: 43 additions & 0 deletions
43
examples/resources/boundary_credential_library_vault/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
resource "boundary_scope" "org" { | ||
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_admin_role = true | ||
} | ||
|
||
resource "boundary_credential_store_vault" "foo" { | ||
name = "foo" | ||
description = "My first Vault credential store!" | ||
address = "http://127.0.0.1:8200" # change to Vault address | ||
token = "s.0ufRo6XEGU2jOqnIr7OlFYP5" # change to valid Vault token | ||
scope_id = boundary_scope.project.id | ||
} | ||
|
||
resource "boundary_credential_library_vault" "foo" { | ||
name = "foo" | ||
description = "My first Vault credential library!" | ||
credential_store_id = boundary_credential_store_vault.foo.id | ||
path = "my/secret/foo" # change to Vault backend path | ||
http_method = "GET" | ||
} | ||
|
||
resource "boundary_credential_library_vault" "bar" { | ||
name = "bar" | ||
description = "My second Vault credential library!" | ||
credential_store_id = boundary_credential_store_vault.foo.id | ||
path = "my/secret/bar" # change to Vault backend path | ||
http_method = "POST" | ||
request_body = <<EOT | ||
{ | ||
"key": "Value", | ||
} | ||
EOT | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import boundary_credential_store_vault.foo <my-id> |
22 changes: 22 additions & 0 deletions
22
examples/resources/boundary_credential_store_vault/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
resource "boundary_scope" "org" { | ||
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_admin_role = true | ||
} | ||
|
||
resource "boundary_credential_store_vault" "example" { | ||
name = "foo" | ||
description = "My first Vault credential store!" | ||
address = "http://127.0.0.1:8200" # change to Vault address | ||
token = "s.0ufRo6XEGU2jOqnIr7OlFYP5" # change to valid Vault token | ||
scope_id = boundary_scope.project.id | ||
} |
Oops, something went wrong.