Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add support for Azure US Government

オープン
#73 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
azure, go
領域
backend, cloud

調査の方向性

Start by locating where azidentity.ClientSecretCredential and armresourcegraph.Client are initialized in the function. Review how credential fields such as activeDirectoryEndpointUrl and resourceManagerEndpointUrl could configure the Azure Government authority and resource-manager endpoint. Done means queries work with Azure US Government credentials as well as the public Azure environment.

索引モデルが issue の本文から書いたものです。

説明

enhancement
What problem are you facing?

When using function-azresourcegraph with credentials for Azure US Government, the function attempts to query the public Azure Resource Graph endpoint (management.azure.com). This results in an error because the Azure Government subscription ID is not recognized by the public Azure endpoint.

The error observed is:

{
  "error": {
    "code": "BadRequest",
    "message": "Please provide below info when asking for support: timestamp = [...], correlationId = [...].",
    "details": [
      {
        "code": "NoValidSubscriptionsInQueryRequest",
        "message": "There must be at least one subscription that is eligible to contain resources. Given: '[AzureGovernmentSubscriptionID]'."
      }
    ]
  }
}

This happens because the Azure SDK clients (azidentity.ClientSecretCredential and armresourcegraph.Client) within the function are initialized without specific options to target the public Azure Public Cloud, even if the associated Crossplane ProviderConfig specifies a different environment (e.g., usgovernment).

How could this Function help solve your problem?

If function-azresourcegraph could correctly use the endpoints for different Azure environments like Azure US Government, it would work for us without needing custom changes.

A good way to achieve this would be for the function to use the specific endpoint URLs that are often included in the credential files for environments like Azure US Government. These credential files (e.g., from az ad sp create-for-rbac --sdk-auth) can contain:

  • activeDirectoryEndpointUrl (e.g., https://login.microsoftonline.us)
  • resourceManagerEndpointUrl (e.g., https://management.usgovcloudapi.net/)

If the function read these URLs from the credentials it's given and used them to configure the AuthorityHost for azidentity.ClientSecretCredentialOptions and the cloud/service endpoint for arm.ClientOptions (used by armresourcegraph.Client), it should then connect to the correct Azure environment.

This would allow the function to be used in Azure US Government and similar Azure environments directly.

主要言語
Go
スター
7
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

upbound/function-azresourcegraph のほかの issue

upbound/function-azresourcegraph の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。