Skip to content

Docs on appending the user agent with relevant atlantis information #2651

Open
@nitrocode

Description

@nitrocode

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Describe the user story

I'd like to differentiate between atlantis applies for infra changes vs other CI changes vs local changes

Describe the solution you'd like

I'd like a document explaining how to set a custom env var to provide relevant and useful atlantis context per PR within the custom user agent so in cloudtrail we can differentiate the changes

https://developer.hashicorp.com/terraform/language/settings/backends/s3#configuring-custom-user-agent-information

workflows:
  default:
    plan:
      steps:
        - env:
            name: TF_APPEND_USER_AGENT
            command: 'echo "Atlantis v0.20.1 'terraform$ATLANTIS_TERRAFORM_VERSION apply' by $USER_NAME in workspace $WORKSPACE, dir $REPO_REL_DIR, PR https://github.com/$BASE_REPO_OWNER/$BASE_REPO_NAME/pulls/$PULL_NUM"'

More context could be added

https://www.runatlantis.io/docs/custom-workflows.html#custom-run-command
https://www.runatlantis.io/docs/custom-workflows.html#environment-variable-env-command

Describe the drawbacks of your solution

None

Describe alternatives you've considered

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaledocsDocumentationfeatureNew functionality/enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions