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

Mark guild Role position as computed #171

Merged
merged 5 commits into from
Oct 28, 2024

Conversation

Cyb3r-Jak3
Copy link

@Cyb3r-Jak3 Cyb3r-Jak3 commented Oct 24, 2024

Mark the position of a role as computed. I find it is easier to create roles with terraform and then move them into position manually.

Currently, I have to use

    lifecycle {
        ignore_changes = [position]
    }

and this would alleviate that.

Shouldn't be a breaking change but also might be worth releasing as a 2.0

@Cyb3r-Jak3 Cyb3r-Jak3 requested a review from Lucky3028 as a code owner October 24, 2024 21:51
Copy link
Owner

@Lucky3028 Lucky3028 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx for your PR

.goreleaser.yml Outdated Show resolved Hide resolved
discord/resource_discord_role.go Show resolved Hide resolved
docs/resources/role.md Show resolved Hide resolved
Copy link
Owner

@Lucky3028 Lucky3028 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some people may want to set the roll position manually.
This PR is too destructive, isn’t it?

@Cyb3r-Jak3
Copy link
Author

I think some people may want to set the roll position manually.

You are still able to set the position of the role. By swapping to from Default to Computed, roles that have their position not set and are updated remotely won't trigger changes. If you have a value set for the position attribute, then changes will still be triggered.

hashicorp/terraform#21278

@Lucky3028
Copy link
Owner

I see. Thanks!

@Lucky3028 Lucky3028 merged commit 3015043 into Lucky3028:main Oct 28, 2024
3 checks passed
@Cyb3r-Jak3 Cyb3r-Jak3 deleted the mark-role-postion-as-computed branch October 29, 2024 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants