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 vault_namespace data source #1768

Closed
wants to merge 2 commits into from

Conversation

tmatilai
Copy link
Contributor

Add vault_namespace data source for fetching information of specified or the current namespace.

Closes #1748
Relates #1766
Relates #1756

Output from acceptance testing
$ make testacc-ent TESTARGS='-run=TestAccDataSourceNamespace'
make testacc TF_ACC_ENTERPRISE=1
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test -run=TestAccDataSourceNamespace -timeout 30m ./...
?       github.com/hashicorp/terraform-provider-vault   [no test files]
?       github.com/hashicorp/terraform-provider-vault/cmd/coverage      [no test files]
?       github.com/hashicorp/terraform-provider-vault/cmd/generate      [no test files]
ok      github.com/hashicorp/terraform-provider-vault/codegen   (cached) [no tests to run]
?       github.com/hashicorp/terraform-provider-vault/generated [no test files]
ok      github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/decode    (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/encode    (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/generated/resources/transform/alphabet    (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/generated/resources/transform/role        (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/generated/resources/transform/template    (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/generated/resources/transform/transformation      (cached) [no tests to run]
?       github.com/hashicorp/terraform-provider-vault/helper    [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/consts   [no test files]
ok      github.com/hashicorp/terraform-provider-vault/internal/identity/entity  (cached) [no tests to run]
?       github.com/hashicorp/terraform-provider-vault/internal/identity/group   [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/identity/mfa     [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/pki      [no test files]
ok      github.com/hashicorp/terraform-provider-vault/internal/provider (cached) [no tests to run]
?       github.com/hashicorp/terraform-provider-vault/schema    [no test files]
ok      github.com/hashicorp/terraform-provider-vault/testutil  (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/util      (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/vault     10.998s

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Add data source for fetching information of specified or the current
namespace.
},
})

/* TODO: Enable when #1766 merged
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this can be enabled now that #2033 is merged?

Copy link
Contributor

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

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

@tmatilai Thanks for the contribution and I apologize for the delay in the review. Overall the changes look reasonable.

I am getting the following build error:

$ make dev
==> Checking that code complies with gofmt requirements...
go build -o terraform-provider-vault
# github.com/hashicorp/terraform-provider-vault/vault
vault/data_source_namespace.go:21:16: undefined: ReadContextWrapper
vault/data_source_namespace.go:70:37: undefined: SysNamespaceRoot
make: *** [dev] Error 1

@tmatilai
Copy link
Contributor Author

tmatilai commented Jan 29, 2024

@fairclothjm Thanks for the feedback and attention! I didn't want to use more time on keeping the PRs up-to-date before getting any signal that they could be accepted.

I have a bit busy week again, but will definitely try to rebase and revisit these soon. 🙂

@fairclothjm fairclothjm mentioned this pull request Mar 25, 2024
2 tasks
@fairclothjm
Copy link
Contributor

@tmatilai FYI, I opened a PR which will supersede this PR.

@tmatilai
Copy link
Contributor Author

@fairclothjm Thank you so much! Sorry, I just haven't found the time and energy to clean these up. So many things going on... 😅

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

Successfully merging this pull request may close these issues.

Feature request: Data source for namespaces
2 participants