Skip to content

Commit 2e2b2bc

Browse files
committed
update doc
1 parent c084136 commit 2e2b2bc

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

docs/resources/secret.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ resource "scaleway_secret" "main" {
2323
### Ephemeral Policy
2424

2525
```terraform
26-
resource "scaleway_secrey" "ephemeral" {
26+
resource "scaleway_secret" "ephemeral" {
2727
name = "foo"
2828
ephemeral_policy {
2929
ttl = "24h"
@@ -42,7 +42,7 @@ The following arguments are supported:
4242
- `description` - (Optional) Description of the secret (e.g. `my-new-description`).
4343
- `tags` - (Optional) Tags of the secret (e.g. `["tag", "secret"]`).
4444
- `ephemeral_policy` - (Optional) Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
45-
- `ttl` - (Optional) Time frame, from one second and up to one year, during which the secret's versions are valid. (in seconds). Has to be specified in [Go Duration format](https://pkg.go.dev/time#ParseDuration) (ex: "30m", "24h").
45+
- `ttl` - (Optional) Time frame, from one second and up to one year, during which the secret's versions are valid. Has to be specified in [Go Duration format](https://pkg.go.dev/time#ParseDuration) (ex: "30m", "24h").
4646
- `expires_once_accessed` - (Optional) True if the secret version expires after a single user access.
4747
- `action` - (Required) Action to perform when the version of a secret expires. Available values can be found in [SDK constants](https://pkg.go.dev/github.com/scaleway/scaleway-sdk-go@master/api/secret/v1beta1#pkg-constants).
4848
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions)

internal/services/secret/secret.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,18 @@ func ResourceSecret() *schema.Resource {
8787
Type: schema.TypeString,
8888
DiffSuppressFunc: dsf.Duration,
8989
ValidateFunc: verify.IsDuration(),
90+
Description: "Time frame, from one second and up to one year, during which the secret's versions are valid. Has to be specified in Go Duration format",
9091
},
9192
"expires_once_accessed": {
92-
Type: schema.TypeBool,
93-
Optional: true,
93+
Type: schema.TypeBool,
94+
Optional: true,
95+
Description: "True if the secret version expires after a single user access.",
9496
},
9597
"action": {
9698
Type: schema.TypeString,
9799
Required: true,
98100
ValidateDiagFunc: verify.ValidateEnum[secret.EphemeralPolicyAction](),
101+
Description: "Action to perform when the version of a secret expires.",
99102
},
100103
},
101104
},

0 commit comments

Comments
 (0)