Skip to content

feat: add AWS PRM user-agent attribution for partner revenue tracking (#23138)#24052

Merged
matifali merged 1 commit into
release/2.32from
backport/23138-to-2.32
Apr 6, 2026
Merged

feat: add AWS PRM user-agent attribution for partner revenue tracking (#23138)#24052
matifali merged 1 commit into
release/2.32from
backport/23138-to-2.32

Conversation

@DevelopmentCats

Copy link
Copy Markdown
Contributor

Backport of #23138

Original PR: #23138 — feat: add AWS PRM user-agent attribution for partner revenue tracking
Merge commit: 5ff1058

…#23138)

Sets `AWS_SDK_UA_APP_ID` in the Terraform provisioner environment so
that all AWS API calls made during workspace builds include Coder's AWS
Partner Revenue Measurement (PRM) attribution in the user-agent header.

This enables AWS to attribute resource usage driven by Coder back to us
as an AWS partner across all deployments.

## How it works

- `provisionEnv()` now unconditionally sets
`AWS_SDK_UA_APP_ID=APN_1.1/pc_cdfmjwn8i6u8l9fwz8h82e4w3$` in the
environment passed to `terraform plan` and `terraform apply`
- The Terraform AWS provider picks this up and appends it to the
user-agent header on every AWS API call
- If a customer has already set `AWS_SDK_UA_APP_ID` in their environment
(e.g. via `coder.env`), we don't override it
- Templates that don't use the AWS provider are unaffected — the env var
is simply ignored

## Notes

- The product code is hardcoded in the source. It may be worth
obfuscating this value (e.g. via `-ldflags -X` at build time) to keep it
out of the public repo, though it is technically a public identifier.
- This covers user-agent attribution only. Resource-level `aws-apn-id`
tags for cost allocation are a separate effort that requires template
changes.

## References

- [AWS SDK Application ID
docs](https://docs.aws.amazon.com/sdkref/latest/guide/feature-appid.html)
- [AWS PRM Automated User
Agent](https://prm.partner.aws.dev/automated-user-agent.html) (partner
login required)

---------

Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
Co-authored-by: DevCats <christofer@coder.com>
(cherry picked from commit 5ff1058)
@github-actions github-actions Bot added the community Pull Requests and issues created by the community. label Apr 6, 2026
@matifali matifali removed the community Pull Requests and issues created by the community. label Apr 6, 2026
@DevelopmentCats DevelopmentCats changed the title chore: backport #23138 to 2.32 feat: add AWS PRM user-agent attribution for partner revenue tracking Apr 6, 2026
@matifali matifali changed the title feat: add AWS PRM user-agent attribution for partner revenue tracking feat: add AWS PRM user-agent attribution for partner revenue tracking (#23138) Apr 6, 2026
@matifali matifali marked this pull request as ready for review April 6, 2026 16:27
@matifali matifali merged commit d693e23 into release/2.32 Apr 6, 2026
51 checks passed
@matifali matifali deleted the backport/23138-to-2.32 branch April 6, 2026 17:05
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants