Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add support for Azure US Government

Aperta
#73 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
azure, go
Ambito
backend, cloud

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
7
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di upbound/function-azresourcegraph

Tutte le issue di upbound/function-azresourcegraph

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.