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

Feature request: Add user access_role to Datadog provider #4

Closed
hashibot opened this issue Jun 13, 2017 · 13 comments
Closed

Feature request: Add user access_role to Datadog provider #4

hashibot opened this issue Jun 13, 2017 · 13 comments
Assignees

Comments

@hashibot
Copy link

This issue was originally opened by @teeebs as hashicorp/terraform#13920. It was migrated here as part of the provider split. The original body of the issue is below.


Datadog now supports read-only user accounts. Adding them via the API is done by passing access_role with the following options:

  • 'st' (standard user)
  • 'adm' (admin user)
  • 'ro' (read-only user)

API docs for reference: http://docs.datadoghq.com/api/#users

Thanks!

@Nowaker
Copy link

Nowaker commented Jul 18, 2017

It'd be good to provision standard and/or admin accounts. Great for automated employee onboarding/offboarding.

@CumpsD
Copy link

CumpsD commented Apr 23, 2018

Would love this as well, then I dont have to login after running TF to downgrade them

@masci
Copy link
Contributor

masci commented Jul 6, 2018

Just to confirm I'm going to schedule some work to implement this, will update the issue accordingly.

@masci
Copy link
Contributor

masci commented Jul 13, 2018

Currently working on this, the hard part is keeping backward compatibility with the existing is_admin argument.

@masci masci self-assigned this Jul 13, 2018
@Nowaker
Copy link

Nowaker commented Jul 13, 2018

@masci I wouldn't worry about it. Module versions can be easily locked. Personally, I always lock versions of all dependencies to avoid future compatibility problems - is it in a real programming language like Ruby, o "just" Terraform.

@masci
Copy link
Contributor

masci commented Jul 13, 2018

@Nowaker thanks for the advice. I'd have loved to deprecate is_admin in the upcoming minor and get rid of it on a subsequent release but if this becomes too hacky I'll just remove it.

@masci
Copy link
Contributor

masci commented Aug 27, 2018

Update: finally had time to work on this. It turned out we can't really support both is_admin and access_role at the same time, so I'm going to deprecate is_admin for now and remove it completely with a major release, where access_role will be introduced.

@pdecat
Copy link
Contributor

pdecat commented Aug 28, 2018

Hi @masci, have you looked into using ConflictsWith like is done for the downtime resource?

This would probably help introducing access_role before removing is_admin.
Right now, upgrading to 1.2.0 produces a lot of deprecation warnings for us which cannot be resolved.

@Eightyplus
Copy link

What is the status of this task?

@masci masci added this to the 2.0 milestone Nov 27, 2018
@masci
Copy link
Contributor

masci commented Nov 27, 2018

@Eightyplus I've a working branch but the change will be breaking so I'm just waiting for the right moment to draft a 2.0. I can submit a PR with my changes as soon as we fix #117 that for now has the highest priority.

@keith-minnig
Copy link

Any updates?

@burukuru
Copy link
Contributor

For anyone who lands here, PR https://github.com/terraform-providers/terraform-provider-datadog/pull/155 implements access_role. This was merged and available from release 1.7 (current is 1.8).

I kept having issues with Terraform trying to set is_admin from true to false so had work around it with a lifecycle:

  lifecycle {
    ignore_changes = [
      "is_admin",
    ]
  }

@bkabrda
Copy link
Contributor

bkabrda commented Apr 17, 2019

So this has been implemented in #155 and documented in #178, therefore I think it's safe to close this. Thanks all who participated in the discussion!

@nmuesch nmuesch closed this as completed Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants