Skip to content

Commit 365ca9a

Browse files
authored
Merge pull request #22 from enthought/dependabot/go_modules/github.com/hashicorp/terraform-plugin-go-0.25.0
Bump github.com/hashicorp/terraform-plugin-go from 0.23.0 to 0.25.0
2 parents a1aba32 + 13fb106 commit 365ca9a

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

CLAUDE.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Development Commands
6+
7+
### Testing
8+
```bash
9+
# Run acceptance tests (requires QUAY_URL and QUAY_TOKEN environment variables)
10+
make testacc
11+
# OR
12+
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m
13+
```
14+
15+
### Code Generation
16+
```bash
17+
# Generate documentation after code changes
18+
go generate .
19+
20+
# Generate Quay API client from OpenAPI spec
21+
make generate-quay-api
22+
```
23+
24+
### Build and Formatting
25+
```bash
26+
# Format Go code
27+
gofmt -w .
28+
29+
# Build the provider
30+
go build .
31+
```
32+
33+
## Architecture Overview
34+
35+
This is a Terraform provider for the Quay container registry. The codebase follows standard Terraform provider patterns using the HashiCorp Plugin Framework.
36+
37+
### Core Components
38+
39+
- **Provider Definition**: `internal/provider/provider.go` - Main provider configuration with support for token-based and OAuth2 authentication
40+
- **Generated API Client**: `quay_api/` - Auto-generated Go client from Quay's OpenAPI specification
41+
- **Resources & Data Sources**: `internal/provider/*_resource.go` and `internal/provider/*_data_source.go` - Manual implementations
42+
- **Generated Resources**: `internal/resource_*/` and `internal/datasource_*/` - Auto-generated resource implementations
43+
44+
### Authentication
45+
The provider supports two authentication methods:
46+
1. Bearer token authentication (`QUAY_TOKEN`)
47+
2. OAuth2 password grant flow (`QUAY_OAUTH2_USERNAME`, `QUAY_OAUTH2_PASSWORD`, `QUAY_OAUTH2_CLIENT_ID`, `QUAY_OAUTH2_TOKEN_URL`)
48+
49+
### Code Generation Strategy
50+
The provider uses a hybrid approach:
51+
- API client is generated from `code_generator/quay_api.json` using openapi-generator
52+
- Some resources have both manual implementations (in `internal/provider/`) and generated versions (in `internal/resource_*/`)
53+
- Configuration files in `code_generator/` drive the generation process
54+
55+
### Resource Types
56+
- Organizations: Create and manage Quay organizations
57+
- Teams: Manage organization teams and permissions
58+
- Robots: Service accounts for automated access
59+
- Repositories: Container repositories within organizations
60+
61+
### Environment Variables for Testing
62+
- `QUAY_URL`: Quay instance URL (e.g., https://quay.example.com)
63+
- `QUAY_TOKEN`: Authentication token for testing

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module terraform-provider-quay
22

33
go 1.24.0
44

5+
toolchain go1.24.7
6+
57
replace github.com/enthought/terraform-provider-quay/quay_api => ./quay_api
68

79
require (

terraform-provider-quay

-26.2 MB
Binary file not shown.

0 commit comments

Comments
 (0)