-
Notifications
You must be signed in to change notification settings - Fork 50
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
Azure Rotating Secrets Changes #1143
Changes from 7 commits
6a52ca4
9f8a315
a8790a6
8e10031
2d5d7e0
709b74a
17eef45
e8ff325
4639f6a
8b47858
67040f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 | ||
``` |
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feel incomplete. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
|
||
## 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as dicussed in a preivous PR, i didnt foudn this documentaiton There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think linking users to our docs' landing page would be helpful? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could do that, the docs page doesn't directly talk about the capabilities option though. Another approach would be to list the options Note: This is a generated file, hence making this change will affect all the integration doc files where capabilities is listed. |
||
- `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_confluent.example my-azure-1 | ||
``` |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -66,6 +66,18 @@ resource "hcp_vault_secrets_rotating_secret" "example_confluent" { | |||||
service_account_id = "<service-account-id>" | ||||||
} | ||||||
} | ||||||
|
||||||
resource "hcp_vault_secrets_rotating_secret" "example_azure" { | ||||||
app_name = "my-app-1" | ||||||
secret_provider = "azure" | ||||||
name = "my_azure_1_secret" | ||||||
integration_name = "my-azure-1" | ||||||
rotation_policy_name = "built-in:60-days-2-active" | ||||||
azure_application_password_params = { | ||||||
app_object_id = "<app_object_id>" | ||||||
app_client_id = "<app_client_id>" | ||||||
} | ||||||
} | ||||||
``` | ||||||
|
||||||
<!-- schema generated by tfplugindocs --> | ||||||
|
@@ -82,6 +94,7 @@ resource "hcp_vault_secrets_rotating_secret" "example_confluent" { | |||||
### Optional | ||||||
|
||||||
- `aws_access_keys` (Attributes) AWS configuration to manage the access key rotation for the given IAM user. Required if `secret_provider` is `aws`. (see [below for nested schema](#nestedatt--aws_access_keys)) | ||||||
- `azure_application_password_params` (Attributes) Azure configuration to manage the application password rotation for the given application. Required if `secret_provider` is `confluent`. (see [below for nested schema](#nestedatt--azure_application_password_params)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The param suffix feels redundant and the other credential types did not add it. There is a Confluent copy-paste leftover. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whoops I think this is the generated code. Nvm the suggestion but the comment are relevant to the resource schema. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for noticing this. Updated. |
||||||
- `confluent_service_account` (Attributes) Confluent configuration to manage the cloud api key rotation for the given service account. Required if `secret_provider` is `confluent`. (see [below for nested schema](#nestedatt--confluent_service_account)) | ||||||
- `gcp_service_account_key` (Attributes) GCP configuration to manage the service account key rotation for the given service account. Required if `secret_provider` is `gcp`. (see [below for nested schema](#nestedatt--gcp_service_account_key)) | ||||||
- `mongodb_atlas_user` (Attributes) MongoDB Atlas configuration to manage the user password rotation on the given database. Required if `secret_provider` is `mongodb_atlas`. (see [below for nested schema](#nestedatt--mongodb_atlas_user)) | ||||||
|
@@ -100,6 +113,15 @@ Required: | |||||
- `iam_username` (String) AWS IAM username to rotate the access keys for. | ||||||
|
||||||
|
||||||
<a id="nestedatt--azure_application_password_params"></a> | ||||||
### Nested Schema for `azure_application_password_params` | ||||||
|
||||||
Required: | ||||||
|
||||||
- `app_client_id` (String) Application client ID to rotate the application password for. | ||||||
- `app_object_id` (String) Application object ID to rotate the application password for. | ||||||
|
||||||
|
||||||
<a id="nestedatt--confluent_service_account"></a> | ||||||
### Nested Schema for `confluent_service_account` | ||||||
|
||||||
|
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_confluent.example my-azure-1 | ||
murali-partha marked this conversation as resolved.
Show resolved
Hide resolved
|
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..." | ||
} | ||
} | ||
murali-partha marked this conversation as resolved.
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feel incomplete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the above comment, this is a standard message across integrations.