Skip to content

Commit

Permalink
Set sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
louisruch committed Jun 18, 2021
1 parent beb6efc commit b61e923
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/provider/resource_credential_store_vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func resourceCredentialStoreVault() *schema.Resource {
Description: "The Vault token",
Type: schema.TypeString,
Required: true,
Sensitive: true,
},
credentialStoreVaultTokenHmacKey: {
Description: "The Vault token hmac",
Expand All @@ -113,6 +114,7 @@ func resourceCredentialStoreVault() *schema.Resource {
Description: "The Vault client certificate key",
Type: schema.TypeString,
Optional: true,
Sensitive: true,
},
credentialStoreVaultClientCertificateKeyHmacKey: {
Description: "The Vault client certificate key hmac",
Expand Down Expand Up @@ -317,15 +319,15 @@ func resourceCredentialStoreVaultUpdate(ctx context.Context, d *schema.ResourceD

if len(opts) > 0 {
opts = append(opts, credentialstores.WithAutomaticVersioning(true))
aur, err := client.Update(ctx, d.Id(), 0, opts...)
crUpdate, err := client.Update(ctx, d.Id(), 0, opts...)
if err != nil {
return diag.Errorf("error updating credential store: %v", err)
}
if aur == nil {
if crUpdate == nil {
return diag.Errorf("credential store nil after update")
}

if err = setFromVaultCredentialStoreResponseMap(d, aur.GetResponse().Map); err != nil {
if err = setFromVaultCredentialStoreResponseMap(d, crUpdate.GetResponse().Map); err != nil {
return diag.Errorf("error generating credential store from response map: %v", err)
}
}
Expand Down

0 comments on commit b61e923

Please sign in to comment.