File tree 2 files changed +7
-5
lines changed 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 7
7
"github.com/DataDog/datadog-api-client-go/api/v2/datadog"
8
8
"github.com/hashicorp/terraform-plugin-sdk/helper/customdiff"
9
9
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
10
+ "github.com/hashicorp/terraform-plugin-sdk/helper/validation"
10
11
)
11
12
12
13
// validPermissions is a map of all unrestricted permission IDs to their name
@@ -92,9 +93,10 @@ func getRolePermissionSchema() *schema.Resource {
92
93
return & schema.Resource {
93
94
Schema : map [string ]* schema.Schema {
94
95
"id" : {
95
- Type : schema .TypeString ,
96
- Required : true ,
97
- Description : "ID of the permission to assign." ,
96
+ Type : schema .TypeString ,
97
+ Required : true ,
98
+ Description : "ID of the permission to assign." ,
99
+ ValidateFunc : validation .StringIsNotEmpty ,
98
100
},
99
101
"name" : {
100
102
Type : schema .TypeString ,
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ data "datadog_permissions" "bar" {}
16
16
resource "datadog_role" "foo" {
17
17
name = "foo"
18
18
permission {
19
- id = "${ data.datadog_permissions.bar.permissions.<name_of_permission_1>.id}"
19
+ id = data.datadog_permissions.bar.permissions.monitors_downtime
20
20
}
21
21
permission {
22
- id = "${ data.datadog_permissions.bar.permissions.<name_of_permission_2>.id}"
22
+ id = data.datadog_permissions.bar.permissions.monitors_write
23
23
}
24
24
}
25
25
```
You can’t perform that action at this time.
0 commit comments