Skip to content

feat: expose device pool membership criteria - #3

Open
jamilbk wants to merge 1 commit into
mainfrom
feat/device-pools
Open

jamilbk wants to merge 1 commit into
mainfrom
feat/device-pools

Conversation

@jamilbk

@jamilbk jamilbk commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

The current REST API creates device_pool Resources and stores their membership rule in device_membership_criteria. The SDK still advertised the legacy static_device_pool type and discarded that field on reads, blocking Terraform support.

Add the current type and carry criteria as json.RawMessage through create, update, get and list. Nil criteria on update preserves existing membership. Keep the old constant as deprecated for source compatibility, and document that pool-member endpoints only accept listed-device criteria.

Refresh the Resource/PoolMember portion of the OpenAPI fixture from firezone/main/elixir at 48052865fdbd492eeaf471a8aee3942c4f7bcf17. Update the integration test to create and clean up its own pool instead of depending on portal-created legacy pools.

Validation: race tests, vet (including integration-tag compilation), golangci-lint, and OpenAPI conformance checks pass. HTTP tests exercise all four criteria shapes and field preservation. Live integration tests were not run against an account.

Companion dependency for firezone/terraform-provider-firezone#4. Merge this SDK PR first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant