Implement the archived
attribute on Project data source and resource
#148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hallo, I'm proposing in this PR a few changes to enable the management of the
archived
attribute on both thegitlab_project
resource and data source.In doing so I had to implement partial state update in the project's update method, since the existing project properties update logic and the new archiving/unarchiving operation require different API calls, which may fail independently.
In the process I also noticed that the existing code to handle the
shared_with_groups
attribute in thegitlab_project
resource method does not seem to handle errors which are swallowed altogether. Since this attribute, just like thearchived
attribute, requires its own different API call, I expected it to use partial state updates in order to avoid an inconsistent state in case of failure.I updated the acceptance tests and the documentation for both resource and datasource.
Hope this helps!