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

Add new data source for HCP Vault #524

Merged
merged 3 commits into from
Jun 13, 2023
Merged

Add new data source for HCP Vault #524

merged 3 commits into from
Jun 13, 2023

Conversation

austinvalle
Copy link
Member

@austinvalle austinvalle commented Jun 7, 2023

Closes #523

🛠️ Description

Adds a new data source for HCP Vault for retrieving secrets

🏗️ 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:

 $ git rev-parse HEAD 
a688a54c8472e52c8208f14da6c1aa3e3a24d4e1

 $ make testacc TESTARGS='-run=TestAcc_dataSourceVaultSecretsApp'
==> Checking that code complies with gofmt requirements...
golangci-lint run --config ./golangci-config.yml 
TF_ACC=1 go test ./internal/... -v -run=TestAcc_dataSourceVaultSecretsApp -timeout 360m -parallel=10
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-hcp/internal/clients    0.542s [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-hcp/internal/consul     0.348s [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-hcp/internal/input      0.242s [no tests to run]
=== RUN   TestAcc_dataSourceVaultSecretsApp
--- PASS: TestAcc_dataSourceVaultSecretsApp (13.19s)
PASS
ok      github.com/hashicorp/terraform-provider-hcp/internal/provider   13.832s

@austinvalle austinvalle requested a review from a team as a code owner June 7, 2023 20:21
@austinvalle austinvalle requested review from a team, blueberry-pi and mercedesbh June 7, 2023 20:21
Copy link

@lursu lursu left a comment

Choose a reason for hiding this comment

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

LGTM Ty for working on this for us!

@austinvalle
Copy link
Member Author

Sync'd fork with main and ran tests locally again ✅

 $ git rev-parse HEAD
dd70d31d5c040e7abe868cb0a8502e0b0d20cdab

 $ make testacc TESTARGS='-run=TestAcc_dataSourceVaultSecretsApp'
==> Checking that code complies with gofmt requirements...
golangci-lint run --config ./golangci-config.yml 
TF_ACC=1 go test ./internal/... -v -run=TestAcc_dataSourceVaultSecretsApp -timeout 360m -parallel=10
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-hcp/internal/clients    0.678s [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-hcp/internal/consul     0.397s [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-hcp/internal/input      0.475s [no tests to run]
=== RUN   TestAcc_dataSourceVaultSecretsApp
--- PASS: TestAcc_dataSourceVaultSecretsApp (9.34s)
PASS
ok      github.com/hashicorp/terraform-provider-hcp/internal/provider   10.012s

client := meta.(*clients.Client)
loc := &sharedmodels.HashicorpCloudLocationLocation{
OrganizationID: client.Config.OrganizationID,
ProjectID: client.Config.ProjectID,
Copy link
Contributor

Choose a reason for hiding this comment

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

The provider now has first-class support for multi-project, which includes a pattern where individual resources should support an Optional project_id attribute. This new data source should probably also support that pattern.

@lursu lursu merged commit 08a0a25 into hashicorp:main Jun 13, 2023
@austinvalle austinvalle deleted the av/data-source branch June 13, 2023 13:40
aidan-mundy added a commit that referenced this pull request Jun 20, 2023
commit d4aa0c6
Author: delores-hashicorp <109518991+delores-hashicorp@users.noreply.github.com>
Date:   Tue Jun 20 17:00:06 2023 +0200

    [HCPF-644] Add more details to `project_id` description. (#527)

    Add more details to project_id description.

commit 5b70411
Author: Judith Malnick <judith@hashicorp.com>
Date:   Fri Jun 16 14:06:21 2023 -0700

    [docs] Fix link to architecture image now that cloud website has moved (#530)

    * fix link to architecture image now that cloud website has moved

    * add changes to template, remove dimiensions, generate docs

commit 2173a20
Author: Aidan Mundy <aidan.mundy@hashicorp.com>
Date:   Tue Jun 13 11:20:47 2023 -0400

    Fix missing CHANGELOG entry

commit 08a0a25
Author: Austin Valle <austinvalle@gmail.com>
Date:   Tue Jun 13 09:23:55 2023 -0400

    Add new data source for HCP Vault (#524)

    * Add new data source

    * add changelog
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.

5 participants