Skip to content

Commit

Permalink
docs: Improve documentation for credentials use (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamhar committed May 1, 2024
1 parent a7f59bb commit 91c1391
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 13 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ website/vendor
# Keep windows files with windows line endings
*.winfile eol=crlf

local-tests
local-tests

# Ignore artifact
terraform-provider-sonatypeiq
13 changes: 5 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "sonatypeiq Provider"
subcategory: ""
description: |-
---

# sonatypeiq Provider

When using the provider the username/password need to have the correct role/permissions assigned to them for the
resources you intend to consume or manages.

[User management](https://help.sonatype.com/en/user-management.html) instruction can be found in the official
documentation. Creating roles is also documented [here](https://help.sonatype.com/en/role-management.html) and how to
generate the username/tokens for a user can be found [here](https://help.sonatype.com/en/iq-server-user-tokens.html)

## Example Usage

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ require (
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.20.0 // indirect
github.com/hashicorp/terraform-json v0.21.0 // indirect
github.com/hashicorp/terraform-plugin-docs v0.19.1 // indirect
github.com/hashicorp/terraform-plugin-docs v0.19.2 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
Expand All @@ -70,7 +70,7 @@ require (
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/yuin/goldmark v1.7.0 // indirect
github.com/yuin/goldmark v1.7.1 // indirect
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zclconf/go-cty v1.14.4 // indirect
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ github.com/hashicorp/terraform-plugin-docs v0.18.0 h1:2bINhzXc+yDeAcafurshCrIjtd
github.com/hashicorp/terraform-plugin-docs v0.18.0/go.mod h1:iIUfaJpdUmpi+rI42Kgq+63jAjI8aZVTyxp3Bvk9Hg8=
github.com/hashicorp/terraform-plugin-docs v0.19.1 h1:XYIlGCfnUDVTyKPIHFKRDfB4INU+pyPKk6VZ/1apPIc=
github.com/hashicorp/terraform-plugin-docs v0.19.1/go.mod h1:NPfKCSfzTtq+YCFHr2qTAMknWUxR8C4KgTbGkHULSV8=
github.com/hashicorp/terraform-plugin-docs v0.19.2 h1:YjdKa1vuqt9EnPYkkrv9HnGZz175HhSJ7Vsn8yZeWus=
github.com/hashicorp/terraform-plugin-docs v0.19.2/go.mod h1:gad2aP6uObFKhgNE8DR9nsEuEQnibp7il0jZYYOunWY=
github.com/hashicorp/terraform-plugin-framework v1.4.2 h1:P7a7VP1GZbjc4rv921Xy5OckzhoiO3ig6SGxwelD2sI=
github.com/hashicorp/terraform-plugin-framework v1.4.2/go.mod h1:GWl3InPFZi2wVQmdVnINPKys09s9mLmTZr95/ngLnbY=
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc=
Expand Down Expand Up @@ -428,6 +430,8 @@ github.com/yuin/goldmark v1.6.0 h1:boZcn2GTjpsynOsC0iJHnBWa4Bi0qzfJjthwauItG68=
github.com/yuin/goldmark v1.6.0/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yuin/goldmark v1.7.0 h1:EfOIvIMZIzHdB/R/zVrikYLPPwJlfMcNczJFMs1m6sA=
github.com/yuin/goldmark v1.7.0/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark v1.7.1 h1:3bajkSilaCbjdKVsKdZjZCLBNPL9pYzrCakKaf4U49U=
github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc=
github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0=
github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ func (p *SonatypeIqProvider) Schema(ctx context.Context, req provider.SchemaRequ
Required: true,
},
"username": schema.StringAttribute{
MarkdownDescription: "Administrator Username for Sonatype IQ Server",
MarkdownDescription: "Username for Sonatype IQ Server, requires role/permissions scoped to the resources you wish to manage",
Required: true,
},
"password": schema.StringAttribute{
MarkdownDescription: "Password for your Administrator user for Sonatype IQ Server",
MarkdownDescription: "Password for your user for Sonatype IQ Server",
Required: true,
Sensitive: true,
},
Expand Down
21 changes: 21 additions & 0 deletions templates/index.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# sonatypeiq Provider

When using the provider the username/password need to have the correct role/permissions assigned to them for the
resources you intend to consume or manages.

[User management](https://help.sonatype.com/en/user-management.html) instruction can be found in the official
documentation. Creating roles is also documented [here](https://help.sonatype.com/en/role-management.html) and how to
generate the username/tokens for a user can be found [here](https://help.sonatype.com/en/iq-server-user-tokens.html)

## Example Usage

{{ tffile "examples/provider/provider.tf" }}

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `password` (String, Sensitive) Password for your Administrator user for Sonatype IQ Server
- `url` (String) Sonatype IQ Server URL
- `username` (String) Administrator Username for Sonatype IQ Server

0 comments on commit 91c1391

Please sign in to comment.