Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Audit trail tokens #1434

Open
c4po opened this issue Aug 7, 2024 · 0 comments
Open

Add support for Audit trail tokens #1434

c4po opened this issue Aug 7, 2024 · 0 comments

Comments

@c4po
Copy link

c4po commented Aug 7, 2024

Use-cases

As a user of Terraform Cloud, I want to be able to manage Audit Trail Tokens through the Terraform provider for Terraform Cloud. Audit Trail Tokens are a new feature introduced to HCP Terraform, and they provide a way to generate tokens specifically for audit trail purposes. These tokens have read-only access to an organization's audit logs and can be used to integrate with third-party SIEM tools or other audit systems.

Currently, the terraform-provider-tfe does not support managing these new Audit Trail Tokens, which limits users' ability to automate their security and compliance workflows using Terraform.

Attempted Solutions

There are no current solutions available in the terraform-provider-tfe to manage Audit Trail Tokens. The provider supports management of other types of tokens (such as team tokens and user tokens), but does not have resources or data sources specific to Audit Trail Tokens.

Proposal

I propose adding support for Audit Trail Tokens to the terraform-provider-tfe. This would involve:

  1. Creating a new resource tfe_audit_trail_token to manage Audit Trail Tokens. The resource should support the following operations:

    • Create a new Audit Trail Token
    • Delete an Audit Trail Token
  2. Implementing the necessary API calls to interact with the Audit Trail Tokens API endpoints as described in the API documentation: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/audit-trails-tokens

Example configuration for the proposed tfe_audit_trail_token resource:

resource "time_rotating" "example" {
  rotation_days = 30
}

resource "tfe_audit_trail_token" "example" {
  organization = "my-org-name"
  expired_at   = time_rotating.example.rotation_rfc3339
}

This feature would allow users to manage their Audit Trail Tokens as code, enabling better integration with their existing Terraform workflows and improving their ability to automate security and compliance processes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant