Run init with -lockfile=readonly
https://gitlab.com/gitlab-org/terraform-images/-/tree/88f4ad0c#terraform-lockfile-handling has a recommendation about running init with -lockfile=readonly
"to prevent changes to the lockfile". This project does not have a corresponding recommendation or implementation.