Skip to content

Fix incorrect authentication method for curl

Anton Starovoytov requested to merge astarovoytov-terraform-api-docs into master

What does this MR do and why?

Recent Terraform Registry API ticket (internal) revealed incorrect authentication method in example curl commands in our documentation.

Related issue https://gitlab.com/gitlab-com/dev-sub-department/section-dev-request-for-help/-/issues/14

This MR is to update the documentation to the correct auth method.

How to set up and validate locally

Project to test: https://gitlab.com/api/v4/packages/terraform/modules/v1/gitlab-gold/my-module/local/versions

  1. Run curl --header "Private-Token: <Token>" https://gitlab.com/api/v4/packages/terraform/modules/v1/gitlab-gold/my-module/local/versions and see there is no data returned
  2. Run curl --header "Authorization: Bearer <Token>" "https://gitlab.com/api/v4/packages/terraform/modules/v1/gitlab-gold/my-module/local/versions" and it returns the correct response

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports