Azure / Azure/azure-cli

It is not possible to pass azure storage account name and key as a cli parameter when using --file option.

Open
#17,376 3 comments 0 reactions 0 assignees View on GitHub
act-observability-squad Container Instances Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

[Enter feedback here]

It is not possible to pass azure storage account name and key as a cli parameter when using --file option.

Example:

```
az container create \
--resource-group $ACI_PERS_RESOURCE_GROUP \
--file container.yaml \
--azure-file-volume-account-key $STORAGE_KEY \
--azure-file-volume-account-name $ACI_PERS_STORAGE_ACCOUNT_NAME
```

container.yaml
```yaml
volumeMounts:
- mountPath: /config/
name: configvolume
- mountPath: /data
name: datavolume
...
volumes:
- name: configvolume
azureFile:
sharename: config
- name: datavolume
azureFile:
sharename: data

```

The storageAccountName and storageAccountKey for the azureFile object inside the yaml file should be optional. If omitted they should be overwritten by the "azure-file-volume-account-key" and "azure-file-volume-account-name" cli parameters.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 2e5d1da7-7c4f-c9e6-e4b9-a30407675acf
* Version Independent ID: ba32e12d-8283-f980-e1d0-1ca2a75a5152
* Content: [az container](https://docs.microsoft.com/en-us/cli/azure/container?view=azure-cli-latest)
* Content Source: [latest/docs-ref-autogen/container.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/latest/docs-ref-autogen/container.yml)
* Service: **container-service**
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.