Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc]: New-AzContainerInstanceVolumeMountObject should be called before creating a ACI container group with New-AzContainerGroup to mount Azure File share #17123

Open
thiruma0203 opened this issue Feb 15, 2022 · 1 comment · Fixed by #18359
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Container Instances customer-reported Doc - Reference

Comments

@thiruma0203
Copy link

thiruma0203 commented Feb 15, 2022

Description

https://docs.microsoft.com/en-us/powershell/module/az.containerinstance/new-azcontainergroup?view=azps-7.1.0#example-6--create-a-container-group-that-mounts-azure-file-volume

Cmdlet reference for New-AzContainerGroup shows how to create a container group that mounts Azure Files with below sequence.

$volume = New-AzContainerGroupVolumeObject -Name "myvolume" -AzureFileShareName "myshare" -AzureFileStorageAccountName "username" -AzureFileStorageAccountKey (ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force)
$container = New-AzContainerInstanceObject -Name test-container -Image alpine
$containerGroup = New-AzContainerGroup -ResourceGroupName test-rg -Name test-cg -Location eastus -Container
$container -Volume $volume

However this sequence does not let a container mount Azure File volume.
New-AzContainerInstanceVolumeMountObject should be used in advance like below;

$volume = New-AzContainerGroupVolumeObject -Name "myvolume" -AzureFileShareName "myshare" -AzureFileStorageAccountName "username" -AzureFileStorageAccountKey (ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force)
$mount = New-AzContainerInstanceVolumeMountObject -MountPath "/aci/logs" -Name "myvolume"
$container = New-AzContainerInstanceObject -Name test-container -Image alpine -VolumeMount $mount
$containerGroup = New-AzContainerGroup -ResourceGroupName test-rg -Name test-cg -Location eastus -Container $container -Volume $volume
@thiruma0203 thiruma0203 added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Feb 15, 2022
@ghost ghost added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported labels Feb 15, 2022
@dingmeng-xue
Copy link
Member

@CaptainFanZzz , please verify it and update doc accordingly.

@BethanyZhou FYI.

@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Feb 16, 2022
@dingmeng-xue dingmeng-xue added bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 16, 2022
@BethanyZhou BethanyZhou linked a pull request Jun 1, 2022 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Container Instances customer-reported Doc - Reference
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants