Loading
feat: add gitlab_project_integration_packagist resource
Description
Adds the new resource gitlab_project_integration_packagist, which manages the
Packagist project integration
(PUT/GET/DELETE /projects/:id/integrations/packagist).
Supported attributes: project, username, token (sensitive, write-only), server (optional),
push_events, merge_requests_events, tag_push_events, plus the computed
title, slug, active, created_at, updated_at. Import works with the project ID or path.
Implementation notes
- client-go does not support the Packagist integration yet. Support is added in
gitlab-org/api/client-go!3195 (merged); once it is released, this
resource will be switched from
client.NewRequest/client.Doto client-go. - After
DELETE, GitLab answersGETwith200andactive: falseinstead of404, soReadremoves an inactive integration from state. serverisOptional+Computedand only sent when set. Removing it from the config stops managing it, in line with the other optional attributes in this provider.
Testing
Acceptance tests against GitLab CE 19.5.3 (make testacc RUN=TestAcc_GitlabProjectIntegrationPackagist):
TestAcc_GitlabProjectIntegrationPackagist_basic: create with only the required attributes, update all attributes, removeserverfrom the config (value is kept), import after each stepTestAcc_GitlabProjectIntegrationPackagist_invalidServer: URL validation ofserver
make reviewable passes.
Edited by uluzox