-
Notifications
You must be signed in to change notification settings - Fork 55
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
New Data source data.boundary_user
#468
Conversation
data.boundary_user
data.boundary_user
data.boundary_user
data.boundary_user
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.
Going to continue looking after some of the Hashiconf events, but figured I could give the two immediate comments I noticed so long
I believe all requested changes have been resolved: $ make testacc TESTARGS='-run=TestAccUserDataSource_'
TF_ACC=1 go test ./... -v -run=TestAccUserDataSource_ -timeout 120m
? github.com/hashicorp/terraform-provider-boundary [no test files]
? github.com/hashicorp/terraform-provider-boundary/plugins/kms [no test files]
=== RUN TestAccUserDataSource_basicOrgUser
--- PASS: TestAccUserDataSource_basicOrgUser (5.65s)
=== RUN TestAccUserDataSource_globalAdminUser
--- PASS: TestAccUserDataSource_globalAdminUser (4.56s)
PASS
ok github.com/hashicorp/terraform-provider-boundary/internal/provider 13.480s Please note - I had to write a template for the |
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 is looking really good thanks for jumping onto this!
Oh sorry @drewmullen I think my comment might have been confusing. When I said lets remove |
OH LOL ok, sure. On a flight back from hashiconf today but I'll send those up this weekend |
I re-added the .vscode dir and updated the docs to include info on doc generation and using the, now baked in, debugger @louisruch |
@drewmullen looks look gen-delta is failing. To fix it I believe you need to run |
@drewmullen looks like you still need to run |
I did run it but it looks like it quietly fails: make gen
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
rendering website for provider "terraform-provider-boundary" (as "terraform-provider-boundary")
copying any existing content to tmp dir
exporting schema from Terraform
compiling provider "boundary"
using Terraform CLI binary from PATH if available, otherwise downloading latest Terraform CLI binary
running terraform init
getting provider schema
rendering missing docs
generating missing resource content
generating template for "boundary_storage_bucket"
generating template for "boundary_user"
generating template for "boundary_auth_method_oidc"
resource "boundary_scope" template exists, skipping
generating template for "boundary_credential_store_vault"
generating template for "boundary_managed_group"
generating template for "boundary_host_catalog_static"
generating template for "boundary_host_set"
generating template for "boundary_host_set_plugin"
resource "boundary_role" template exists, skipping
generating template for "boundary_account_password"
generating template for "boundary_credential_username_password"
generating template for "boundary_credential_store_static"
generating template for "boundary_host_catalog"
generating template for "boundary_account_ldap"
generating template for "boundary_credential_library_vault"
generating template for "boundary_auth_method_password"
generating template for "boundary_managed_group_ldap"
generating template for "boundary_credential_json"
generating template for "boundary_host_set_static"
generating template for "boundary_target"
generating template for "boundary_account"
generating template for "boundary_auth_method_ldap"
generating template for "boundary_host_catalog_plugin"
generating template for "boundary_credential_library_vault_ssh_certificate"
generating template for "boundary_credential_ssh_private_key"
resource "boundary_group" template exists, skipping
generating template for "boundary_host"
generating template for "boundary_host_static"
generating template for "boundary_worker"
generating template for "boundary_account_oidc"
generating template for "boundary_auth_method"
generating missing data source content
resource "boundary_user" template exists, skipping
resource "boundary_scope" template exists, skipping
generating missing provider content
provider "terraform-provider-boundary" template exists, skipping
rendering static website
cleaning rendered website dir
removing directory: "data-sources"
removing file: "index.md"
removing directory: "resources"
rendering templated website to static markdown
rendering "data-sources/scope.md.tmpl"
rendering "data-sources/user.md.tmpl"
rendering "index.md.tmpl"
rendering "resources/account.md.tmpl"
rendering "resources/account_ldap.md.tmpl"
rendering "resources/account_oidc.md.tmpl"
rendering "resources/account_password.md.tmpl"
rendering "resources/auth_method.md.tmpl"
rendering "resources/auth_method_ldap.md.tmpl"
rendering "resources/auth_method_oidc.md.tmpl"
rendering "resources/auth_method_password.md.tmpl"
rendering "resources/credential_json.md.tmpl"
rendering "resources/credential_library_vault.md.tmpl"
rendering "resources/credential_library_vault_ssh_certificate.md.tmpl"
rendering "resources/credential_ssh_private_key.md.tmpl"
rendering "resources/credential_store_static.md.tmpl"
rendering "resources/credential_store_vault.md.tmpl"
rendering "resources/credential_username_password.md.tmpl"
rendering "resources/group.md.tmpl"
rendering "resources/host.md.tmpl"
rendering "resources/host_catalog.md.tmpl"
rendering "resources/host_catalog_plugin.md.tmpl"
rendering "resources/host_catalog_static.md.tmpl"
rendering "resources/host_set.md.tmpl"
rendering "resources/host_set_plugin.md.tmpl"
rendering "resources/host_set_static.md.tmpl"
rendering "resources/host_static.md.tmpl"
rendering "resources/managed_group.md.tmpl"
rendering "resources/managed_group_ldap.md.tmpl"
rendering "resources/role.md.tmpl"
rendering "resources/scope.md.tmpl"
rendering "resources/storage_bucket.md.tmpl"
rendering "resources/target.md.tmpl"
rendering "resources/user.md.tmpl"
rendering "resources/worker.md.tmpl"
copywrite headers
make: copywrite: No such file or directory
make: *** [copywrite] Error 1 |
Looks like you need copywrite, try running |
same outcome: $ make tools
go generate -tags tools tools/tools.go
go install github.com/hashicorp/copywrite@v0.15.0
go: downloading github.com/hashicorp/copywrite v0.15.0
go: downloading github.com/hashicorp/addLicense v1.4.1
go: downloading github.com/jedib0t/go-pretty/v6 v6.4.4
go: downloading github.com/bradleyfalzon/ghinstallation/v2 v2.1.0
go: downloading github.com/cli/go-gh v1.0.0
go: downloading golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5
go: downloading golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab
go: downloading golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17
go: downloading golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
go: downloading golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
go: downloading golang.org/x/net v0.0.0-20220923203811-8be639271d50
go: downloading github.com/golang-jwt/jwt/v4 v4.4.2
$ make gen
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
rendering website for provider "terraform-provider-boundary" (as "terraform-provider-boundary")
copying any existing content to tmp dir
exporting schema from Terraform
compiling provider "boundary"
using Terraform CLI binary from PATH if available, otherwise downloading latest Terraform CLI binary
running terraform init
getting provider schema
rendering missing docs
generating missing resource content
generating template for "boundary_credential_store_vault"
generating template for "boundary_credential_username_password"
generating template for "boundary_host_set"
generating template for "boundary_worker"
generating template for "boundary_managed_group_ldap"
generating template for "boundary_account"
resource "boundary_group" template exists, skipping
generating template for "boundary_host"
generating template for "boundary_host_catalog"
generating template for "boundary_host_catalog_plugin"
generating template for "boundary_managed_group"
generating template for "boundary_auth_method_oidc"
generating template for "boundary_auth_method_password"
generating template for "boundary_credential_library_vault_ssh_certificate"
resource "boundary_scope" template exists, skipping
generating template for "boundary_user"
generating template for "boundary_account_oidc"
generating template for "boundary_credential_library_vault"
generating template for "boundary_host_catalog_static"
generating template for "boundary_host_set_plugin"
resource "boundary_role" template exists, skipping
generating template for "boundary_storage_bucket"
generating template for "boundary_account_ldap"
generating template for "boundary_account_password"
generating template for "boundary_auth_method"
generating template for "boundary_credential_ssh_private_key"
generating template for "boundary_host_set_static"
generating template for "boundary_host_static"
generating template for "boundary_target"
generating template for "boundary_auth_method_ldap"
generating template for "boundary_credential_json"
generating template for "boundary_credential_store_static"
generating missing data source content
resource "boundary_scope" template exists, skipping
resource "boundary_user" template exists, skipping
generating missing provider content
provider "terraform-provider-boundary" template exists, skipping
rendering static website
cleaning rendered website dir
removing directory: "data-sources"
removing file: "index.md"
removing directory: "resources"
rendering templated website to static markdown
rendering "data-sources/scope.md.tmpl"
rendering "data-sources/user.md.tmpl"
rendering "index.md.tmpl"
rendering "resources/account.md.tmpl"
rendering "resources/account_ldap.md.tmpl"
rendering "resources/account_oidc.md.tmpl"
rendering "resources/account_password.md.tmpl"
rendering "resources/auth_method.md.tmpl"
rendering "resources/auth_method_ldap.md.tmpl"
rendering "resources/auth_method_oidc.md.tmpl"
rendering "resources/auth_method_password.md.tmpl"
rendering "resources/credential_json.md.tmpl"
rendering "resources/credential_library_vault.md.tmpl"
rendering "resources/credential_library_vault_ssh_certificate.md.tmpl"
rendering "resources/credential_ssh_private_key.md.tmpl"
rendering "resources/credential_store_static.md.tmpl"
rendering "resources/credential_store_vault.md.tmpl"
rendering "resources/credential_username_password.md.tmpl"
rendering "resources/group.md.tmpl"
rendering "resources/host.md.tmpl"
rendering "resources/host_catalog.md.tmpl"
rendering "resources/host_catalog_plugin.md.tmpl"
rendering "resources/host_catalog_static.md.tmpl"
rendering "resources/host_set.md.tmpl"
rendering "resources/host_set_plugin.md.tmpl"
rendering "resources/host_set_static.md.tmpl"
rendering "resources/host_static.md.tmpl"
rendering "resources/managed_group.md.tmpl"
rendering "resources/managed_group_ldap.md.tmpl"
rendering "resources/role.md.tmpl"
rendering "resources/scope.md.tmpl"
rendering "resources/storage_bucket.md.tmpl"
rendering "resources/target.md.tmpl"
rendering "resources/user.md.tmpl"
rendering "resources/worker.md.tmpl"
copywrite headers
make: copywrite: No such file or directory
make: *** [copywrite] Error 1 |
wrong go path in my session. pushing final commit now |
Ok running now 🤞 |
to defend myself from future haters - it looks like |
closes: #464
Tests
I wrote tests that search for the global user and an org user (created by
boundary_user
). Important note: this new data source test will rely on the global admin being created with the same values as is currently used in test scaffolding. If you update thelogin_name
or anything, these tests will fail as they're predicated on the current values.Notes
login_name
,scope
,authorized_actions
, andparent_account_id
can be added to the resourceboundary_user
schema but I figured that should be a separate PR..vscode
files that are quite useful for debugging in vscode. I have a blog write-up here. These were incorporated into the aws provider developer docs. I can rip this out if you don't want it in the repo