Skip to content

Commit 1eeb3b9

Browse files
committed
Add docs for registry account resources
1 parent 84d5445 commit 1eeb3b9

File tree

2 files changed

+30
-14
lines changed

2 files changed

+30
-14
lines changed

docs/resources/registry_account.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
page_title: "tlspc_registry_account Resource - tlspc"
44
subcategory: ""
55
description: |-
6-
6+
Manage pull credentials for the Venafi OCI private registry
77
---
88

99
# tlspc_registry_account (Resource)
1010

11-
11+
Manage pull credentials for the Venafi OCI private registry
1212

1313
## Example Usage
1414

@@ -31,13 +31,17 @@ output "dockerconfig" {
3131

3232
### Required
3333

34-
- `credential_lifetime` (Number)
35-
- `name` (String)
36-
- `owner` (String)
37-
- `scopes` (Set of String)
34+
- `credential_lifetime` (Number) Credential Lifetime in days
35+
- `name` (String) The name of the service account
36+
- `owner` (String) ID of the team that owns this service account
37+
- `scopes` (Set of String) A list of the images that this service account is authorised to access; valid options include:
38+
* oci-registry-cm
39+
* oci-registry-cm-ape
40+
* oci-registry-cm-vei
41+
* oci-registry-cm-os
3842

3943
### Read-Only
4044

4145
- `id` (String) The ID of this resource.
42-
- `oci_account_name` (String)
43-
- `oci_registry_token` (String, Sensitive)
46+
- `oci_account_name` (String) Generated OCI account name
47+
- `oci_registry_token` (String, Sensitive) Generated OCI registry token

internal/provider/registry_account_resource.go

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ func (r *registryAccountResource) Metadata(_ context.Context, req resource.Metad
3737

3838
func (r *registryAccountResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
3939
resp.Schema = schema.Schema{
40+
MarkdownDescription: "Manage pull credentials for the Venafi OCI private registry",
4041
Attributes: map[string]schema.Attribute{
4142
"id": schema.StringAttribute{
4243
Computed: true,
@@ -45,24 +46,35 @@ func (r *registryAccountResource) Schema(_ context.Context, _ resource.SchemaReq
4546
},
4647
},
4748
"name": schema.StringAttribute{
48-
Required: true,
49+
Required: true,
50+
MarkdownDescription: "The name of the service account",
4951
},
5052
"owner": schema.StringAttribute{
51-
Required: true,
53+
Required: true,
54+
MarkdownDescription: "ID of the team that owns this service account",
5255
},
5356
"scopes": schema.SetAttribute{
5457
Required: true,
5558
ElementType: types.StringType,
59+
MarkdownDescription: `A list of the images that this service account is authorised to access; valid options include:
60+
* oci-registry-cm
61+
* oci-registry-cm-ape
62+
* oci-registry-cm-vei
63+
* oci-registry-cm-os
64+
`,
5665
},
5766
"oci_account_name": schema.StringAttribute{
58-
Computed: true,
67+
Computed: true,
68+
MarkdownDescription: "Generated OCI account name",
5969
},
6070
"oci_registry_token": schema.StringAttribute{
61-
Computed: true,
62-
Sensitive: true,
71+
Computed: true,
72+
Sensitive: true,
73+
MarkdownDescription: "Generated OCI registry token",
6374
},
6475
"credential_lifetime": schema.Int32Attribute{
65-
Required: true,
76+
Required: true,
77+
MarkdownDescription: "Credential Lifetime in days",
6678
},
6779
},
6880
}

0 commit comments

Comments
 (0)