{"id":15175755,"url":"https://github.com/hashicorp/terraform-provider-hcs","last_synced_at":"2025-10-19T09:32:48.229Z","repository":{"id":37827804,"uuid":"315437208","full_name":"hashicorp/terraform-provider-hcs","owner":"hashicorp","description":"Terraform provider for HashiCorp Consul Service on Azure.","archived":false,"fork":false,"pushed_at":"2024-07-12T05:32:55.000Z","size":790,"stargazers_count":4,"open_issues_count":6,"forks_count":9,"subscribers_count":239,"default_branch":"main","last_synced_at":"2024-09-27T12:41:57.594Z","etag":null,"topics":["consul","hashicorp-consul-service","hcs","terraform-provider"],"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":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-23T20:49:11.000Z","updated_at":"2024-04-18T23:07:09.000Z","dependencies_parsed_at":"2024-04-19T00:22:48.827Z","dependency_job_id":"688ee05d-ad4c-4d23-a619-aeabb139ba25","html_url":"https://github.com/hashicorp/terraform-provider-hcs","commit_stats":{"total_commits":190,"total_committers":20,"mean_commits":9.5,"dds":0.5421052631578948,"last_synced_commit":"0cdc2ec0d174ebb371666c4665c37634291f3e67"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":"hashicorp/terraform-provider-scaffolding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fterraform-provider-hcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fterraform-provider-hcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fterraform-provider-hcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fterraform-provider-hcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashicorp","download_url":"https://codeload.github.com/hashicorp/terraform-provider-hcs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219869245,"owners_count":16555572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["consul","hashicorp-consul-service","hcs","terraform-provider"],"created_at":"2024-09-27T12:41:49.911Z","updated_at":"2025-10-19T09:32:42.823Z","avatar_url":"https://github.com/hashicorp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"HashiCorp Consul Service on Azure (HCS) Terraform Provider\n==================\n\nRequirements\n------------\n\n-\t[Terraform](https://www.terraform.io/downloads.html) \u003e= 0.12.x\n-\t[Go](https://golang.org/doc/install) \u003e= 1.15\n\nBuilding The Provider\n---------------------\n\n1. Clone the repository\n1. Enter the repository directory\n1. Build the provider using the `make dev` command\n\nAdding Dependencies\n---------------------\n\nThis provider uses [Go modules](https://github.com/golang/go/wiki/Modules).\nPlease see the Go documentation for the most up to date information about using Go modules.\n\nTo add a new dependency `github.com/author/dependency` to your Terraform provider:\n\n```\ngo get github.com/author/dependency\ngo mod tidy\n```\n\nThen commit the changes to `go.mod` and `go.sum`.\n\nDeveloping the Provider\n---------------------------\n\nIf you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (see [Requirements](#requirements) above).\n\nTo compile the provider, run `go install`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.\n\nTo generate the latest models for the HCS Custom Resource Provider actions, run:\n```\nmake generate-hcs-ama-api-spec-models\n```\n\nIn order to run the full suite of Acceptance tests, run `make testacc`.\n\n*Note:* Acceptance tests create real resources, and often cost money to run.\n\n```sh\n$ make testacc\n```\n \n Generating Docs\n ----------------------\n \n From the root of the repo run:\n \n ```\n go generate \u0026\u0026 go mod tidy\n ```\n\n \nUsing the provider\n----------------------\n\nPlease see the docs for details about a particular resource. \nBelow is a complex example that leverages the Azure Terraform provider and creates a federation of two HCS clusters.\n```hcl\n// Configure the provider\nprovider \"hcs\" {}\n\nprovider \"azurerm\" {\n  features {}\n}\n\n// If you have not already done so, accept the HCS Marketplace agreement\ndata \"hcs_plan_defaults\" \"hcs_plan\" {}\n\nresource \"azurerm_marketplace_agreement\" \"hcs_marketplace_agreement\" {\n  publisher = data.hcs_plan_defaults.hcs_plan.publisher\n  offer     = data.hcs_plan_defaults.hcs_plan.offer\n  plan      = data.hcs_plan_defaults.hcs_plan.plan_name\n}\n\n// Create the Resource Group for the primary cluster\nresource \"azurerm_resource_group\" \"primary\" {\n  name     = \"hcs-tf-federation-primary-rg\"\n  location = \"westus2\"\n}\n\n// Create the primary cluster\nresource \"hcs_cluster\" \"primary\" {\n  resource_group_name      = azurerm_resource_group.primary.name\n  managed_application_name = \"hcs-tf-federation-primary\"\n  email                    = \"me@example.com\"\n  cluster_mode             = \"production\"\n  min_consul_version       = \"v1.9.0\"\n  vnet_cidr                = \"172.25.16.0/24\"\n  consul_datacenter        = \"hcs-tf-federation-example\"\n}\n\n// Create a federation token\ndata \"hcs_federation_token\" \"fed\" {\n  resource_group_name      = hcs_cluster.primary.resource_group_name\n  managed_application_name = hcs_cluster.primary.managed_application_name\n}\n\n// Create the Resource Group for the secondary cluster\nresource \"azurerm_resource_group\" \"secondary\" {\n  name     = \"hcs-tf-federation-secondary-rg\"\n  location = \"eastus\"\n}\n\n// Create the secondary cluster using the federation token from above\nresource \"hcs_cluster\" \"secondary\" {\n  resource_group_name      = azurerm_resource_group.secondary.name\n  managed_application_name = \"hcs-tf-federation-secondary\"\n  email                    = \"me@example.com\"\n  cluster_mode             = \"production\"\n  min_consul_version       = \"v1.9.0\"\n  vnet_cidr                = \"172.25.17.0/24\"\n  consul_datacenter        = \"hcs-tf-federation-secondary\"\n  consul_federation_token  = data.hcs_federation_token.fed.token\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Fterraform-provider-hcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashicorp%2Fterraform-provider-hcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Fterraform-provider-hcs/lists"}