Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix constant diff in cloudsmith_manage_team #127

Conversation

scott-doyland-burrows
Copy link

@scott-doyland-burrows scott-doyland-burrows commented Dec 1, 2024

Fixes #126

The only real change is to the cloudsmith/resource_manage_team.go file.

This alters the members to a schema of TypeSet rather than TypeList which allows terraform to ignore the order of the sorted members.

I tested this by running it against my Cloudsmith account, and all the relevant diffs were gone.

I also did multiple adding/deleting/updating of users into various teams, and terraform/Cloudsmith behaved correctly each time.

The examples files were updated as I run a terraform fmt pre-commit git hook, and so the formatting is now correct.

If this approved/merged, then could a new release be released, as this constant diff is really clouding our plans.

Update

Looks like some of the GHA tests failed:

provider_test.go:32: CLOUDSMITH_API_KEY must be set for acceptance tests

Secret `SLACK_WEBHOOK` is missing. Please add it to this action for proper execution

But not much I can do about that.

@scott-doyland-burrows scott-doyland-burrows requested a review from a team as a code owner December 1, 2024 14:32
@BartoszBlizniak
Copy link
Contributor

Thank you for your contribution @scott-doyland-burrows !

Unfortunately, due to the nature of the test and ULTRA subscription required, only Cloudsmith staff can run the tests. I will have to create a branch from your fork and submit a PR on behalf of you.

@scott-doyland-burrows
Copy link
Author

@BartoszBlizniak other providers, such as GitHub and AWS, do allow PRs in this way. I think they rely on the person putting in the PR to have tested it in their own account, although I appreciate this isn't exactly ideal.

But maybe it is something to consider, especially if you start to get a lot of PRs later down the line.

@BartoszBlizniak
Copy link
Contributor

Hey @scott-doyland-burrows we have merged your PR into #130 and will be part of the next release (available later today).

In terms of testing, we will be taking a look at this, we previously discussed this but the terraform provider gained more traction so we will aim to make this process easier for users to contribute!

@scott-doyland-burrows
Copy link
Author

Excellent. Thanks very much.

@scott-doyland-burrows scott-doyland-burrows deleted the fix/cloudsmith-manage-team-add-sort branch December 4, 2024 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

cloudsmith_manage_team - getting one of those annoying constant diffs
2 participants