Add support for Azure US Government
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
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
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di upbound/function-azresourcegraph
-
Dependency DashboardAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
Tutte le issue di upbound/function-azresourcegraph
Issue simili
-
Chained slog With calls discard previously bound attributesForse già presa @yuefdev l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[scanner] TestAgentNowLineStates hard-fails instead of degrading when node is off PATHForse già presa @arteeh l’ha presa oggi. Apertaagent/scanner ci help wanted kind/test
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
hivecommons/hive#12924 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Gentleman-Programming/engram#1940 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cloudflare/terraform-provider-cloudflare#7423 ·
I maintainer di solito rispondono entro 1 giorno
-
devices
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
evcc-io/evcc#35007 · 7 commenti ·
I maintainer di solito rispondono entro 1 giorno