perpetual diff in protected environments when deploy_access_levels does not exactly match order of api response

GitLab Provider version

3.18.0

GitLab version

gitlab.com

Terraform version

1.3.1

Relevant Terraform Configuration

"gitlab_project_protected_environment" "test" {
  project     = gitlab_project.this.id
  environment = "test"

  deploy_access_levels {
    group_id = var.sre_group_id
  }

  deploy_access_levels {
    access_level = "maintainer"
  }

  depends_on = [
    gitlab_project_share_group.sre
  ]
}

Relevant log output

No response

Description

As noted in #1132 (closed) Terraform will always show that it needs to recreate the protected environment if the order of deploy_access_levels blocks do not exactly match the order returned by the /projects/:id/protected_environments/:name api endpoint.

The order should not matter.

Edited by Timo Furrer