Skip to content

Update Access Token Resources to use the planned date regardless of the determined date

Patrick Rice requested to merge work-on-project-access-token into main
  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

This MR changes the logic for project and group access tokens to use the expiration time from the plan instead of re-determining the expiration date at apply time. This fixes a problem where running plan on one day, then apply on the next day could cause an issue because the resulting expiry_date is different than the planned date.

It also removes the use state for unknown modifier from the ID field, since a plan that rotates the ID results in an unknown ID (since it changes when rotating), meaning that Terraform uses the state and throws an error when the rotation actually happens.

Closes #6330 (closed)

Edited by Patrick Rice

Merge request reports

Loading