Skip to content

What is best practice of managing Server Roles Positions? #125

Closed Answered by myroslav
myroslav asked this question in Q&A
Discussion options

You must be logged in to vote

I'd managed to convince Terraform to start ignoring changes of role position with following snippet inside discord_role resource.

resource discord_role this {

     ...

    lifecycle {
      ignore_changes = [
        # Ignore changes to position, e.g. because as soon as object is added,
        # others shipt (change their position)
        position,
      ]
    }
}

Terraform does see the change of attribute but only reads it out of Discord and stores the actual attribute value in state with each terraform apply while reporting following:

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the last "terraform apply" 
…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Lucky3028
Comment options

Answer selected by Lucky3028
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants