- 重要な情報
- はじめに
- 用語集
- ガイド
- エージェント
- インテグレーション
- OpenTelemetry
- 開発者
- API
- CoScreen
- アプリ内
- Service Management
- インフラストラクチャー
- アプリケーションパフォーマンス
- 継続的インテグレーション
- ログ管理
- セキュリティ
- UX モニタリング
- 管理
The restricted_roles
attribute can be used to restrict editing of the dashboard to specific roles. The field takes a list of IDs of roles, and authorizes any associated users.
Example usage:
resource "datadog_dashboard" "example" {
title = "Example dashboard"
restricted_roles = ["<role_id_1>", "<role_id_2>"]
}
Note: The is_read_only
attribute is deprecated. It is recommended to use the restricted_roles
attribute or restriction policies to manage access to your dashboards.
Restriction Policies allow you to restrict the editing of dashboards and other resources to specific principals, including roles, teams, users, and service accounts.
Example usage:
resource "datadog_dashboard" "example" {
title = "Example dashboard"
# Do not use restricted_roles or is_read_only attributes
}
resource "datadog_restriction_policy" "example" {
resource_id = "dashboard:${datadog_dashboard.example.id}"
bindings {
principals = ["org:<org_id>"]
relation = "viewer"
}
bindings {
principals = ["role:<role_id_1>", "role:<role_id_2>"]
relation = "editor"
}
}
Role IDs can be retrieved from the Roles API, Roles UI, or by using the role ID defined in Terraform for datadog_role resources.
Org ID can be obtained from the GET /api/v2/current_user API request. Find it in the data.relationships.org.data.id
field.