Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## 0.1.0 (Unreleased)

FEATURES:

**New Resources:**
* `catalyst_region` - Manage Catalyst regions with ingress, host, and location configuration
* `catalyst_project` - Create and manage projects within regions
* `catalyst_service_account` - Manage service accounts with role-based access control
* `catalyst_service_account_api_key` - Generate and manage API keys for service accounts with optional expiration

**New Data Sources:**
* `catalyst_organization` - Retrieve organization information
* `catalyst_region` - Fetch details about existing regions
* `catalyst_project` - Query project information
* `catalyst_service_account` - Access service account details
* `catalyst_service_account_api_key` - Retrieve API key information

**Provider Configuration:**
* API key authentication support
* Configurable endpoint for different environments
* Full Terraform state management for all resources

**Documentation:**
* Comprehensive README with usage examples
* Generated documentation for all resources and data sources
* Complete example configurations in `/examples` directory
94 changes: 93 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,99 @@ go install

## Using the provider

Fill this in for each provider
The Catalyst provider enables you to manage Diagrid Catalyst resources using Terraform. You'll need an API key to authenticate with the Catalyst API.

### Provider Configuration

```hcl
terraform {
required_providers {
catalyst = {
source = "diagridio/catalyst"
}
}
}

provider "catalyst" {
api_key = var.api_key
endpoint = var.endpoint # Optional, defaults to production endpoint
}
```

### Authentication

Set your API key as a variable or environment variable:

```bash
export TF_VAR_api_key="your-catalyst-api-key"
```

### Available Resources

#### Regions
Create and manage Catalyst regions:

```hcl
resource "catalyst_region" "us_west" {
name = "us-west-region"
ingress = "https://*.example.com:443"
host = "us-west-host"
location = "us-west-1"
}
```

#### Projects
Create projects within regions:

```hcl
resource "catalyst_project" "my_project" {
region = catalyst_region.us_west.name
name = "my-application"
}
```

#### Service Accounts
Manage service accounts for programmatic access:

```hcl
resource "catalyst_service_account" "automation" {
name = "automation-account"
description = "Service account for CI/CD automation"
owner = "devops@example.com"
role = "cra.diagrid:admin" # or "cra.diagrid:viewer"
}
```

#### Service Account API Keys
Generate API keys for service accounts:

```hcl
resource "catalyst_service_account_api_key" "automation_key" {
name = "automation-api-key"
service_account_id = catalyst_service_account.automation.name
expire_in_seconds = 86400 # 24 hours (optional)
}

# Access the generated token
output "api_key_token" {
value = catalyst_service_account_api_key.automation_key.token
sensitive = true
}
```

### Available Data Sources

All resources are also available as data sources for referencing existing infrastructure:

- `data.catalyst_organization` - Organization information
- `data.catalyst_region` - Region details
- `data.catalyst_project` - Project information
- `data.catalyst_service_account` - Service account details
- `data.catalyst_service_account_api_key` - API key information

### Example Usage

See the `examples/` directory for complete working examples of each resource type.

## Developing the Provider

Expand Down