Skip to content

Commit

Permalink
Merge pull request #1022 from Juniper/1008-fix-nonsense-doc-string
Browse files Browse the repository at this point in the history
Improve inline documentation for token resource
  • Loading branch information
chrismarget-j authored Jan 22, 2025
2 parents c19b0d2 + 5fe9cf5 commit 597198f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions apstra/authentication/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ func (o ApiToken) EphemeralAttributes() map[string]ephemeralSchema.Attribute {
},
"do_not_log_out": ephemeralSchema.BoolAttribute{
Optional: true,
MarkdownDescription: "By default, API sessions are closed when Terraform's `Close` operation calls " +
"`logout`. Set this value to `true` to prevent ending the session when Terraform determines the " +
"API key is no longer in use.",
MarkdownDescription: "By default, tokens / API sessions produced by this resource are invalidated by " +
"calling Apstra's `logout` API when Terraform invokes `Close` on this resource. Setting this " +
"attribute to `true` changes that behavior. `logout` will not be called, and the token produced by " +
"this resource will remain valid until it expires or something else invalidates it.",
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/ephemeral-resources/api_token.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ resource "null_resource" "example" {

### Optional

- `do_not_log_out` (Boolean) By default, API sessions are closed when Terraform's `Close` operation calls `logout`. Set this value to `true` to prevent ending the session when Terraform determines the API key is no longer in use.
- `do_not_log_out` (Boolean) By default, tokens / API sessions produced by this resource are invalidated by calling Apstra's `logout` API when Terraform invokes `Close` on this resource. Setting this attribute to `true` changes that behavior. `logout` will not be called, and the token produced by this resource will remain valid until it expires or something else invalidates it.
- `warn_seconds` (Number) Terraform will produce a warning when the token value is referenced with less than this amount of time remaining before expiration. Note that determination of remaining token lifetime depends on clock sync between the Apstra server and the Terraform host. Value `0` disables warnings. Default value is `60`.

### Read-Only
Expand Down

0 comments on commit 597198f

Please sign in to comment.