generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Azure Rotating Secrets Changes (#1143)
* adding azure integration for rotating secrets changes * adding test file * adding changelog file * updateing validation * fixing test failures * docs * minor changes * Update internal/provider/vaultsecrets/resource_vault_secrets_rotating_secret.go Co-authored-by: Max Coulombe <[email protected]> * addressing review comments * addressing review comments * addressing review comments --------- Co-authored-by: Max Coulombe <[email protected]>
- Loading branch information
1 parent
1c3ce37
commit 00e266b
Showing
14 changed files
with
803 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:feature | ||
add vault_secrets_integration_azure resource and add support for azure secrets to vault_secrets_rotating_secret resource | ||
``` |
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,75 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "hcp_vault_secrets_integration_azure Resource - terraform-provider-hcp" | ||
subcategory: "" | ||
description: |- | ||
The Vault Secrets Azure integration resource manages an Azure integration. | ||
--- | ||
|
||
# hcp_vault_secrets_integration_azure (Resource) | ||
|
||
The Vault Secrets Azure integration resource manages an Azure integration. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "hcp_vault_secrets_integration_azure" "example" { | ||
name = "my-azure-1" | ||
capabilities = ["ROTATION"] | ||
client_secret = { | ||
"tenant_id" = "7eb3...", | ||
"client_id" = "9de0...", | ||
"client_secret" = "WZk8..." | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `capabilities` (Set of String) Capabilities enabled for the integration. See the Vault Secrets documentation for the list of supported capabilities per provider. | ||
- `name` (String) The Vault Secrets integration name. | ||
|
||
### Optional | ||
|
||
- `client_secret` (Attributes) Azure client secret used to authenticate against the target Azure application. Cannot be used with `federated_workload_identity`. (see [below for nested schema](#nestedatt--client_secret)) | ||
- `federated_workload_identity` (Attributes) (Recommended) Federated identity configuration to authenticate against the target Azure application. Cannot be used with `client_secret`. (see [below for nested schema](#nestedatt--federated_workload_identity)) | ||
- `project_id` (String) HCP project ID that owns the HCP Vault Secrets integration. Inferred from the provider configuration if omitted. | ||
|
||
### Read-Only | ||
|
||
- `organization_id` (String) HCP organization ID that owns the HCP Vault Secrets integration. | ||
- `resource_id` (String) Resource ID used to uniquely identify the integration instance on the HCP platform. | ||
- `resource_name` (String) Resource name used to uniquely identify the integration instance on the HCP platform. | ||
|
||
<a id="nestedatt--client_secret"></a> | ||
### Nested Schema for `client_secret` | ||
|
||
Required: | ||
|
||
- `client_id` (String) Azure client ID corresponding to the Azure application. | ||
- `client_secret` (String) Secret value corresponding to the Azure client secret. | ||
- `tenant_id` (String) Azure tenant ID corresponding to the Azure application. | ||
|
||
|
||
<a id="nestedatt--federated_workload_identity"></a> | ||
### Nested Schema for `federated_workload_identity` | ||
|
||
Required: | ||
|
||
- `audience` (String) Audience configured on the Azure federated identity credentials to federate access with HCP. | ||
- `client_id` (String) Azure client ID corresponding to the Azure application. | ||
- `tenant_id` (String) Azure tenant ID corresponding to the Azure application. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# Vault Secrets Azure Integration can be imported by specifying the name of the integration | ||
# Note that since the client secret is never returned on the Vault Secrets API, | ||
# the next plan or apply will show a diff for that field. | ||
terraform import hcp_vault_secrets_integration_azure.example my-azure-1 | ||
``` |
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
4 changes: 4 additions & 0 deletions
4
examples/resources/hcp_vault_secrets_integration_azure/import.sh
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,4 @@ | ||
# Vault Secrets Azure Integration can be imported by specifying the name of the integration | ||
# Note that since the client secret is never returned on the Vault Secrets API, | ||
# the next plan or apply will show a diff for that field. | ||
terraform import hcp_vault_secrets_integration_azure.example my-azure-1 |
9 changes: 9 additions & 0 deletions
9
examples/resources/hcp_vault_secrets_integration_azure/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,9 @@ | ||
resource "hcp_vault_secrets_integration_azure" "example" { | ||
name = "my-azure-1" | ||
capabilities = ["ROTATION"] | ||
client_secret = { | ||
"tenant_id" = "7eb3...", | ||
"client_id" = "9de0...", | ||
"client_secret" = "WZk8..." | ||
} | ||
} |
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
Oops, something went wrong.