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

feat: add PULL_URL to environment variables #3302

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

shouichi
Copy link
Contributor

@shouichi shouichi commented Apr 10, 2023

what

This change adds PULL_URL to environment variables.

why

It is convenient to have the PR URL available so that we can link the PR that triggers the infrastructure changes from the audit logging system. For example, the google cloud provider adds user-supplied justification into google cloud audit logging via CLOUDSDK_CORE_REQUEST_REASON environment variable.

tests

Built an image with this PR's change and confirmed that the audit logging system contains the PULL_URL. The following workflow was used to export CLOUDSDK_CORE_REQUEST_REASON env var.

workflows:
  default:
    apply:
      steps:
        - env:
            name: CLOUDSDK_CORE_REQUEST_REASON
            command: echo "$PULL_URL"
        - apply

references

https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#request_reason

@shouichi shouichi requested a review from a team as a code owner April 10, 2023 06:03
@github-actions github-actions bot added docs Documentation go Pull requests that update Go code labels Apr 10, 2023
@nitrocode
Copy link
Member

@shouichi thank you for the pr. Please fill out the pr template above and let us know if you can test this out end to end in your own setup to ensure you can link the pr to your audit system.

@shouichi
Copy link
Contributor Author

@nitrocode Updated the PR body. Also confirmed that this change worked as expected.

@nitrocode nitrocode modified the milestones: v0.23.5, v0.23.6 Apr 17, 2023
Background:

It is convenient to have the PR URL available so that we can link the PR
that triggers the infrastructure changes from the audit logging system.
For example, the google cloud provider adds user-supplied justification
into google cloud audit logging via `CLOUDSDK_CORE_REQUEST_REASON`
environment variable.

https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#request_reason
@GenPage GenPage enabled auto-merge (squash) April 21, 2023 01:55
@GenPage GenPage merged commit f4fa313 into runatlantis:main Apr 21, 2023
nitrocode pushed a commit that referenced this pull request May 5, 2023
Background:

It is convenient to have the PR URL available so that we can link the PR
that triggers the infrastructure changes from the audit logging system.
For example, the google cloud provider adds user-supplied justification
into google cloud audit logging via `CLOUDSDK_CORE_REQUEST_REASON`
environment variable.

https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#request_reason
@GenPage GenPage modified the milestones: v0.23.6, v0.24.0 May 6, 2023
@shouichi shouichi deleted the add-pull-url-to-env branch May 24, 2023 04:02
mtavaresmedeiros pushed a commit to mtavaresmedeiros/atlantis that referenced this pull request Jul 3, 2023
Background:

It is convenient to have the PR URL available so that we can link the PR
that triggers the infrastructure changes from the audit logging system.
For example, the google cloud provider adds user-supplied justification
into google cloud audit logging via `CLOUDSDK_CORE_REQUEST_REASON`
environment variable.

https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#request_reason
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
Background:

It is convenient to have the PR URL available so that we can link the PR
that triggers the infrastructure changes from the audit logging system.
For example, the google cloud provider adds user-supplied justification
into google cloud audit logging via `CLOUDSDK_CORE_REQUEST_REASON`
environment variable.

https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#request_reason
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
Background:

It is convenient to have the PR URL available so that we can link the PR
that triggers the infrastructure changes from the audit logging system.
For example, the google cloud provider adds user-supplied justification
into google cloud audit logging via `CLOUDSDK_CORE_REQUEST_REASON`
environment variable.

https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#request_reason
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants