Key Lifecycle Rules
A KeyLifecycleRule represents a rule that applies to API keys, GPG keys, and SSH keys (also called User Public Keys) based on their inactivity or age.
Keys that have been unused for the specified number of days will be deleted. SSH keys can also be configured to expire after a specified number of days. SSH key expiration applies only to User Public Keys used for inbound SFTP/SSH login, not Remote Server outbound SSH keys.
Resource Schema
Optional
| Property | Description |
|---|---|
| key_type String | Key type for which the rule will apply (gpg, ssh, or api). Possible values: gpg, ssh, api |
| inactivity_days Int64 | Number of days of inactivity before the rule applies. |
| expiration_days Int64 | Number of days after creation before an SSH key expires. Applies only to SSH keys. |
| apply_to_all_workspaces Bool | If true, a default-workspace rule also applies to keys in all workspaces. |
| name String | Key Lifecycle Rule name |
| workspace_id Int64 | Workspace ID. 0 means the default workspace. |
Read Only
| Property | Description |
|---|---|
| id Int64 | Key Lifecycle Rule ID |
Resource Import
This Resource supports importing using the following syntax:
Data Source Schema
Required
| Property | Description |
|---|---|
| id Int64 | Key Lifecycle Rule ID |
Read Only
| Property | Description |
|---|---|
| key_type String | Key type for which the rule will apply (gpg, ssh, or api). Possible values: gpg, ssh, api |
| inactivity_days Int64 | Number of days of inactivity before the rule applies. |
| expiration_days Int64 | Number of days after creation before an SSH key expires. Applies only to SSH keys. |
| apply_to_all_workspaces Bool | If true, a default-workspace rule also applies to keys in all workspaces. |
| name String | Key Lifecycle Rule name |
| workspace_id Int64 | Workspace ID. 0 means the default workspace. |