Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Check for Environment Scope in ReadVariable #746

Open
@oesah

Description

@oesah

I am coming here from https://github.com/terraform-providers/terraform-provider-gitlab.

Problem
We are using go-gitlab to create resources using terraform. We face an issue, however, where project or group variables do not consider the scope. So if you have 2 variables with the same name but different scopes, it will cause terraform to always try to update them. See discussion here: https://github.com/terraform-providers/terraform-provider-gitlab/issues/213

I think the issue lie here:
https://github.com/xanzy/go-gitlab/blob/master/group_variables.go#L84
https://github.com/xanzy/go-gitlab/blob/master/project_variables.go#L86

Possible Solutions
Currently, the Gitlab API does not allow to filter them. You can follow the issue here: https://gitlab.com/gitlab-org/gitlab/issues/20661

Once that bug is fixed, we can enhance the above mentioned functions to incorporate the filtering solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions