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 docs for registry account resources #48

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions docs/resources/registry_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "tlspc_registry_account Resource - tlspc"
subcategory: ""
description: |-

Manage pull credentials for the Venafi OCI private registry
---

# tlspc_registry_account (Resource)


Manage pull credentials for the Venafi OCI private registry

## Example Usage

Expand All @@ -31,13 +31,17 @@ output "dockerconfig" {

### Required

- `credential_lifetime` (Number)
- `name` (String)
- `owner` (String)
- `scopes` (Set of String)
- `credential_lifetime` (Number) Credential Lifetime in days
- `name` (String) The name of the service account
- `owner` (String) ID of the team that owns this service account
- `scopes` (Set of String) A list of the images that this service account is authorised to access; valid options include:
* oci-registry-cm
* oci-registry-cm-ape
* oci-registry-cm-vei
Copy link
Member

Choose a reason for hiding this comment

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

There's a 4th one for openshift-routes... I have asked to find out what it is.

Copy link
Member

Choose a reason for hiding this comment

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

the 4th one. is: oci-registry-cm-os

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd not intended that this list would be exhaustive (because I think that there should be an authoritative list somewhere else) - but I'll add it.

* oci-registry-cm-os

### Read-Only

- `id` (String) The ID of this resource.
- `oci_account_name` (String)
- `oci_registry_token` (String, Sensitive)
- `oci_account_name` (String) Generated OCI account name
- `oci_registry_token` (String, Sensitive) Generated OCI registry token
24 changes: 18 additions & 6 deletions internal/provider/registry_account_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func (r *registryAccountResource) Metadata(_ context.Context, req resource.Metad

func (r *registryAccountResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "Manage pull credentials for the Venafi OCI private registry",
Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Computed: true,
Expand All @@ -45,24 +46,35 @@ func (r *registryAccountResource) Schema(_ context.Context, _ resource.SchemaReq
},
},
"name": schema.StringAttribute{
Required: true,
Required: true,
MarkdownDescription: "The name of the service account",
},
"owner": schema.StringAttribute{
Required: true,
Required: true,
MarkdownDescription: "ID of the team that owns this service account",
},
"scopes": schema.SetAttribute{
Required: true,
ElementType: types.StringType,
MarkdownDescription: `A list of the images that this service account is authorised to access; valid options include:
* oci-registry-cm
* oci-registry-cm-ape
* oci-registry-cm-vei
* oci-registry-cm-os
`,
},
"oci_account_name": schema.StringAttribute{
Computed: true,
Computed: true,
MarkdownDescription: "Generated OCI account name",
},
"oci_registry_token": schema.StringAttribute{
Computed: true,
Sensitive: true,
Computed: true,
Sensitive: true,
MarkdownDescription: "Generated OCI registry token",
},
"credential_lifetime": schema.Int32Attribute{
Required: true,
Required: true,
MarkdownDescription: "Credential Lifetime in days",
},
},
}
Expand Down