{"id":13572951,"url":"https://github.com/hashicorp/go-discover","last_synced_at":"2026-04-02T11:53:56.241Z","repository":{"id":37561944,"uuid":"94883751","full_name":"hashicorp/go-discover","owner":"hashicorp","description":"Discover nodes in cloud environments","archived":false,"fork":false,"pushed_at":"2026-03-24T06:06:42.000Z","size":5645,"stargazers_count":589,"open_issues_count":85,"forks_count":124,"subscribers_count":268,"default_branch":"master","last_synced_at":"2026-03-25T07:49:19.494Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hashicorp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-06-20T11:25:41.000Z","updated_at":"2026-03-18T17:55:59.000Z","dependencies_parsed_at":"2024-09-27T12:42:10.026Z","dependency_job_id":"b6fda778-e177-4ee3-8e66-7827952ef7cd","html_url":"https://github.com/hashicorp/go-discover","commit_stats":{"total_commits":239,"total_committers":59,"mean_commits":"4.0508474576271185","dds":0.8158995815899581,"last_synced_commit":"275a71457aa412bf20df9f9b77c380667164a5e6"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/hashicorp/go-discover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fgo-discover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fgo-discover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fgo-discover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fgo-discover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashicorp","download_url":"https://codeload.github.com/hashicorp/go-discover/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fgo-discover/sbom","scorecard":{"id":457025,"data":{"date":"2025-08-11","repo":{"name":"github.com/hashicorp/go-discover","commit":"40c38fd658f0fd07ce74f2ee51b8abd3bfed01b3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":7,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":10,"reason":"20 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/acceptance.yml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/actionlint.yml:7","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Mozilla Public License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":7,"reason":"dependency not pinned by hash detected -- score normalized to 7","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/actionlint.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/hashicorp/go-discover/actionlint.yml/master?enable=pin","Warn: goCommand not pinned by hash: provider/azure/vendor/github.com/Azure/azure-sdk-for-go/rungas.sh:8","Info:  13 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   5 out of   6 third-party GitHubAction dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/hashicorp/.github/SECURITY.md:1","Info: Found linked content: github.com/hashicorp/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/hashicorp/.github/SECURITY.md:1","Info: Found text in security policy: github.com/hashicorp/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":7,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'allow deletion' disabled on branch 'release/0.0.5'","Info: 'force pushes' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'release/0.0.5'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'master'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'release/0.0.5'","Info: 'stale review dismissal' is required to merge on branch 'master'","Info: 'stale review dismissal' is required to merge on branch 'release/0.0.5'","Warn: required approving review count is 1 on branch 'master'","Warn: required approving review count is 1 on branch 'release/0.0.5'","Info: codeowner review is required on branch 'master'","Info: codeowner review is required on branch 'release/0.0.5'","Info: 'last push approval' is required to merge on branch 'master'","Info: 'last push approval' is required to merge on branch 'release/0.0.5'","Info: status check found to merge onto on branch 'master'","Warn: no status checks found to merge onto branch 'release/0.0.5'","Info: PRs are required in order to make changes on branch 'master'","Info: PRs are required in order to make changes on branch 'release/0.0.5'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"31 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2020-0017 / GHSA-w73w-5m7g-f7qc","Warn: Project is vulnerable to: GO-2022-0209 / GHSA-r5c5-pr8j-pfp7","Warn: Project is vulnerable to: GO-2023-1992 / GHSA-x3jr-pf6g-c48f","Warn: Project is vulnerable to: GO-2022-0229 / GHSA-cjjc-xp8v-855w","Warn: Project is vulnerable to: GO-2020-0012 / GHSA-ffhg-7mh4-33c4","Warn: Project is vulnerable to: GO-2021-0227 / GHSA-3vm4-22fp-5rfm","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9","Warn: Project is vulnerable to: GO-2022-0197 / GHSA-4r78-hx75-jjj2 / GHSA-mv93-wvcp-7m7r","Warn: Project is vulnerable to: GO-2020-0014 / GHSA-vfw5-hrgq-h5wf","Warn: Project is vulnerable to: GO-2022-0536 / GHSA-39qc-96h7-956f / GHSA-hgr8-6h9x-f7q9","Warn: Project is vulnerable to: GO-2022-0236 / GHSA-h86h-8ppg-mxmh","Warn: Project is vulnerable to: GO-2021-0238 / GHSA-83g2-8m93-v3w7","Warn: Project is vulnerable to: GO-2022-0288","Warn: Project is vulnerable to: GO-2022-0969 / GHSA-69cg-p879-7622","Warn: Project is vulnerable to: GO-2022-1144 / GHSA-xrjj-mj9h-534m","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2020-0008 / GHSA-44r7-7p62-q3fr","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T09:59:01.445Z","repository_id":37561944,"created_at":"2025-08-19T09:59:01.445Z","updated_at":"2025-08-19T09:59:01.445Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31305896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T09:48:21.550Z","status":"ssl_error","status_checked_at":"2026-04-02T09:48:19.196Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:00:25.100Z","updated_at":"2026-04-02T11:53:56.222Z","avatar_url":"https://github.com/hashicorp.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Go Discover Nodes for Cloud Providers [![GoDoc](https://godoc.org/github.com/hashicorp/go-discover?status.svg)](https://godoc.org/github.com/hashicorp/go-discover)\n\n\u003e **Note**\n\u003e `go-discover` is considered feature complete and is currently maintained on an as-need basis for use with Vault and Consul. Currently another solution [go-netaddrs]( https://github.com/hashicorp/go-netaddrs) is being actively maintained, which provides a more flexible way of discovering ip addresses without having to tie it to specific infrastructure. \n\n`go-discover` is a Go (golang) library and command line tool to discover\nip addresses of nodes in cloud environments based on meta information\nlike tags provided by the environment.\n\nThe configuration for the providers is provided as a list of `key=val key=val\n...` tuples. If either the key or the value contains a space (` `), a backslash\n(`\\`) or double quotes (`\"`) then it needs to be quoted with double quotes.\nWithin a quoted string you can use the backslash to escape double quotes or the\nbackslash itself, e.g. `key=val \"some key\"=\"some value\"`\n\nDuplicate keys are reported as error and the provider is determined through the\n`provider` key.\n\n### Supported Providers\n\nThe following cloud providers have implementations in the go-discover/provider\nsub packages. Additional providers can be added through the\n[Register](https://godoc.org/github.com/hashicorp/go-discover#Register)\nfunction.\n\n * Aliyun (Alibaba) Cloud [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/aliyun/aliyun_discover.go#L21-L34)\n * Amazon AWS [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/aws/aws_discover.go#L19-L34)\n * DigitalOcean [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/digitalocean/digitalocean_discover.go#L22-L30)\n * Google Cloud [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/gce/gce_discover.go#L23-L43)\n * Linode [Config options](https://github.com/hashicorp/go-discover/blob/master/provider/linode/linode_discover.go#L30-L41)\n * mDNS [Config options](https://github.com/hashicorp/go-discover/blob/master/provider/mdns/mdns_provider.go#L19-L31)\n * Microsoft Azure [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/azure/azure_discover.go#L24-L62)\n * Openstack [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/os/os_discover.go#L29-L44)\n * Scaleway [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/scaleway/scaleway_discover.go#L14-L22)\n * SoftLayer [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/softlayer/softlayer_discover.go#L16-L25)\n * TencentCloud [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/tencentcloud/tencentcloud_discover.go#L23-L37)\n * Triton [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/triton/triton_discover.go#L17-L27)\n * vSphere [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/vsphere/vsphere_discover.go#L145-L157)\n * Packet [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/packet/packet_discover.go#L25-L40)\n\nThe following providers are implemented in the go-discover/provider subdirectory\nbut aren't automatically registered. If you want to support these providers,\nregister them manually:\n\n * Kubernetes [Config options](https://github.com/hashicorp/go-discover/blob/8b3ddf4/provider/k8s/k8s_discover.go#L32-L59)\n\nHashiCorp maintains acceptance tests that regularly allocate and run tests with\nreal resources to verify the behavior of several of these providers. Those\ncurrently are: Amazon AWS, Microsoft Azure, Google Cloud, DigitalOcean, Triton, Scaleway, AliBaba Cloud, vSphere, and Packet.net.\n\n### Config Example\n\n```\n# Aliyun (Alibaba) Cloud\nprovider=aliyun region=... tag_key=consul tag_value=... access_key_id=... access_key_secret=...\n\n# Amazon AWS\nprovider=aws region=eu-west-1 tag_key=consul tag_value=... access_key_id=... secret_access_key=...\n\n# DigitalOcean\nprovider=digitalocean region=... tag_name=... api_token=...\n\n# Google Cloud\nprovider=gce project_name=... zone_pattern=eu-west-* tag_value=consul credentials_file=...\n\n# Linode\nprovider=linode tag_name=... region=us-east address_type=private_v4 api_token=...\n\n# mDNS\nprovider=mdns service=consul domain=local\n\n# Microsoft Azure\nprovider=azure tag_name=consul tag_value=... tenant_id=... client_id=... subscription_id=... secret_access_key=...\n\n# Openstack\nprovider=os tag_key=consul tag_value=server username=... password=... auth_url=...\n\n# Scaleway\nprovider=scaleway organization=my-org tag_name=consul-server token=... region=...\n\n# SoftLayer\nprovider=softlayer datacenter=dal06 tag_value=consul username=... api_key=...\n\n# TencentCloud\nprovider=tencentcloud region=ap-guangzhou tag_key=consul tag_value=... access_key_id=... access_key_secret=...\n\n# Triton\nprovider=triton account=testaccount url=https://us-sw-1.api.joyentcloud.com key_id=... tag_key=consul-role tag_value=server\n\n# vSphere\nprovider=vsphere category_name=consul-role tag_name=consul-server host=... user=... password=... insecure_ssl=[true|false]\n\n# Packet\nprovider=packet auth_token=token project=uuid url=... address_type=...\n\n# Kubernetes\nprovider=k8s label_selector=\"app = consul-server\"\n```\n\n## Command Line Tool Usage\n\nInstall the command line tool with:\n\n```\ngo get -u github.com/hashicorp/go-discover/cmd/discover\n```\n\nThen run it with:\n\n```\n$ discover addrs provider=aws region=eu-west-1 ...\n```\n\n## Library Usage\n\nInstall the library with:\n\n```\ngo get -u github.com/hashicorp/go-discover\n```\n\nYou can then either support discovery for all available providers\nor only for some of them.\n\n```go\n// support discovery for all supported providers\nd := discover.Discover{}\n\n// support discovery for AWS and GCE only\nd := discover.Discover{\n\tProviders : map[string]discover.Provider{\n\t\t\"aws\": discover.Providers[\"aws\"],\n\t\t\"gce\": discover.Providers[\"gce\"],\n\t}\n}\n\n// use ioutil.Discard for no log output\nl := log.New(os.Stderr, \"\", log.LstdFlags)\n\ncfg := \"provider=aws region=eu-west-1 ...\"\naddrs, err := d.Addrs(cfg, l)\n```\n\nYou can also add support for providers that aren't registered by default:\n\n```go\n// Imports at top of file\nimport \"github.com/hashicorp/go-discover/provider/k8s\"\n\n// support discovery for all supported providers\nd := discover.Discover{}\n\n// support discovery for AWS and GCE only\nd := discover.Discover{\n\tProviders : map[string]discover.Provider{\n\t\t\"k8s\": \u0026k8s.Provider{},\n\t}\n}\n\n// ...\n```\n\nFor complete API documentation, see\n[GoDoc](https://godoc.org/github.com/hashicorp/go-discover). The configuration\nfor the supported providers is documented in the\n[providers](https://godoc.org/github.com/hashicorp/go-discover/provider)\nsub-package.\n\n## Testing\n\n**Note: Due to the `go.sum` checksum errors referenced in [#68](https://github.com/hashicorp/go-discover/issues/68), \nyou will need Go 1.11.4+ to build/test go-discover.**\n\nConfiguration tests can be run with Go:\n\n```\n$ go test ./...\n```\n\nBy default tests that communicate with providers do not run unless credentials\nare set for that provider. To run provider tests you must set the necessary\nenvironment variables.\n\n**Note: This will make real API calls to the account provided by the credentials.**\n\n```\n$ AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... AWS_REGION=... go test -v ./provider/aws\n```\n\nThis requires resources to exist that match those specified in tests\n(eg instance tags in the case of AWS). To create these resources,\nthere are sets of [Terraform](https://www.terraform.io) configuration\nin the `test/tf` directory for supported providers.\n\nYou must use the same account and access credentials above. The same\nenvironment variables should be applicable and read by Terraform.\n\n```\n$ cd test/tf/aws\n$ export AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... AWS_REGION=...\n$ terraform init\n...\n$ terraform apply\n...\n```\n\nAfter Terraform successfully runs, you should be able to successfully\nrun the tests, assuming you have exported credentials into\nyour environment:\n\n```\n$ go test -v ./provider/aws\n```\n\nTo destroy the resources you need to use Terraform again:\n\n```\n$ cd test/tf/aws\n$ terraform destroy\n...\n```\n\n**Note: There should be no requirements to create and test these resources other\nthan credentials and Terraform. This is to ensure tests can run in development\nand CI environments consistently across all providers.**\n\n## Retrieving Test Credentials\n\nBelow are instructions for retrieving credentials in order to run\ntests for some of the providers.\n\n\u003cdetails\u003e\n  \u003csummary\u003eGoogle Cloud\u003c/summary\u003e\n\n1. Go to https://console.cloud.google.com/\n1. IAM \u0026amp; Admin / Settings:\n    * Create Project, e.g. `discover`\n    * Write down the `Project ID`, e.g. `discover-xxx`\n1. Billing: Ensure that the project is linked to a billing account\n1. API Manager / Dashboard: Enable the following APIs\n    * Google Compute Engine API\n1. IAM \u0026amp; Admin / Service Accounts: Create Service Account\n    * Service account name: `admin`\n    * Roles:\n        * `Project/Service Account Actor`\n        * `Compute Engine/Compute Instance Admin (v1)`\n        * `Compute Engine/Compute Security Admin`\n    * Furnish a new private key: `yes`\n    * Key type: `JSON`\n1. The credentials file `discover-xxx.json` will have been downloaded\n   automatically to your machine\n1. Source the contents of the credentials file into the `GOOGLE_CREDENTIALS`\n   environment variable\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eAzure\u003c/summary\u003e\nSee also the [Terraform provider documentation](https://www.terraform.io/docs/providers/azurerm/index.html#creating-credentials).\n\n```shell\n# Install Azure CLI (https://github.com/Azure/azure-cli)\ncurl -L https://aka.ms/InstallAzureCli | bash\n\n# 1. Login\n$ az login\n\n# 2. Get SubscriptionID\n$ az account list\n[\n  {\n    \"cloudName\": \"AzureCloud\",\n    \"id\": \"subscription_id\",\n    \"isDefault\": true,\n    \"name\": \"Gratis versie\",\n    \"state\": \"Enabled\",\n    \"tenantId\": \"tenant_id\",\n    \"user\": {\n      \"name\": \"user@email.com\",\n      \"type\": \"user\"\n    }\n  }\n]\n\n# 3. Switch to subscription\n$ az account set --subscription=\"subscription_id\"\n\n# 4. Create ClientID and Secret\n$ az ad sp create-for-rbac --role=\"Contributor\" --scopes=\"/subscriptions/subscription_id\"\n{\n  \"appId\": \"client_id\",\n  \"displayName\": \"azure-cli-2017-07-18-16-51-43\",\n  \"name\": \"http://azure-cli-2017-07-18-16-51-43\",\n  \"password\": \"client_secret\",\n  \"tenant\": \"tenant_id\"\n}\n\n# 5. Export the Credentials for the client\nexport ARM_CLIENT_ID=client_id\nexport ARM_CLIENT_SECRET=client_secret\nexport ARM_TENANT_ID=tenant_id\nexport ARM_SUBSCRIPTION_ID=subscription_id\n\n# 6. Test the credentials\n$ az vm list-sizes --location 'West Europe'\n```\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Fgo-discover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashicorp%2Fgo-discover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Fgo-discover/lists"}