diff --git a/content/terraform-docs-common/docs/cloud-docs/api-docs/audit-trails.mdx b/content/terraform-docs-common/docs/cloud-docs/api-docs/audit-trails.mdx index a4dabad0b..b48e6cf3c 100644 --- a/content/terraform-docs-common/docs/cloud-docs/api-docs/audit-trails.mdx +++ b/content/terraform-docs-common/docs/cloud-docs/api-docs/audit-trails.mdx @@ -131,42 +131,47 @@ Every audit log event in the response array includes the following standard fiel The following audit trail events _only_ contain these standard fields: -| Event | Action | Description | -|----------------------------|--------------------------------------------------------------|------------------------------------------------------------| -| `agent` | `destroy` | Logged when an agent is destroyed. | -| `authentication_token` | `create`, `show`, `destroy` | Events related to authentication tokens. | -| `configuration_version` | `show`, `download` | Events related to configuration versions. | -| `notification_configuration` | `create`, `update`, `destroy`, `enable` | Events related to notification configurations. | -| `oauth_client` | `create`, `update`, `destroy` | Events related to OAuth clients. | -| `oauth_token` | `index`, `show`, `update`, `destroy` | Events related to OAuth tokens. | -| `organization` | `create`, `update`, `destroy` | Events related to organizations. | -| `organization_user` | `create`, `update`, `destroy` | Events related to organization users. | -| `policy` | `update`, `destroy` | Events related to policies. | -| `policy_check` | `override` | Events related to policy checks. | -| `policy_config` | `create` | Events related to policy configurations. | -| `policy_set` | `destroy` | Events related to policy sets. | -| `policy_version` | `create` | Events related to policy versions. | -| `project` | `create`, `update`, `destroy` | Events related to projects. | -| `registry_module` | `destroy`, `update` | Events related to registry modules. | -| `registry_provider` | `create`, `destroy` | Events related to registry providers. | -| `registry_provider_platform` | `create`, `destroy` | Events related to registry provider platforms. | -| `registry_provider_version` | `create`, `destroy` | Events related to registry provider versions. | -| `run` | `apply`, `cancel`, `force_cancel`, `discard`, `force_execute`, `create` | Events related to runs. | -| `run_trigger` | `create`, `destroy` | Events related to run triggers. | -| `saml_configuration` | `create`, `update`, `destroy`, `enable`, `disable` | Events related to SAML configurations. | -| `ssh_key` | `index`, `show`, `create`, `update`, `destroy` | Events related to SSH keys. | -| `stack` | `create` | Events related to creating stacks. | -| `state_version` | `index`, `show`, `create`, `soft_delete_backing_data`, `restore_backing_data`, `permanently_delete_backing_data` | Events related to state versions. | -| `task_stage` | `override` | Events related to an overridden task stage. | -| `user` | `index` | Events related to indexing users. | -| `var` | `index`, `show`, `create`, `update`, `destroy` | Events related to variables. | -| `vcs_repo` | `create` | Events related to creating a connection to a VCS repo. | +| Event | Action | Description | +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| `agent` | `destroy` | Logged when an agent is destroyed. | +| `authentication_token` | `create`, `show`, `destroy` | Events related to authentication tokens. | +| `configuration_version` | `show`, `download` | Events related to configuration versions. | +| `notification_configuration` | `create`, `update`, `destroy`, `enable` | Events related to notification configurations. | +| `oauth_client` | `create`, `update`, `destroy` | Events related to OAuth clients. | +| `oauth_token` | `index`, `show`, `update`, `destroy` | Events related to OAuth tokens. | +| `organization` | `create`, `update`, `destroy` | Events related to organizations. | +| `organization_user` | `create`, `update`, `destroy` | Events related to organization users. | +| `policy` | `update`, `destroy` | Events related to policies. | +| `policy_check` | `override` | Events related to policy checks. | +| `policy_config` | `create` | Events related to policy configurations. | +| `policy_set` | `destroy` | Events related to policy sets. | +| `policy_version` | `create` | Events related to policy versions. | +| `project` | `create`, `update`, `destroy` | Events related to projects. | +| `registry_module` | `destroy`, `update` | Events related to registry modules. | +| `registry_provider` | `create`, `destroy` | Events related to registry providers. | +| `registry_provider_platform` | `create`, `destroy` | Events related to registry provider platforms. | +| `registry_provider_version` | `create`, `destroy` | Events related to registry provider versions. | +| `run` | `apply`, `cancel`, `force_cancel`, `discard`, `force_execute`, `create` | Events related to runs. | +| `run_trigger` | `create`, `destroy` | Events related to run triggers. | +| `saml_configuration` | `create`, `update`, `destroy`, `enable`, `disable` | Events related to SAML configurations. | +| `ssh_key` | `index`, `show`, `create`, `update`, `destroy` | Events related to SSH keys. | +| `stack_configuration` | `create`, `download_source_bundle`, `download_json_schemas` | Events related to stack configurations. | +| `stack_diagnostic` | `acknowledge` | Events related to stack diagnostics. | +| `stack_plan` | `approve` ,`cancel` ,`discard` ,`download_apply_description` ,`download_plan_description` ,`replan` | Events related to stack plans. | +| `stack_source` | `create download` | Events related to stack sources. | +| `stack_state` | `download_description` | Events related to stack states. | +| `stack` | `create_destroy_plan` ,`delete_deployment` ,`delete` ,`force_delete` ,`latest_output_summary` ,`set_agent_pool` ,`update_configuration` ,`update` | Events related to stacks. | +| `state_version` | `index`, `show`, `create`, `soft_delete_backing_data`, `restore_backing_data`, `permanently_delete_backing_data` | Events related to state versions. | +| `task_stage` | `override` | Events related to an overridden task stage. | +| `user` | `index` | Events related to indexing users. | +| `var` | `index`, `show`, `create`, `update`, `destroy` | Events related to variables. | +| `vcs_repo` | `create` | Events related to creating a connection to a VCS repo. | The following sections list the audit log events containing both the standard response schema and a specific payload for each action. ## Data retention policy events -You can define [data retention policies](/terraform/cloud-docs/workspaces/settings/deletion#data-retention-policies) to help reduce object storage consumption. +You can define [data retention policies](/terraform/cloud-docs/workspaces/settings/deletion#data-retention-policies) to help reduce object storage consumption. ### Destroy @@ -355,7 +360,7 @@ An HCP Terraform organization emits this event when a [run task](/terraform/clou | `organization_task_id` | string | The ID of the organization task related to the result. | | `organization_task_url` | string | The URL associated with the organization task. | -### Create a workspace's run task +### Create a workspace's run task An HCP Terraform organization emits this event when someone in your organization [associates a new run task with a workspace](/terraform/cloud-docs/workspaces/settings/run-tasks#associating-run-tasks-with-a-workspace) (`workspace_task`). Alongside the [standard audit trail fields](#standard-response-fields), this event response includes the following fields: @@ -368,7 +373,7 @@ An HCP Terraform organization emits this event when someone in your organization | `organization_task` | string | The organization's task. | | `organization_task_id` | string | The ID of the organization's task.| -### Update a workspace's run task +### Update a workspace's run task An HCP Terraform organization emits this event when someone in your organization updates a workspace's associated run task (`workspace_task`). Alongside the [standard audit trail fields](#standard-response-fields), this event response includes the following fields: @@ -381,7 +386,7 @@ An HCP Terraform organization emits this event when someone in your organization | `organization_task` | string | The organization's task. | | `organization_task_id` | string | The ID of the organization's task.| -### Destroy a workspace's run task +### Destroy a workspace's run task An HCP Terraform organization emits this event when someone in your organization destroys a workspace's associated run task (`workspace_task`). Alongside the [standard audit trail fields](#standard-response-fields), this event response includes the following fields: @@ -394,9 +399,115 @@ An HCP Terraform organization emits this event when someone in your organization | `organization_task` | string | The organization's task. | | `organization_task_id` | string | The ID of the organization's task.| +## Stack events (Public Beta) + +[Stacks](/terraform/cloud-docs/stacks) are a powerful configuration layer in Terraform that simplifies managing your infrastructure modules and then repeating that infrastructure. + +### Stack configuration events + +A Stack configuration emits events when someone in your organization performs any of the following actions: + +| Event | Action | +| ------------------------ | ----------------------------------------------- | +| `create` | A new configuration is created for a stack. | +| `download_source_bundle` | The source for the configuration is downloaded. | +| `download_json_schemas` | The JSON Schemas document is downloaded. | + +Alongside the [standard audit trail fields](#standard-response-fields), these event responses include the following field: + +| Key | Data Type | Description | +| --------- | --------- | ---------------------------------- | +| `stack` | string | The related stack for the configuration. | + +### Stack diagnostic events + +A Stack diagnostic emits events when someone in your organization performs any of the following actions: + +| Event | Action | +| ------------- | ------------------------------------ | +| `acknowledge` | A stack diagnostic was acknowledged. | + +Alongside the [standard audit trail fields](#standard-response-fields), these event responses include the following field: + +| Key | Data Type | Description | +| --------- | --------- | ---------------------------------------- | +| `project` | string | The related project for the stack. | +| `stack` | string | The related stack for the configuration. | + +### Stack plan events + +A Stack plan emits events when someone in your organization performs any of the following actions: + +| Event | Action | +| ----------------------------- | ----------------------------------------------- | +| ` approve` | A plan is approved to be applied. | +| ` cancel` | A plan is cancelled and will no longer execute. | +| ` discard` | A paused plan is discarded. | +| ` download_apply_description` | The apply description is downloaded. | +| ` download_plan_description` | The plan description is downloaded. | +| ` replan` | A plan has been enqueued to execute again. | + +Alongside the [standard audit trail fields](#standard-response-fields), these event responses include the following fields: + +| Key | Data Type | Description | +| ------------ | --------- | ---------------------------------------- | +| `deployment` | string | The name of the deployment for the plan. | +| `stack` | string | The related stack for the configuration. | + +### Stack source events + +A Stack source emits events when someone in your organization performs any of the following actions: + +| Event | Action | +| ---------- | -------------------------------------------------- | +| `create` | A new source for a stack configuration is created. | +| `download` | The source is downloaded by someone. | + +Alongside the [standard audit trail fields](#standard-response-fields), these event responses include the following field: + +| Key | Data Type | Description | +| ------------ | --------- | ---------------------------------------- | +| `stack` | string | The related stack for the configuration. | + +### Stack state events + +A Stack state emits events when someone in your organization performs any of the following actions: + +| Event | Action | +| ----------------------- | ------------------------------------------------------ | +| ` download_description` | The description of the state is downloaded by someone. | + +Alongside the [standard audit trail fields](#standard-response-fields), these event responses include the following field: + +| Key | Data Type | Description | +| ------------ | --------- | ---------------------------------------- | +| `stack` | string | The related stack for the configuration. | + +### Stack events + +A Stack emits events when someone in your organization performs any of the following actions: + +| Event | Action | +| ----------------------- | ---------------------------------------------- | +| `create` | A new stack is created. | +| `create_destroy_plan` | A plan to destroy the stack is created. | +| `delete` | The stack is deleted. | +| `delete_deployment` | A deployment in the stack is deleted. | +| `force_delete` | The stack is forcibly deleted. | +| `latest_output_summary` | The latest stack output summary is downloaded. | +| `set_agent_pool` | The stack's agent pool is updated. | +| `update` | The stack settings are updated. | +| `update_configuration` | A new stack configuration is requested. | + +Alongside the [standard audit trail fields](#standard-response-fields), these event responses include the following field: + +| Key | Data Type | Description | +| --------- | --------- | ---------------------------------- | +| `project` | string | The related project for the stack. | + ## Team events -Teams are [groups of HCP Terraform users within an organization](/terraform/cloud-docs/users-teams-organizations/teams). +Teams are [groups of HCP Terraform users within an organization](/terraform/cloud-docs/users-teams-organizations/teams). ### Add Member