Comments (5)
I believe you're actually looking for 'access_role' field (that's what it's called in the Datadog api), but it's unfortunately not yet supported by this provider. Issue #4 is an open feature request to add the behavior you're looking for.
The current 'role' field refers to something different, something akin to "title" (such as "SRE" or "Lead Developer"). Unfortunately, there is a bug with this field referenced here #12, where it's impossible to actually set that role field after creation.
from terraform-provider-datadog.
Then there is the second behavior which is strange, why is the read-only user converted back to standard user?
Could it be that: https://docs.datadoghq.com/api/#user-update
if no access_role is defined it reverts back to standard user? which would sound strange to me.
from terraform-provider-datadog.
As far as I can tell, with 0.10.7 terraform, 1.0.0 datadog provider, the provider never specifically sets access_role. The go-datadog-api user struct doesn't even have an access_role field.
Since we're not specifically sending access_role, this should be the equivalent of doing:
user="[email protected]"
curl -X PUT -H "Content-type: application/json" \
-d "{\"email\": \"${user}\", \"name\": \"alt user\"}" \
"https://app.datadoghq.com/api/v1/user/${user}?api_key=${api_key}&application_key=${app_key}"
I've tested this (on a read-only user), and I still get back a read-only user. I've also tested sending both of these:
"access_role": "", # empty string
"access_role": null, # explicitly send null
Sending either of those did not result in the role being changed back to 'st' for standard.
from terraform-provider-datadog.
as of go-datadog-api v2.8 the user struct supports the access_role field and the is_admin field has been marked as deprecated. any chance to leverage on this to add feature #4 ?
from terraform-provider-datadog.
The role
argument is confusing to say the least, I'm going to close this issue as the provider behaviour is (unfortunately) correct in terms of API calls. Going to schedule work to deprecate role
(was removed from datadog docs too) and is_admin
in favor of the solutions proposed in #4.
from terraform-provider-datadog.
Related Issues (20)
- Data_source Invalid value events HOT 1
- datadog_synthetics_test unable to mark text typed to an input as secure in browser_step block
- Spurious diffs for restricted_roles HOT 2
- 400 error about `locked` attribute but we aren't using it HOT 5
- Add support for teams mapping in datadog_authn_mapping HOT 1
- Unable to remove suppression filters from datadog_security_monitoring_rule HOT 1
- datadog_monitor (Resource) - Metadata
- Unable to specify attribute Priority for the Sensitive Data Scanner Rule
- Intermittent "unexpected EOF" causes terraform to lose track of resources just created
- "datadog_synthetics_test" with type="browser" should not require request_definition (as for API tests) HOT 1
- Destination should not be null with `datadog_logs_archive` HOT 3
- Style event overlay
- CI Pipelines Alert Returning 400 When Applied Via Terraform
- Can't import datadog_integration_cloudflare_account HOT 1
- Can't use monitor_id for datadog_downtime_schedule resource HOT 1
- Case Management Support
- The Datadog monitor `scheduling_options` block fails to refresh why empty.
- Datadog monitor fails to plan when the `scheduling_options.evaluation_window` argument is provided HOT 1
- Data source for query value HOT 2
- Import doesn't work for datadog_sensitive_data_scanner_*, datadog_restriction_policy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-datadog.