https://github.com/kusionstack/terraform-provider-karpor
The Provider enables Terraform to manage cluster registration for Karpor.
https://github.com/kusionstack/terraform-provider-karpor
Last synced: 5 months ago
JSON representation
The Provider enables Terraform to manage cluster registration for Karpor.
- Host: GitHub
- URL: https://github.com/kusionstack/terraform-provider-karpor
- Owner: KusionStack
- License: apache-2.0
- Created: 2025-02-12T11:22:20.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-03-01T12:54:57.000Z (11 months ago)
- Last Synced: 2025-03-01T13:38:15.006Z (11 months ago)
- Language: Go
- Size: 67.4 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README

# Terraform Provider for Karpor
A Terraform provider for managing cluster registration in Karpor
## Features
- Cluster Registration Management (`karpor_cluster_registration`)
## Installation
### Local Build & Install
```bash
make install # Install to ~/.terraform.d/plugins
```
### Terraform Configuration
```hcl
terraform {
required_providers {
karpor = {
source = "KusionStack/karpor"
version = "0.1.0"
}
}
}
provider "karpor" {
api_endpoint = "https://api.karpor.example.com"
api_key = "" # Recommend using environment variables
}
```
## Usage Example
```hcl
resource "karpor_cluster_registration" "production" {
cluster_name = "production-cluster"
credentials = file("~/.kube/config")
description = "Primary production cluster"
}
```
## Development Guide
### Requirements
- Go 1.21+
- Terraform 1.5+
### Common Commands
```bash
make build # Build provider
make test # Run unit tests
make testacc # Run acceptance tests (requires API credentials)
```
### Test Configuration
Set environment variables before testing:
```bash
export KARPOR_API_ENDPOINT="https://api.karpor.example.com"
export KARPOR_API_KEY="your-api-key"
```
## Contributing
1. Create an issue describing the problem or feature request
2. Develop on a feature branch (feature/xxx)
3. Submit a PR with test cases
4. Pass CI pipeline verification
## License
Mozilla Public License 2.0, see [LICENSE](LICENSE)