Skip to content

feat(region): add Japan (JP) region support#1391

Open
akifullahkhan-png wants to merge 3 commits into
newrelic:mainfrom
akifullahkhan-png:feature/add-japan-region-support
Open

feat(region): add Japan (JP) region support#1391
akifullahkhan-png wants to merge 3 commits into
newrelic:mainfrom
akifullahkhan-png:feature/add-japan-region-support

Conversation

@akifullahkhan-png
Copy link
Copy Markdown

Summary

  • Add JP region constant for Japan datacenter deployment
  • Add JP entry in Regions map with NerdGraph endpoint (https://one.jp.newrelic.com/graphql)
  • Add 'jp' case in Parse function for region string parsing
  • Add corresponding unit tests

Context

This change supports deploying New Relic services in the new Japan (jp-production) datacenter, enabling customers to link their AWS and GCP accounts to New Relic via Terraform in the JP region.

Test plan

  • Unit tests added for JP region parsing
  • Unit tests added for JP NerdGraph URL
  • All existing tests pass (go test -tags unit ./pkg/region/...)

🤖 Generated with Claude Code

Add JP region with NerdGraph endpoint for Japan datacenter deployment.

Changes:
- Add JP constant to region names
- Add JP entry in Regions map with nerdGraphBaseURL
- Add 'jp' case in Parse function
- Add corresponding unit tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 8, 2026

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 30.76%. Comparing base (de7b1f8) to head (26b97b1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1391      +/-   ##
==========================================
+ Coverage   30.74%   30.76%   +0.02%     
==========================================
  Files         142      142              
  Lines        6753     6755       +2     
==========================================
+ Hits         2076     2078       +2     
  Misses       4477     4477              
  Partials      200      200              
Flag Coverage Δ
unit 30.76% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread pkg/region/region_test.go Outdated
pairs := map[Name]string{
US: "https://api.newrelic.com/graphql",
EU: "https://api.eu.newrelic.com/graphql",
JP: "https://one.jp.newrelic.com/graphql",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akifullahkhan-png - based on the existing convention with EU, should this not be https://api.jp.newrelic.com/graphql instead of https://one.jp.newrelic.com/graphql? Given this is a platform change, I'll try finding this out myself - but if we have this mentioned somewhere in the docs/the initiatives shared with us, can you please point me to such a reference? Thanks!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread pkg/region/region_constants.go Outdated
},
JP: {
name: "JP",
nerdGraphBaseURL: "https://one.jp.newrelic.com/graphql",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Responded in above comment.

Change JP nerdGraphBaseURL from browser UI endpoint to API endpoint:
- From: https://one.jp.newrelic.com/graphql (browser UI)
- To: https://api.jp.newrelic.com/graphql (API endpoint)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
akifullahkhan-png added a commit to akifullahkhan-png/terraform-provider-newrelic that referenced this pull request Apr 9, 2026
Add support for the new Japan (JP) datacenter region:

Code changes:
- Add "JP" to provider region validation
- Add "jp01" to account management region codes
- Add "JP" to alert channel resource and data source validation
- Add JP integration tests following EU pattern
- Add JP CloudWatch metrics URL to AWS cloud integration example

Documentation updates:
- Update provider configuration guide
- Update migration guide v2
- Update cloud integrations guide
- Update AWS auto discovery guide
- Update account management resource docs
- Update alert channel resource docs
- Update main provider docs

Depends on: newrelic/newrelic-client-go#1391

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants