Skip to content

Commit e97a8bd

Browse files
committed
Update docs and changelog
1 parent 3ce783d commit e97a8bd

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
## 2.12.1 (Unreleased)
1+
## 2.13.0 (Unreleased)
2+
3+
FEATURES:
4+
* **New Resource:** sumologic_content_permission (GH-340)
25

36
ENHANCEMENTS:
47
* Add support for importing folder resource (GH-345)

sumologic/resource_sumologic_permissions_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestAccPermission_create(t *testing.T) {
1717
CheckDestroy: testAccCheckPermissionDestroy,
1818
Steps: []resource.TestStep{
1919
{
20-
Config: testAccSumologicPermission(
20+
Config: testAccSumologicPermissionCreate(
2121
otherResource, false, "create", "role", "sumologic_role.permission_test_role"),
2222
Check: resource.ComposeTestCheckFunc(
2323
testAccCheckPermissionExists("sumologic_content_permission.content_permission_test", &response, t),
@@ -42,7 +42,7 @@ func TestAccPermission_update(t *testing.T) {
4242
CheckDestroy: testAccCheckPermissionDestroy,
4343
Steps: []resource.TestStep{
4444
{
45-
Config: testAccSumologicPermission(
45+
Config: testAccSumologicPermissionCreate(
4646
otherResource, false, "create", "role", "sumologic_role.permission_test_role"),
4747
Check: resource.ComposeTestCheckFunc(
4848
testAccCheckPermissionExists("sumologic_content_permission.content_permission_test", &response, t),
@@ -77,7 +77,7 @@ func TestAccPermission_delete(t *testing.T) {
7777
CheckDestroy: testAccCheckPermissionDestroy,
7878
Steps: []resource.TestStep{
7979
{
80-
Config: testAccSumologicPermission(
80+
Config: testAccSumologicPermissionCreate(
8181
otherResource, false, "create", "role", "sumologic_role.permission_test_role"),
8282
Check: resource.ComposeTestCheckFunc(
8383
testAccCheckPermissionExists("sumologic_content_permission.content_permission_test", &response, t),
@@ -187,7 +187,7 @@ func testAccCheckPermissionAttributes(name string) resource.TestCheckFunc {
187187
}
188188
}
189189

190-
func testAccSumologicPermission(resource string, notify_recipient bool, notification_message string,
190+
func testAccSumologicPermissionCreate(resource string, notify_recipient bool, notification_message string,
191191
source_type string, source_id string) string {
192192
return fmt.Sprintf(`
193193
%s

website/docs/r/content_permission_source.html.markdown

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ permissions.
8787
- `permission` - (Required) Permission block defining permission on the content. See
8888
[permission schema](#schema-for-permission) for details.
8989

90-
## Attributes reference
91-
9290
### Schema for `permission`
9391
- `permission_name` - (Required) Content permission name. Valid values are `View`, `GrantView`,
9492
`Edit`, `GrantEdit`, `Manage`, and `GrantManage`. You can read more about permission levels
@@ -98,3 +96,10 @@ and `org`.
9896
- `source_id` - (Required) An identifier that belongs to the source type chosen above. For example,
9997
if the `sourceType` is set to `user`, `sourceId` should be identifier of the user you want to share
10098
content with (same goes for role and org source type).
99+
100+
## Import
101+
Permisions on a content item can be imported using the content identifier, e.g.:
102+
```hcl
103+
// import permissions for content item with identifier = 0000000008E0183E
104+
terraform import sumologic_content_permission.dashboard_permission_import 0000000008E0183E
105+
```

0 commit comments

Comments
 (0)