Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alihanyalcin committed Mar 23, 2023
1 parent fcfa0cb commit e845378
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions docs/modules/vault.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ It takes a context and zero or more Option values to configure the container.
<!--/codeinclude-->

### Use client library to read data from Vault container:
Add Vault Client module to your Go dependencies:
```
go get -u github.com/hashicorp/vault-client-go
```
<!--codeinclude-->
[Use library to read data](../../modules/vault/vault_test.go) inside_block:TestVaultGetSecretPathWithClient
<!--/codeinclude-->
Expand All @@ -39,7 +43,11 @@ It takes a context and zero or more Option values to configure the container.
You can set below options to create Vault container.

### Image
If you need to set a different Vault image, you can use the `WithImageName`. Default image name is `vault:1.13.0`
If you need to set a different Vault image, you can use the `WithImageName`.

!!!info
Default image name is `hashicorp/vault:1.13.0`.

<!--codeinclude-->
[Set image name](../../modules/vault/vault_test.go) inside_block:WithImageName
<!--/codeinclude-->
Expand All @@ -50,12 +58,6 @@ If you need to add token authentication, you can use the `WithToken`.
[Add token authentication](../../modules/vault/vault_test.go) inside_block:WithToken
<!--/codeinclude-->

### Log Level
If you need to change log level, you can use the `WithLogLevel`. Default log level is `info`
<!--codeinclude-->
[Change log level](../../modules/vault/vault_test.go) inside_block:WithLogLevel
<!--/codeinclude-->

### Command
If you need to run vault command in the container, you can use the `WithInitCommand`.
<!--codeinclude-->
Expand Down
2 changes: 1 addition & 1 deletion modules/vault/vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestMain(m *testing.M) {
var err error
opts := []testcontainervault.ContainerOptions{
// WithImageName {
testcontainervault.WithImageName("vault:1.13.0"),
testcontainervault.WithImageName("hashicorp/vault:1.13.0"),
// }
// WithToken {
testcontainervault.WithToken(token),
Expand Down

0 comments on commit e845378

Please sign in to comment.