Skip to content

Commit

Permalink
Merge pull request #120 from hashicorp/sync-public-and-internal-provider
Browse files Browse the repository at this point in the history
[auto] Sync with Public Provider
  • Loading branch information
aidan-mundy authored Sep 20, 2023
2 parents 56416ec + ac71468 commit b413e5a
Show file tree
Hide file tree
Showing 97 changed files with 2,079 additions and 689 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## v0.71.0 (September 20, 2023)

FEATURES:

* Add data source for pulling in a single secret. [[GH-594](https://github.com/hashicorp/terraform-provider-hcp/pull/594)]
* Add resource to create app in Vault Secrets. [[GH-593](https://github.com/hashicorp/terraform-provider-hcp/pull/593)]

IMPROVEMENTS:

* Add ElasticSearch as an observability provider for streaming audit logs and metrics from HCP Vault clusters. [[GH-586](https://github.com/hashicorp/terraform-provider-hcp/pull/586)]
* Update to use the Terraform Multiplexing framework [[GH-565](https://github.com/hashicorp/terraform-provider-hcp/pull/565)]
## v0.70.0 (September 13, 2023)

IMPROVEMENTS:

* Add CloudWatch as an observability provider for streaming audit logs and metrics from HCP Vault clusters. [[GH-580](https://github.com/hashicorp/terraform-provider-hcp/pull/580)]
* Add `hcp_vault_plugin` resource [[GH-579](https://github.com/hashicorp/terraform-provider-hcp/pull/579)]
* Update semver validation to allow specification of pre-release versions [[GH-590](https://github.com/hashicorp/terraform-provider-hcp/pull/590)]

BUG FIXES:

* update hcp_vault_plugin resource test. remove hard coded values that were used for local testing. [[GH-591](https://github.com/hashicorp/terraform-provider-hcp/pull/591)]
## v0.69.0 (August 17, 2023)

IMPROVEMENTS:
Expand Down
1 change: 1 addition & 0 deletions contributing/checklist-resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Implementing a new resource is a good way to learn more about how Terraform interacts with upstream APIs. There are plenty of examples to draw from in the existing resources, but you still get to implement something completely new.

- [ ] __Plugin Framework__: All new resources should go into the internal/provider folder and utilize the [Terraform Plugin Framework](https://developer.hashicorp.com/terraform/plugin/framework) when developing a new resource or data source. New resources should also go in a folder that corresponds to the product name (e.g. `vaultsecrets`).
- [ ] __Minimal LOC__: It can be inefficient for both the reviewer and author to go through long feedback cycles on a big PR with many resources. We therefore encourage you to only submit **1 resource at a time**.
- [ ] __Acceptance Tests__: New resources should include acceptance tests covering their behavior. See [Writing Acceptance Tests](writing-tests.md) below for a detailed guide on how to approach these.
- [ ] __Documentation__: Each resource gets a page in the [Terraform Registry documentation](https://registry.terraform.io/providers/hashicorp/hcp/latest/docs). For a new resource, you'll want to add an example and field descriptions. A guide is required if the new feature requires multiple dependent resources to use.
Expand Down
34 changes: 34 additions & 0 deletions docs/data-sources/vault_secrets_secret.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
page_title: "Data Source hcp_vault_secrets_secret - terraform-provider-hcp"
subcategory: ""
description: |-
The Vault Secrets secret data source retrieves a singular secret and its latest version.
---

# hcp_vault_secrets_secret (Data Source)

The Vault Secrets secret data source retrieves a singular secret and its latest version.

## Example Usage

```terraform
data "hcp_vault_secrets_secret" "example" {
app_name = "example-vault-secrets-app"
secret_name = "my_secret"
}
```

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

### Required

- `app_name` (String) The name of the Vault Secrets application.
- `secret_name` (String) The name of the Vault Secrets secret.

### Read-Only

- `id` (String) The ID of this resource.
- `organization_id` (String) The ID of the HCP organization where the Vault Secrets app is located.
- `project_id` (String) The ID of the HCP project where the Vault Secrets app is located.
- `secret_value` (String, Sensitive) The secret value corresponding to the secret name input.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ terraform {
required_providers {
hcp = {
source = "hashicorp/hcp"
version = "~> 0.69.0"
version = "~> 0.71.0"
}
}
}
Expand Down
36 changes: 36 additions & 0 deletions docs/resources/vault_secrets_app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
page_title: "Resource hcp_vault_secrets_app - terraform-provider-hcp"
subcategory: ""
description: |-
The Vault Secrets app resource manages an application.
---

# hcp_vault_secrets_app (Resource)

The Vault Secrets app resource manages an application.

## Example Usage

```terraform
resource "hcp_vault_secrets_app" "example" {
app_name = "example-app-name"
description = "My new app!"
}
```

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

### Required

- `app_name` (String) The Vault Secrets App name.

### Optional

- `description` (String) The Vault Secrets app description

### Read-Only

- `id` (String) Required ID field that is set to the app name.
- `organization_id` (String) The ID of the HCP organization where the project the HCP Vault Secrets app is located.
- `project_id` (String) The ID of the HCP project where the HCP Vault Secrets app is located.
37 changes: 37 additions & 0 deletions docs/resources/vault_secrets_secret.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
page_title: "Resource hcp_vault_secrets_secret - terraform-provider-hcp"
subcategory: ""
description: |-
The Vault Secrets secret resource manages a secret within a given application.
---

# hcp_vault_secrets_secret (Resource)

-> **Note:** Please treat your state file as sensitive when using this resource.

The Vault Secrets secret resource manages a secret within a given application.

## Example Usage

```terraform
resource "hcp_vault_secrets_secret" "example" {
app_name = "example-app-name"
secret_name = "example_secret"
secret_value = "hashi123"
}
```

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

### Required

- `app_name` (String) The name of the application the secret can be found in
- `secret_name` (String) The name of the secret
- `secret_value` (String, Sensitive) The value of the secret

### Read-Only

- `id` (String) The id of the resource
- `organization_id` (String) The ID of the HCP organization where the project the HCP Vault Secrets secret is located.
- `project_id` (String) The ID of the HCP project where the HCP Vault Secrets secret is located.
4 changes: 4 additions & 0 deletions examples/data-sources/hcp_vault_secrets_secret/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data "hcp_vault_secrets_secret" "example" {
app_name = "example-vault-secrets-app"
secret_name = "my_secret"
}
2 changes: 1 addition & 1 deletion examples/provider/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
hcp = {
source = "hashicorp/hcp"
version = "~> 0.69.0"
version = "~> 0.71.0"
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions examples/resources/hcp_vault_secrets_app/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "hcp_vault_secrets_app" "example" {
app_name = "example-app-name"
description = "My new app!"
}
5 changes: 5 additions & 0 deletions examples/resources/hcp_vault_secrets_secret/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "hcp_vault_secrets_secret" "example" {
app_name = "example-app-name"
secret_name = "example_secret"
secret_value = "hashi123"
}
22 changes: 14 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,31 @@ require (
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/go-uuid v1.0.3
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/hcp-sdk-go v0.61.0
github.com/hashicorp/hcp-sdk-go v0.62.0
github.com/hashicorp/terraform-plugin-docs v0.16.0
github.com/hashicorp/terraform-plugin-framework v1.3.5
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
github.com/hashicorp/terraform-plugin-go v0.18.0
github.com/hashicorp/terraform-plugin-mux v0.11.1
github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df
google.golang.org/grpc v1.58.0
google.golang.org/grpc v1.58.1
)

require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
Expand All @@ -41,6 +46,7 @@ require (
github.com/go-openapi/spec v0.20.8 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/validate v0.22.1 // indirect
github.com/go-test/deep v1.1.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
Expand All @@ -54,29 +60,29 @@ require (
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.18.1 // indirect
github.com/hashicorp/terraform-json v0.17.1 // indirect
github.com/hashicorp/terraform-plugin-go v0.18.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.1 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mitchellh/cli v1.1.5 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/russross/blackfriday v1.6.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
Expand Down
Loading

0 comments on commit b413e5a

Please sign in to comment.