{"id":46645097,"url":"https://github.com/get-select/terraform-provider-select","last_synced_at":"2026-03-08T04:31:47.132Z","repository":{"id":304714192,"uuid":"1018208446","full_name":"get-select/terraform-provider-select","owner":"get-select","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-03T17:12:42.000Z","size":100,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-04T06:30:26.303Z","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":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/get-select.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-11T19:54:03.000Z","updated_at":"2025-11-28T23:18:39.000Z","dependencies_parsed_at":"2025-07-14T23:26:17.602Z","dependency_job_id":"6f50e5e4-70fc-44c0-9487-70930622c96a","html_url":"https://github.com/get-select/terraform-provider-select","commit_stats":null,"previous_names":["get-select/terraform-provider-select"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/get-select/terraform-provider-select","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/get-select%2Fterraform-provider-select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/get-select%2Fterraform-provider-select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/get-select%2Fterraform-provider-select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/get-select%2Fterraform-provider-select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/get-select","download_url":"https://codeload.github.com/get-select/terraform-provider-select/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/get-select%2Fterraform-provider-select/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30245222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2026-03-08T04:31:46.500Z","updated_at":"2026-03-08T04:31:47.096Z","avatar_url":"https://github.com/get-select.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Provider for SELECT - Development\n\nThis repository contains the source code for the [SELECT Terraform Provider](https://registry.terraform.io/providers/get-select/select). This provider is _mostly_ **auto-generated** from SELECT's public OpenAPI specification, enabling developers to manage SELECT platform resources through Terraform.\n\n\u003e **For usage documentation and examples**, visit the [official Terraform Registry documentation](https://registry.terraform.io/providers/get-select/select/latest/docs).\n\n## About SELECT\n\n[SELECT](https://select.dev) helps organizations optimize their Snowflake usage and costs. This Terraform provider enables Infrastructure as Code management of SELECT platform resources like usage groups and usage group sets.\n\n## Architecture Overview\n\nThis provider is built using:\n- **[Terraform Plugin Framework](https://github.com/hashicorp/terraform-plugin-framework)** - Modern Terraform provider development\n- **[tfplugingen-openapi](https://github.com/hashicorp/terraform-plugin-codegen-openapi)** - OpenAPI to Terraform schema generation  \n- **[tfplugingen-framework](https://github.com/hashicorp/terraform-plugin-codegen-framework)** - Framework code generation\n- **SELECT's Public OpenAPI Spec** - Single source of truth hosted at `https://api.select.dev/public_openapi`\n\n### Code Generation Workflow\n\nThe provider code is generated from SELECT's public OpenAPI specification:\n\n1. **Fetch OpenAPI Spec**: Downloads the latest spec from `https://api.select.dev/public_openapi`\n2. **Generate Schema**: `tfplugingen-openapi` converts OpenAPI spec to Terraform schema definitions\n3. **Generate Code**: `tfplugingen-framework` creates the final provider code\n4. **Manual Customization**: Configuration in `generator_config.yml` allows for customizations and overrides\n\nThis ensures the provider stays in sync with SELECT's API automatically.\n\n## Development Requirements\n\n- **[Go](https://golang.org/doc/install)** \u003e= 1.24.4\n- **[Terraform](https://www.terraform.io/downloads.html)** \u003e= 1.7.0\n\n### Required Tools\n\nThe following tools are automatically installed during the build process:\n\n```bash\n# These are installed automatically by the Makefile\ngo install github.com/hashicorp/terraform-plugin-codegen-openapi/cmd/tfplugingen-openapi@latest\ngo install github.com/hashicorp/terraform-plugin-codegen-framework/cmd/tfplugingen-framework@latest\n```\n\n## Quick Start\n\n```bash\n# Clone the repository\ngit clone https://github.com/get-select/terraform-provider-select\ncd terraform-provider-select\n\n# Generate provider code from OpenAPI spec and build\nmake reset\n\n# Set up local development\nmake setup-dev-overrides\n```\n\n## Development Commands\n\n| Command | Description |\n|---------|-------------|\n| `make help` | Show all available commands |\n| `make codegen` | Download OpenAPI spec and generate provider code |\n| `make build` | Build the provider binary |\n| `make install` | Install provider locally for testing |\n| `make setup-dev-overrides` | Configure Terraform to use local provider |\n| `make test` | Run provider tests |\n| `make clean` | Remove all generated files and build artifacts |\n| `make reset` | Full reset: clean, regenerate, and install |\n\n### Development Workflow\n\n1. **Initial Setup**:\n   ```bash\n   make reset                    # Generate code and build\n   make setup-dev-overrides     # Configure local development overrides\n   ```\n\n2. **Making Changes**:\n   ```bash\n   # After modifying generator_config.yml or when API updates:\n   make reset\n   \n   # For code-only changes (if manually editing generated code):\n   make build install\n   ```\n\n  Types from the API spec are added to `internal/provider/`. Some boilerplate is then needed to connect those types to the Api in a way that terraform understands. There is one of these per resource in `internal/`.\n\n3. **Testing**:\n\n  Testign requires and API key and organization generated from teh SELECT backend you wish to test against. You can generate an API key in Settings -\u003e API Keys and you can find your organization id in Settings -\u003e Profile.\n   ```bash\n   # Set required environment variables\n   export TF_VAR_select_api_key=\"your-api-key\"\n   export TF_VAR_select_organization_id=\"your-org-id\"\n   \n   # Run tests\n   make test\n   ```\n\n## Configuration Files\n\n### `generator_config.yml`\nConfigures the code generation process:\n- Resource mappings (API endpoints to Terraform resources)\n- Schema overrides and customizations\n- Field descriptions and validation rules\n- Ignored fields that don't map well to Terraform\n\n### `example.terraformrc`\nTemplate for Terraform development overrides that allows using the locally built provider instead of downloading from the registry.\n\n## Project Structure\n\n```\nterraform-provider-select/\n├── internal/                    # Hand-written provider core\n│   ├── provider.go             # Provider configuration and setup\n│   ├── api.go                  # HTTP client and API utilities\n│   ├── usage_group_resource.go # Custom resource implementations\n│   └── provider/               # Generated code (git-ignored)\n├── tests/                      # Provider tests\n├── docs/                       # Generated documentation\n├── examples/                   # Usage examples\n├── generator_config.yml        # Code generation configuration\n├── Makefile                    # Development commands\n└── main.go                     # Provider entry point\n```\n\n## OpenAPI Dependency\n\n**Important**: This provider is entirely dependent on SELECT's public OpenAPI specification. The specification is:\n\n- **Hosted at**: `https://api.select.dev/public_openapi`\n- **Auto-fetched**: Every `make codegen` downloads the latest spec\n- **Single Source of Truth**: Changes to the API automatically reflect in the provider\n\nIf the OpenAPI endpoint is unavailable, the code generation will fail. For offline development, you can work with a previously downloaded `openapi.public.json` file.\n\n## Testing\n\nThe provider includes comprehensive tests that validate functionality against the live SELECT API:\n\n```bash\n# Run all tests\nmake test\n\n# Run specific test files  \ncd tests \u0026\u0026 terraform test provider.tftest.hcl\n\n# Run specific test cases\ncd tests \u0026\u0026 terraform test provider.tftest.hcl -filter=create_usage_group_set\n```\n\n**Note**: Tests require valid SELECT API credentials and will create/modify real resources.\n\n## Documentation Generation\n\nSome documentation is semi auto-generated from the provider schema. Field descriptions are pulled from the Open API spec and should be changed in the backends endpoint metadata. Other parts of the documentation are maintained in `templates/`\n\n```bash\nmake docs\n```\n\nThis creates documentation in the `docs/` directory that matches the format used in the Terraform Registry.\n\nYou can use this tool to preview a document file before releasing it https://registry.terraform.io/tools/doc-preview\n\n## Release Process\n\nReleases are automated via GitHub Actions when tags are pushed, you can also create a new release via the github UI by creating a release with a new tag that objects the [Semantic Versioning](https://semver.org/) format, for example: `v1.2.3`. \n\n1. Code is generated from the latest OpenAPI spec\n2. Provider is built for multiple platforms\n3. Binaries are signed and uploaded to GitHub releases\n4. Terraform Registry is automatically updated\n\n## Contributing\n\n1. **Fork** the repository\n2. **Create a feature branch** from `main`\n3. **Make your changes** to `generator_config.yml` or core provider files\n4. **Test your changes** with `make test`\n5. **Submit a pull request**\n\n### Common Development Tasks\n\n**Adding a new resource**:\n1. Update `generator_config.yml` with the new resource configuration\n2. Run `make reset` to regenerate code\n3. Add any custom logic in `internal/`\n4. Add tests in `tests/`\n\n**Modifying existing resources**:\n1. Update the relevant section in `generator_config.yml`\n2. Run `make reset`\n3. Test changes with `make test`\n\n## Troubleshooting\n\n**\"Provider not found\" errors**:\n```bash\nmake setup-dev-overrides  # Ensure dev overrides are configured\n```\n\n**Code generation failures**:\n```bash\n# Check internet connection and try again\nmake clean \u0026\u0026 make codegen\n```\n\n**Test failures**:\n```bash\n# Ensure credentials are set\nexport TF_VAR_select_api_key=\"your-key\"\nexport TF_VAR_select_organization_id=\"your-org-id\"\n\n# Clean test state\nmake test-clean \u0026\u0026 make test\n```\n\n## Links\n\n- **[Terraform Registry](https://registry.terraform.io/providers/get-select/select/latest)** - Official provider documentation and usage examples\n- **[SELECT Platform](https://select.dev)** - SELECT platform documentation\n- **[Provider Issues](https://github.com/get-select/terraform-provider-select/issues)** - Report bugs or request features\n- **[Terraform Plugin Framework](https://developer.hashicorp.com/terraform/plugin/framework)** - Framework documentation\n\n## License\n\nThis project is licensed under the Mozilla Public License 2.0 - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fget-select%2Fterraform-provider-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fget-select%2Fterraform-provider-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fget-select%2Fterraform-provider-select/lists"}