Skip to content

feat: upgrade go-dvls package to support more credential types #20

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ Replace `/Users/USERNAME/go/bin` with the path to the compiled provider binary a
Then run the following command, assuming you are on macOS or Linux:

```shell
go build -o ~/go/bin/terraform-provider-dvls_v1.0.0
chmod +x ~/go/bin/terraform-provider-dvls_v1.0.0
go build -o ~/go/bin/terraform-provider-dvls_v0.3.0
chmod +x ~/go/bin/terraform-provider-dvls_v0.3.0
```
Notes: the version number should match the version of the provider you are working on.

You can then create a test.tf or example.tf file with the required content; here is a sample:

```hcl
Expand Down
38 changes: 38 additions & 0 deletions docs/data-sources/entry_credential_api_key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dvls_entry_credential_api_key Data Source - terraform-provider-dvls"
subcategory: ""
description: |-
A DVLS API Key Credential Entry
---

# dvls_entry_credential_api_key (Data Source)

A DVLS API Key Credential Entry

## Example Usage

```terraform
data "dvls_entry_credential_api_key" "example" {
id = "00000000-0000-0000-0000-000000000000"
vault_id = "00000000-0000-0000-0000-000000000000"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) The ID of the entry.
- `vault_id` (String) The ID of the vault.

### Read-Only

- `api_id` (String) The entry credential API ID.
- `api_key` (String, Sensitive) The entry credential API key.
- `description` (String) The description of the entry.
- `folder` (String) The folder path of the entry.
- `name` (String) The name of the entry.
- `tags` (List of String) A list of tags added to the entry.
- `tenant_id` (String) The entry credential tenant ID.
38 changes: 38 additions & 0 deletions docs/data-sources/entry_credential_azure_service_principal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dvls_entry_credential_azure_service_principal Data Source - terraform-provider-dvls"
subcategory: ""
description: |-
A DVLS Azure Service Principal Credential Entry
---

# dvls_entry_credential_azure_service_principal (Data Source)

A DVLS Azure Service Principal Credential Entry

## Example Usage

```terraform
data "dvls_entry_credential_azure_service_principal" "example" {
id = "00000000-0000-0000-0000-000000000000"
vault_id = "00000000-0000-0000-0000-000000000000"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) The ID of the entry.
- `vault_id` (String) The ID of the vault.

### Read-Only

- `client_id` (String) The entry credential client ID.
- `client_secret` (String, Sensitive) The entry credential client secret.
- `description` (String) The description of the entry.
- `folder` (String) The folder path of the entry.
- `name` (String) The name of the entry.
- `tags` (List of String) A list of tags added to the entry.
- `tenant_id` (String) The entry credential tenant ID.
36 changes: 36 additions & 0 deletions docs/data-sources/entry_credential_connection_string.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dvls_entry_credential_connection_string Data Source - terraform-provider-dvls"
subcategory: ""
description: |-
A DVLS Connection String Credential Entry
---

# dvls_entry_credential_connection_string (Data Source)

A DVLS Connection String Credential Entry

## Example Usage

```terraform
data "dvls_entry_credential_connection_string" "example" {
id = "00000000-0000-0000-0000-000000000000"
vault_id = "00000000-0000-0000-0000-000000000000"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) The ID of the entry.
- `vault_id` (String) The ID of the vault.

### Read-Only

- `connection_string` (String, Sensitive) The entry credential connection string.
- `description` (String) The description of the entry.
- `folder` (String) The folder path of the entry.
- `name` (String) The name of the entry.
- `tags` (List of String) A list of tags added to the entry.
36 changes: 36 additions & 0 deletions docs/data-sources/entry_credential_secret.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dvls_entry_credential_secret Data Source - terraform-provider-dvls"
subcategory: ""
description: |-
A DVLS Secret Credential Entry
---

# dvls_entry_credential_secret (Data Source)

A DVLS Secret Credential Entry

## Example Usage

```terraform
data "dvls_entry_credential_secret" "example" {
id = "00000000-0000-0000-0000-000000000000"
vault_id = "00000000-0000-0000-0000-000000000000"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) The ID of the entry.
- `vault_id` (String) The ID of the vault.

### Read-Only

- `description` (String) The description of the entry.
- `folder` (String) The folder path of the entry.
- `name` (String) The name of the entry.
- `secret` (String, Sensitive) The entry credential secret.
- `tags` (List of String) A list of tags added to the entry.
39 changes: 39 additions & 0 deletions docs/data-sources/entry_credential_ssh_key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dvls_entry_credential_ssh_key Data Source - terraform-provider-dvls"
subcategory: ""
description: |-
A DVLS SSH Key Credential Entry
---

# dvls_entry_credential_ssh_key (Data Source)

A DVLS SSH Key Credential Entry

## Example Usage

```terraform
data "dvls_entry_credential_ssh_key" "example" {
id = "00000000-0000-0000-0000-000000000000"
vault_id = "00000000-0000-0000-0000-000000000000"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) The ID of the entry.
- `vault_id` (String) The ID of the vault.

### Read-Only

- `description` (String) The description of the entry.
- `folder` (String) The folder path of the entry.
- `name` (String) The name of the entry.
- `passphrase` (String, Sensitive) The entry credential passphrase.
- `password` (String, Sensitive) The entry credential password.
- `private_key_data` (String, Sensitive) The entry credential private key data.
- `public_key` (String, Sensitive) The entry credential public key data.
- `tags` (List of String) A list of tags added to the entry.
38 changes: 38 additions & 0 deletions docs/data-sources/entry_credential_username_password.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dvls_entry_credential_username_password Data Source - terraform-provider-dvls"
subcategory: ""
description: |-
A DVLS Username and Password Credential Entry
---

# dvls_entry_credential_username_password (Data Source)

A DVLS Username and Password Credential Entry

## Example Usage

```terraform
data "dvls_entry_credential_username_password" "example" {
id = "00000000-0000-0000-0000-000000000000"
vault_id = "00000000-0000-0000-0000-000000000000"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) The ID of the entry.
- `vault_id` (String) The ID of the vault.

### Read-Only

- `description` (String) The description of the entry.
- `domain` (String) The entry credential domain.
- `folder` (String) The folder path of the entry.
- `name` (String) The name of the entry.
- `password` (String, Sensitive) The entry credential password.
- `tags` (List of String) A list of tags added to the entry.
- `username` (String) The entry credential username.
36 changes: 0 additions & 36 deletions docs/data-sources/entry_user_credential.md

This file was deleted.

8 changes: 4 additions & 4 deletions docs/resources/entry_certificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ A DVLS Certificate
resource "dvls_entry_certificate" "url" {
vault_id = "00000000-0000-0000-0000-000000000000"
name = "foo"
description = "bar"
password = "bar"
folder = "foo\\bar"
description = "bar"
expiration = "2022-12-31T23:59:59-05:00"
tags = ["foo", "bar"]

password = "bar"
url = {
url = "http://foo.bar"
use_default_credentials = false
Expand All @@ -33,12 +33,12 @@ resource "dvls_entry_certificate" "url" {
resource "dvls_entry_certificate" "file" {
vault_id = "00000000-0000-0000-0000-000000000000"
name = "foo"
description = "bar"
password = "bar"
folder = "foo\\bar"
description = "bar"
expiration = "2022-12-31T23:59:59-05:00"
tags = ["foo", "bar"]

password = "bar"
file = {
name = "test.p12"
content_b64 = filebase64("test.p12")
Expand Down
57 changes: 57 additions & 0 deletions docs/resources/entry_credential_api_key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dvls_entry_credential_api_key Resource - terraform-provider-dvls"
subcategory: ""
description: |-
A DVLS API Key Credential Entry
---

# dvls_entry_credential_api_key (Resource)

A DVLS API Key Credential Entry

## Example Usage

```terraform
resource "dvls_entry_credential_api_key" "example" {
vault_id = "00000000-0000-0000-0000-000000000000"
name = "foo"
folder = "foo\\bar"
description = "foo"
tags = ["foo"]

api_id = "foo"
api_key = "bar"
tenant_id = "foo"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) The name of the entry.
- `vault_id` (String) The ID of the vault.

### Optional

- `api_id` (String) The entry credential API ID.
- `api_key` (String, Sensitive) The entry credential API key.
- `description` (String) The description of the entry.
- `folder` (String) The folder path where the entry is created.
- `tags` (List of String) A list of tags to add to the entry.
- `tenant_id` (String) The entry credential tenant ID.

### Read-Only

- `id` (String) The ID of the entry. This is set by the provider after creation.

## Import

Import is supported using the following syntax:

```shell
# This resource can be imported using `<vault_id>/<entry_id>` format, e.g.
terraform import dvls_entry_credential_api_key.example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000
```
Loading