Skip to content

bendwyer/action-rotate-hcp-terraform-user-token

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

action-rotate-hcp-terraform-user-token

Description

Rotates a HCP Terraform user token stored as a secret in a GitHub repository.

Inputs

name description required default
github_token

GitHub token used for writing the HCP Terraform user token to the repository secret store. Requires the repository permission secrets:write.

true ""
github_secrets_name

Name of the secret in the repository secret store where the token will be written.

false HCP_TERRAFORM_USER_TOKEN
hcp_terraform_user_token

HCP Terraform user token to be rotated. This token must already exist and be saved as a repository secret before running this action.

true ""
hcp_terraform_user_token_description

Description for the HCP Terraform user token. Must be the same for the original and new tokens.

false github-token
hcp_terraform_user_token_expiration

Time in days when the HCP Terraform user token will expire.

false 30

Runs

This action is a composite action.

Usage

- uses: bendwyer/action-rotate-hcp-terraform-user-token@v1
  with:
    github_token:
    # GitHub token used for writing the HCP Terraform user token to the repository secret store. Requires the repository permission secrets:write.
    #
    # Required: true
    # Default: ""

    github_secrets_name:
    # Name of the secret in the repository secret store where the token will be written.
    #
    # Required: false
    # Default: HCP_TERRAFORM_USER_TOKEN

    hcp_terraform_user_token:
    # HCP Terraform user token to be rotated. This token must already exist and be saved as a repository secret before running this action.
    #
    # Required: true
    # Default: ""

    hcp_terraform_user_token_description:
    # Description for the HCP Terraform user token. Must be the same for the original and new tokens.
    #
    # Required: false
    # Default: github-token

    hcp_terraform_user_token_expiration:
    # Time in days when the HCP Terraform user token will expire.
    #
    # Required: false
    # Default: 30

Commits

Commit headers are expected in order for version bumping to work correctly:

  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • test: Adding missing tests or correcting existing tests

Resources

About

Rotates a HCP Terraform user token stored as a secret in a GitHub repository.

Resources

License

Stars

Watchers

Forks

Packages

No packages published