Skip to content

Commit 95ae285

Browse files
committed
make change based on test result & review
1 parent b8b62cb commit 95ae285

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

internal/services/batch/batch_pool_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ func startTaskSchema() map[string]*pluginsdk.Schema {
15511551
Schema: map[string]*pluginsdk.Schema{
15521552
"source": {
15531553
Type: pluginsdk.TypeString,
1554-
Optional: true,
1554+
Required: true,
15551555
ValidateFunc: validation.StringInSlice(pool.PossibleValuesForContainerHostDataPath(), false),
15561556
},
15571557
"read_only_enabled": {

internal/services/batch/batch_pool_resource_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ func TestAccBatchPool_startTask_complete(t *testing.T) {
298298
check.That(data.ResourceName).Key("start_task.0.container.0.working_directory").HasValue("ContainerImageDefault"),
299299
check.That(data.ResourceName).Key("start_task.0.container.0.host_directory_mount.0.source").HasValue("Startup"),
300300
check.That(data.ResourceName).Key("start_task.0.container.0.host_directory_mount.0.read_only_enabled").HasValue("false"),
301+
check.That(data.ResourceName).Key("start_task.0.container.0.host_directory_mount.1.source").HasValue("Applications"),
302+
check.That(data.ResourceName).Key("start_task.0.container.0.host_directory_mount.1.read_only_enabled").HasValue("true"),
301303
),
302304
},
303305
data.ImportStep("stop_pending_resize_operation",
@@ -1259,7 +1261,10 @@ resource "azurerm_batch_pool" "test" {
12591261
working_directory = "ContainerImageDefault"
12601262
host_directory_mount {
12611263
source = "Startup"
1262-
read_only_enabled = false
1264+
}
1265+
host_directory_mount {
1266+
source = "Applications"
1267+
read_only_enabled = true
12631268
}
12641269
}
12651270

website/docs/r/batch_pool.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ A `container_registries` block supports the following:
359359

360360
A `host_directory_mount` block supports the following:
361361

362-
* `source` - (Optional) The paths which will be mounted to container task's container. Possible values include `Applications`, `JobPrep`, `Shared`, `Startup`, `Task`, and `VfsMounts`.
362+
* `source` - (Required) The paths which will be mounted to container task's container. Possible values include `Applications`, `JobPrep`, `Shared`, `Startup`, `Task`, and `VfsMounts`.
363363

364364
* `read_only_enabled` - (Optional) Mount this source path as read-only mode or not. Default to `false` (read/write mode).
365365

0 commit comments

Comments
 (0)