Skip to content

Commit 1295b7f

Browse files
doc update and bug fix in list test
1 parent bb4c834 commit 1295b7f

2 files changed

Lines changed: 36 additions & 5 deletions

File tree

internal/services/storage/storage_sync_server_endpoint_resource_list_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package storage_test
55

66
import (
77
"context"
8+
"fmt"
89
"testing"
910

1011
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
@@ -32,7 +33,7 @@ func TestAccStorageSyncServerEndpoint_list_basic(t *testing.T) {
3233
},
3334
{
3435
Query: true,
35-
Config: r.basicListQuery(),
36+
Config: r.basicListQuery(data),
3637
QueryResultChecks: []querycheck.QueryResultCheck{
3738
querycheck.ExpectLengthAtLeast(listResourceAddress, 1),
3839
},
@@ -41,13 +42,13 @@ func TestAccStorageSyncServerEndpoint_list_basic(t *testing.T) {
4142
})
4243
}
4344

44-
func (r StorageSyncServerEndpointResource) basicListQuery() string {
45-
return `
45+
func (r StorageSyncServerEndpointResource) basicListQuery(data acceptance.TestData) string {
46+
return fmt.Sprintf(`
4647
list "azurerm_storage_sync_server_endpoint" "list" {
4748
provider = azurerm
4849
config {
49-
storage_sync_group_id = azurerm_storage_sync_group.test.id
50+
storage_sync_group_id = "/subscriptions/%s/resourceGroups/acctestRG-StorageSync-%d/providers/Microsoft.StorageSync/storageSyncServices/acctest-StorageSync-%d/syncGroups/acctest-StorageSyncGroup-%d"
5051
}
5152
}
52-
`
53+
`, data.Subscriptions.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger)
5354
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
subcategory: "Storage"
3+
layout: "azurerm"
4+
page_title: "Azure Resource Manager: azurerm_storage_sync_server_endpoint"
5+
description: |-
6+
Lists Storage Sync Server Endpoint resources.
7+
---
8+
9+
# List resource: azurerm_storage_sync_server_endpoint
10+
11+
Lists Storage Sync Server Endpoint resources.
12+
13+
## Example Usage
14+
15+
### List all Storage Sync Server Endpoints in a Storage Sync Group
16+
17+
```hcl
18+
list "azurerm_storage_sync_server_endpoint" "example" {
19+
provider = azurerm
20+
config {
21+
storage_sync_group_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageSync/storageSyncServices/service1/syncGroups/syncGroup1"
22+
}
23+
}
24+
```
25+
26+
## Argument Reference
27+
28+
This list resource supports the following arguments:
29+
30+
* `storage_sync_group_id` - (Required) The ID of the Storage Sync Group to query.

0 commit comments

Comments
 (0)