{"id":19149835,"url":"https://github.com/harness/terraform-provider-harness","last_synced_at":"2026-05-05T09:02:40.714Z","repository":{"id":37765393,"uuid":"373353703","full_name":"harness/terraform-provider-harness","owner":"harness","description":"Terraform provider for provisioning Harness resources","archived":false,"fork":false,"pushed_at":"2026-03-26T21:02:59.000Z","size":91656,"stargazers_count":43,"open_issues_count":82,"forks_count":68,"subscribers_count":47,"default_branch":"main","last_synced_at":"2026-03-27T05:19:44.142Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harness.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2021-06-03T02:02:33.000Z","updated_at":"2026-03-26T13:02:53.000Z","dependencies_parsed_at":"2025-12-30T20:06:17.863Z","dependency_job_id":null,"html_url":"https://github.com/harness/terraform-provider-harness","commit_stats":null,"previous_names":["harness-io/terraform-provider-harness"],"tags_count":254,"template":false,"template_full_name":"hashicorp/terraform-provider-scaffolding","purl":"pkg:github/harness/terraform-provider-harness","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fterraform-provider-harness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fterraform-provider-harness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fterraform-provider-harness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fterraform-provider-harness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harness","download_url":"https://codeload.github.com/harness/terraform-provider-harness/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fterraform-provider-harness/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"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-11-09T08:09:47.814Z","updated_at":"2026-05-05T09:02:40.665Z","avatar_url":"https://github.com/harness.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Harness Terraform Provider\n\n[![GitHub release](https://img.shields.io/github/v/release/harness/terraform-provider-harness)](https://github.com/harness/terraform-provider-harness/releases)\n[![License](https://img.shields.io/github/license/harness/terraform-provider-harness)](LICENSE.md)\n[![Website](https://img.shields.io/badge/website-harness.io-blue)](https://harness.io)\n\n## Overview\n\nThe Terraform provider for Harness allows you to manage resources in Harness CD and NextGen platforms using infrastructure as code. This provider enables you to automate the provisioning and management of Harness resources such as applications, pipelines, environments, services, connectors, and more.\n\n## Features\n\n- **First Generation \u0026 NextGen Support**: Manage resources in both Harness First Generation and NextGen platforms\n- **Comprehensive Resource Management**: Create and manage applications, pipelines, environments, services, connectors, and more\n- **GitOps Integration**: Configure GitOps applications, repositories, and clusters\n- **Policy Management**: Define and enforce governance policies and policy sets\n- **Feature Flag Management**: Configure and manage feature flags for your applications\n- **AutoStopping Rules**: Set up cost optimization with AutoStopping rules for various cloud providers\n\n## Documentation\n\nFull, comprehensive documentation is available on the Terraform Registry website:\n\n- [Provider Documentation](https://registry.terraform.io/providers/harness/harness/latest/docs)\n- [Harness Terraform Provider Quickstart Guide](https://docs.harness.io/article/7cude5tvzh-harness-terraform-provider)\n\n## Requirements\n\n- [Terraform](https://www.terraform.io/downloads.html) \u003e= 0.13.x\n- [Go](https://golang.org/doc/install) \u003e= 1.21 (for development)\n\n## Usage\n\n### Provider Configuration\n\n```hcl\nterraform {\n  required_providers {\n    harness = {\n      source = \"harness/harness\"\n      version = \"0.38.5\"\n    }\n  }\n}\n\n# Configure the Harness provider for First Gen resources\nprovider \"harness\" {\n  endpoint   = \"https://app.harness.io/gateway\"\n  account_id = \"YOUR_HARNESS_ACCOUNT_ID\"\n  api_key    = \"YOUR_HARNESS_API_KEY\"\n}\n\n# Configure the Harness provider for Next Gen resources\nprovider \"harness\" {\n  endpoint         = \"https://app.harness.io/gateway\"\n  account_id       = \"YOUR_HARNESS_ACCOUNT_ID\"\n  platform_api_key = \"YOUR_HARNESS_PLATFORM_API_KEY\"\n}\n```\n\n## Installation\n\n### From Terraform Registry (Recommended)\n\nThe provider is available on the [Terraform Registry](https://registry.terraform.io/providers/harness/harness/latest) and will be automatically downloaded when you run `terraform init` in a configuration that requires it.\n\n### Building and Testing Locally\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/harness/terraform-provider-harness.git\n   cd terraform-provider-harness\n   ```\n\n2. Set up your development environment:\n   ```sh\n   make dev-setup\n   ```\n   This installs all Go dependencies and development tools.\n\n3. Build and install the provider locally:\n   ```sh\n   make install\n   ```\n   This builds the provider and installs it to your local Terraform plugins directory.\n\n4. Configure Terraform to use your local build by adding this to `~/.terraformrc`:\n   ```hcl\n   provider_installation {\n     dev_overrides {\n       \"registry.terraform.io/harness/harness\" = \"~/.terraform.d/plugins/registry.terraform.io/harness/harness/0.99.0-dev/\u003cOS\u003e_\u003cARCH\u003e\"\n     }\n     direct {}\n   }\n   ```\n   Replace `\u003cOS\u003e_\u003cARCH\u003e` with your platform (e.g., `darwin_arm64`, `linux_amd64`).\n\n5. To remove the local installation:\n   ```sh\n   make uninstall\n   ```\n\n## Development\n\n### Quick Start\n\n```sh\nmake help        # Show all available commands\nmake dev-setup   # Set up development environment\nmake build       # Build the provider\nmake test        # Run unit tests\nmake install     # Install provider locally\n```\n\n### Available Make Commands\n\nRun `make help` to see all available commands. Here's a summary:\n\n#### Build Commands\n\n| Command | Description |\n|---------|-------------|\n| `make build` | Build the provider binary |\n| `make build-all` | Build for all supported platforms (darwin, linux, windows) |\n| `make install` | Build and install to local Terraform plugins directory |\n| `make uninstall` | Remove locally installed provider |\n| `make clean` | Clean build artifacts and Go caches |\n| `make clean-plugins` | Remove all local plugin versions for this provider |\n\n#### Testing Commands\n\n| Command | Description |\n|---------|-------------|\n| `make test` | Run unit tests |\n| `make testacc` | Run acceptance tests (requires `HARNESS_*` env vars) |\n| `make testacc-fme` | Run FME (Split) acceptance tests only (`./internal/service/split/...`) |\n| `make test-coverage` | Run tests with coverage report |\n| `make sweep` | Run sweepers to clean up test resources (use with caution) |\n\n#### Code Quality Commands\n\n| Command | Description |\n|---------|-------------|\n| `make fmt` | Format Go source code |\n| `make fmt-check` | Check if code is properly formatted |\n| `make vet` | Run go vet static analysis |\n| `make lint` | Run golangci-lint |\n| `make check` | Run all code quality checks |\n\n#### Documentation Commands\n\n| Command | Description |\n|---------|-------------|\n| `make docs` | Generate provider documentation |\n| `make docs-validate` | Validate provider documentation |\n| `make changelog` | Generate changelog from `.changelog` entries |\n\n#### Development Commands\n\n| Command | Description |\n|---------|-------------|\n| `make deps` | Download and tidy Go dependencies |\n| `make deps-upgrade` | Upgrade all dependencies |\n| `make tools` | Install development tools (tfplugindocs, changelog-build, golangci-lint) |\n| `make dev-setup` | Complete development environment setup |\n| `make version` | Show version information |\n\n### Running Tests\n\n#### Unit Tests\n\n```sh\nmake test\n```\n\n#### Acceptance Tests\n\nAcceptance tests create real resources in your Harness account. Set the required environment variables first:\n\n```sh\nexport HARNESS_ACCOUNT_ID=\"your-account-id\"\nexport HARNESS_API_KEY=\"your-api-key\"\nexport HARNESS_PLATFORM_API_KEY=\"your-platform-api-key\"\n\nmake testacc\n```\n\nTo run only Harness FME (Split) acceptance tests (smaller and faster than the full suite):\n\n```sh\nmake testacc-fme\n# equivalent:\n# TF_ACC=1 go test -v ./internal/service/split/... -timeout=120m\n```\n\n\n#### Test Coverage\n\n```sh\nmake test-coverage\n# Opens coverage.html in your browser\n```\n\n### Generating Documentation\n\nProvider documentation is auto-generated from schema descriptions:\n\n```sh\nmake docs\n```\n\nGenerated docs are placed in the `docs/` directory.\n\n### Generating Changelog\n\nChangelog entries are stored in the `.changelog/` directory. To generate a new changelog:\n\n```sh\nmake changelog\n```\n\nTo add a changelog entry, create a file in `.changelog/\u003cPR_NUMBER\u003e.txt`:\n\n```\n```release-note:enhancement\nresource/harness_platform_connector: Added support for new authentication method\n```\n```\n\nSupported types: `enhancement`, `bug`, `feature`, `new-resource`, `new-data-source`, `breaking-change`, `note`\n\n### Cleaning Up\n\n```sh\n# Clean build artifacts\nmake clean\n\n# Remove all locally installed plugin versions\nmake clean-plugins\n\n# Remove test resources (sweepers)\nmake sweep\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Run tests and linting (`make check \u0026\u0026 make test`)\n4. Commit your changes (`git commit -m 'Add amazing feature'`)\n5. Push to the branch (`git push origin feature/amazing-feature`)\n6. Open a Pull Request\n\n## Support\n\nIf you have any questions or need assistance:\n\n- Open a [new issue](https://github.com/harness/terraform-provider-harness/issues/new)\n- Join our [Slack community](https://harnesscommunity.slack.com/archives/C02G9CUNF1S)\n- Visit our [documentation](https://docs.harness.io)\n\n## License\n\nThis project is licensed under the terms of the [LICENSE](LICENSE.md) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharness%2Fterraform-provider-harness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharness%2Fterraform-provider-harness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharness%2Fterraform-provider-harness/lists"}