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

Using variables instead of string #43

Closed
TechWatching opened this issue Jan 23, 2019 · 3 comments
Closed

Using variables instead of string #43

TechWatching opened this issue Jan 23, 2019 · 3 comments
Assignees
Labels

Comments

@TechWatching
Copy link

Is it possible to use variables in an azure cli scrapbook when using it on Windows ?
I want to be able things like that :

az group show --resource-group $resourceGroup

@chrmarti
Copy link
Contributor

Since you execute the script line-by-line in the terminal, you can add export resourceGroup=your-group to the script or type that in the terminal before you run parts of your script. There is currently no other way to bring in variables than what your terminal shell supports.

Does that help?

@chrmarti chrmarti added the info-needed Issue requires more information from poster label Jan 29, 2019
@TechWatching
Copy link
Author

Ok thanks for your answer.

@chrmarti chrmarti added question and removed info-needed Issue requires more information from poster labels Jan 30, 2019
@Mahesh-MSFT
Copy link

i think adding support for variables will help drive adoption. It is not practical to set so many variables (example below) each time on the terminal before switching back to scrapbook.

PREFIX="aks-egress"
RG="${PREFIX}-rg"
LOC="eastus"
PLUGIN=azure
AKSNAME="${PREFIX}"
VNET_NAME="${PREFIX}-vnet"
AKSSUBNET_NAME="aks-subnet"
# DO NOT CHANGE FWSUBNET_NAME - This is currently a requirement for Azure Firewall.
FWSUBNET_NAME="AzureFirewallSubnet"
FWNAME="${PREFIX}-fw"
FWPUBLICIP_NAME="${PREFIX}-fwpublicip"
FWIPCONFIG_NAME="${PREFIX}-fwconfig"
FWROUTE_TABLE_NAME="${PREFIX}-fwrt"
FWROUTE_NAME="${PREFIX}-fwrn"
FWROUTE_NAME_INTERNET="${PREFIX}-fwinternet"

Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants