Skip to content
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

hvs pg rotating secret #1130

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

hvs pg rotating secret #1130

wants to merge 25 commits into from

Conversation

dhuckins
Copy link
Contributor

@dhuckins dhuckins commented Nov 7, 2024

add new postgres integration resource and add postgres rotating secret
HV-1704
HV-1707

🛠️ Description

🏗️ Acceptance tests

  • Are there any feature flags that are required to use this functionality?
  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

@dhuckins dhuckins marked this pull request as ready for review November 12, 2024 16:31
@dhuckins dhuckins requested review from a team as code owners November 12, 2024 16:31
@dhuckins dhuckins changed the title Dh/hvs pg rotating hvs pg rotating secret Nov 12, 2024
docs/resources/vault_secrets_integration_postgres.md Outdated Show resolved Hide resolved
docs/resources/vault_secrets_rotating_secret.md Outdated Show resolved Hide resolved

// Inner API-compatible models derived from the Terraform fields
capabilities []*secretmodels.Secrets20231128Capability `tfsdk:"-"`
staticCredentialDetails *secretmodels.Secrets20231128PostgresStaticCredentialsRequest `tfsdk:"-"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need to add a gateway pool ID here as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we introduce that separately (in a diff PR) or here?
are (should) gateways be added to the tf provider?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd opt for here since a postgres integration is not particularly useful without a gateway

averche
averche previously approved these changes Nov 22, 2024
Copy link
Contributor

@pierluc-codes pierluc-codes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • postgresql vs postgres

  • no test?

Import is supported using the following syntax:

```shell
terraform import hcp_vault_secrets_integration_postgres.example my-postgres-1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clarify my-postgres-1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,57 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "hcp_vault_secrets_integration_postgres Resource - terraform-provider-hcp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be named postgresql?


### Optional

- `project_id` (String) HCP project ID that owns the HCP Vault Secrets integration. Inferred from the provider configuration if omitted.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where this can be found?


Required:

- `connection_string` (String, Sensitive) Connection string (DSN) for the Postgres database.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where this can be found?


### Required

- `capabilities` (Set of String) Capabilities enabled for the integration. See the Vault Secrets documentation for the list of supported capabilities per provider.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find the matching documentation

Description: "Connection string (DSN) for the Postgres database.",
Required: true,
Sensitive: true,
Validators: nil, // TODO: add validation for the URL format?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix or remove TODO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants