feat: support per-remote upstream timeouts #9

Merged
benvin merged 1 commits from benvin/remote-upstream-timeouts into main 2026-07-02 22:23:04 +10:00
Owner

Adds the per-remote upstream timeout fields introduced server-side in artifactapi PR #83.

Why

The artifactapi server now lets each remote override the upstream dial / TLS-handshake / response-header timeouts (seconds; 0 = server default). The provider needs to manage these so they can be set via Terraform.

Changes

  • remoteAPI model: upstream_dial_timeout, upstream_tls_timeout, upstream_response_header_timeout.
  • artifactapi_remote_* resource: three optional/computed Int64 attributes (default 0), wired through modelToAPI / apiToModel.
  • artifactapi_remote data source: same three computed attributes + Read mapping.
  • README attribute table + unit tests (full-fields, round-trip, schema).

Validation

  • make test (unit, -race) passes.
  • Live end-to-end with a patched artifactapi against Postgres/Redis/MinIO: terraform apply set upstream_dial_timeout=7 / upstream_response_header_timeout=25; the server persisted them; a follow-up terraform plan reported no drift.

Depends on

artifactapi server PR #83 (the timeout columns/API). Merge/release that first.

Adds the per-remote upstream timeout fields introduced server-side in artifactapi PR #83. ## Why The artifactapi server now lets each remote override the upstream dial / TLS-handshake / response-header timeouts (seconds; `0` = server default). The provider needs to manage these so they can be set via Terraform. ## Changes - `remoteAPI` model: `upstream_dial_timeout`, `upstream_tls_timeout`, `upstream_response_header_timeout`. - `artifactapi_remote_*` resource: three optional/computed `Int64` attributes (default `0`), wired through `modelToAPI` / `apiToModel`. - `artifactapi_remote` data source: same three computed attributes + Read mapping. - README attribute table + unit tests (full-fields, round-trip, schema). ## Validation - `make test` (unit, `-race`) passes. - Live end-to-end with a patched artifactapi against Postgres/Redis/MinIO: `terraform apply` set `upstream_dial_timeout=7` / `upstream_response_header_timeout=25`; the server persisted them; a follow-up `terraform plan` reported **no drift**. ## Depends on artifactapi server PR #83 (the timeout columns/API). Merge/release that first.
unkinben added 1 commit 2026-07-02 22:19:51 +10:00
feat: support per-remote upstream timeouts
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
4dd290518d
Add upstream_dial_timeout, upstream_tls_timeout and
upstream_response_header_timeout (seconds; 0 = server default) to the
remote resource and data source, matching the artifactapi server. Wire
them through the API model, schema, create/read/update mapping, docs and
unit tests.
benvin merged commit 0561bae10e into main 2026-07-02 22:23:04 +10:00
benvin deleted branch benvin/remote-upstream-timeouts 2026-07-02 22:23:04 +10:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/terraform-provider-artifactapi#9