我不能说terraformer使用https://api.github.com以外的其他url
地形:https://github.com/GoogleCloudPlatform/terraformer
Terraform提供商:https://github.com/integrations/terraform-provider-github
看起来,该提供商通过提供export GITHUB_BASE_URL=机制来提供不同的base_url,从而支持Github。
但在此之后,土壤的行为并没有改变。
$export GITHUB_BASE_URL=https://git.enterprise.com/
$terraformer import github --organizations=org --resources=repositories --token=***2021/04/07 16:12:55 github进口组织org
2021/04/07 16:12:55 github进口存储库
2021/04/07 16:12:56得到https://api.github.com/orgs/bt/repos?per_page=100
有什么建议吗,如何绕过这个硬编码值?
发布于 2021-04-09 14:00:13
你需要改变这个
tc := oauth2.NewClient(ctx, ts)为此:
baseUrl := "https://_YOUR_GITHUB_ENTERPRISE_BAS_URL_/api/v3/"
client, _ := githubAPI.NewEnterpriseClient(baseUrl, baseUrl, tc)其他资源,如teams.go,members.go,.
https://stackoverflow.com/questions/66989470
复制相似问题