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

Make is_admin computed #251

Merged
merged 1 commit into from
Jun 27, 2019
Merged

Make is_admin computed #251

merged 1 commit into from
Jun 27, 2019

Conversation

nmuesch
Copy link
Contributor

@nmuesch nmuesch commented Jun 27, 2019

The is_admin flag that is going through its deprecation process has a lower precedence than the access_role flag.

The is_admin doesn't really get used in the request, but is still returned with a different value depending on what the access_role for that user is set to. For this reason we should make it a Computed value to avoid spurious diffs while users make the transition.

Before this change, if you were using the is_admin config option and had it set to True, you'd get a user that was an admin. If you transition to the access_role flag, and remove the is_admin, the default was False, and Terraform would attempt to mark this flag as false. Since the access_role takes precedence this led to an untrue diff being shown to the user on each new plan/apply. This removes that diff unless there is an explicit user config change.

@ghost ghost added the size/XS label Jun 27, 2019
Copy link
Contributor

@bkabrda bkabrda left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@nmuesch nmuesch merged commit a1be74a into DataDog:master Jun 27, 2019
@nmuesch nmuesch deleted the nick/admin_diff branch June 27, 2019 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants