Skip to content

Commit

Permalink
Add docs for registry account resources
Browse files Browse the repository at this point in the history
  • Loading branch information
aidy committed Feb 26, 2025
1 parent 84d5445 commit aec48f1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
19 changes: 11 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,16 @@ 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

### 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
23 changes: 17 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,34 @@ 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_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

0 comments on commit aec48f1

Please sign in to comment.