Skip to content

These branches can be #1

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

Open
wants to merge 777 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
777 commits
Select commit Hold shift + click to select a range
c51c1b1
clean-up unused files
carlrab Mar 14, 2022
7a2abac
Merge pull request #410 from carlrab/azurecli_managed_applications
carlrab Mar 14, 2022
347deae
unused
carlrab Mar 14, 2022
655537b
Merge pull request #411 from carlrab/vmquick
carlrab Mar 14, 2022
fee0239
Update calculate-container-size.sh
carlrab Mar 18, 2022
dbe033e
Update calculate-container-size.sh
carlrab Mar 18, 2022
95616cb
Merge branch 'master' into master
carlrab Mar 18, 2022
21d67de
Merge pull request #414 from carlrab/master
carlrab Mar 18, 2022
24bf0d4
Update calculate-container-size.sh
carlrab Mar 18, 2022
f727fed
Merge pull request #415 from carlrab/master
carlrab Mar 18, 2022
bd353a1
deleted as service was retired
carlrab Mar 22, 2022
c8c1dc1
Merge pull request #416 from carlrab/azurecli_batch-ai
carlrab Mar 22, 2022
e3e8d18
deleted as out of date - newer in docs
carlrab Mar 22, 2022
1ba10f9
checkpoint
carlrab Mar 23, 2022
245ca2d
Merge pull request #418 from carlrab/azurecli-disk-encyption
carlrab Mar 23, 2022
3d70f90
remove unused files
carlrab Mar 23, 2022
c88a24a
Merge pull request #419 from carlrab/azurecli_redis
carlrab Mar 23, 2022
c382541
update and standardize
carlrab Mar 24, 2022
dfba492
Merge pull request #420 from carlrab/azurecli_azure-functions
carlrab Mar 24, 2022
7503d8d
Add missing skuStorage declaration and add tag to group create.
markpatterson27 Mar 27, 2022
66edd72
fix --tags flag spelling
markpatterson27 Mar 27, 2022
ecea059
use 'tag' var name when single tag
markpatterson27 Mar 27, 2022
2b9507a
fix missing hyphens (-) in tags
markpatterson27 Mar 27, 2022
63baa87
add --tags option to az group create
markpatterson27 Mar 27, 2022
0db0c77
revert tag change
markpatterson27 Mar 27, 2022
1394de8
missing tag
carlrab Mar 28, 2022
7a771d2
Merge pull request #423 from carlrab/azurecli_azure-functions
carlrab Mar 28, 2022
a905e8b
Merge pull request #421 from markpatterson27/patch-2
carlrab Mar 28, 2022
145c0e2
merged 2 > 1, tested
carlrab Mar 29, 2022
8296d31
Merge pull request #424 from carlrab/azurecli_eventgrid
carlrab Mar 29, 2022
343dda4
Merge branch 'master' into fix-tags-1
carlrab Mar 29, 2022
7ea3f92
Merge pull request #422 from markpatterson27/fix-tags-1
carlrab Mar 29, 2022
adc3dcb
fix tag
carlrab Mar 29, 2022
50c6aee
Merge branch 'master' of https://github.com/Azure-Samples/azure-cli-s…
carlrab Mar 29, 2022
1dcaeb0
Update event-grid.sh
carlrab Mar 29, 2022
25e131f
Merge pull request #426 from carlrab/azurecli_eventgrid
carlrab Mar 29, 2022
774b879
fix resource group
carlrab Mar 30, 2022
c3b2efe
Merge pull request #427 from carlrab/azurecli_eventgrid
carlrab Mar 30, 2022
b55180a
upate and standardize scripts
carlrab Mar 30, 2022
b77fbcc
Merge pull request #428 from carlrab/azurecli-signalr
carlrab Mar 30, 2022
c7b01c5
delete unused and merged scripts
carlrab Mar 30, 2022
40e8335
Merge pull request #429 from carlrab/azurecli_eventgrid
carlrab Mar 30, 2022
def556e
fix typo
carlrab Mar 31, 2022
c5b337b
Merge pull request #430 from carlrab/azurecli-signalr
carlrab Mar 31, 2022
9f69111
add space
carlrab Mar 31, 2022
061cf79
Merge pull request #431 from carlrab/azurecli-signalr
carlrab Mar 31, 2022
dec7765
work in progress
carlrab Apr 1, 2022
1474a20
update refresh standardize html block
carlrab Apr 6, 2022
fac0bf3
Merge pull request #432 from carlrab/azurecli-container-registry
carlrab Apr 6, 2022
fb7540d
modify html block
carlrab Apr 6, 2022
3373ebf
Merge pull request #433 from carlrab/azurecli-container-registry
carlrab Apr 6, 2022
84f57db
update scripts
carlrab Apr 6, 2022
fdbefff
Merge pull request #434 from carlrab/azurecli-container-registry
carlrab Apr 6, 2022
84cd0b0
saved
carlrab Apr 12, 2022
0cdf49f
work in progress
carlrab Apr 13, 2022
07a6bf2
deleted render-scene per email thread
carlrab Apr 13, 2022
c3326f8
#412 - fix custom domain name sample, script 1/2 (WIP)
DanielLarsenNZ Apr 13, 2022
55609b3
#412 Fix apex domain script - fully automated now that AFD supports A…
DanielLarsenNZ Apr 15, 2022
3a5042d
delete unused files
carlrab Apr 15, 2022
766139c
Merge pull request #437 from carlrab/azurecli-container-registry
carlrab Apr 15, 2022
22b72b6
Delete devops directory
carlrab Apr 15, 2022
9433de1
Merge pull request #438 from Azure-Samples/carlrab-patch-1
carlrab Apr 15, 2022
9fc3df1
#412 onboard custom domain using zone
DanielLarsenNZ Apr 16, 2022
9c8cd92
#412 Merge scripts into one file that uses Azure DNS Zone
DanielLarsenNZ Apr 16, 2022
71bcbd7
first 2 files
carlrab Apr 18, 2022
f66c59e
Merge pull request #441 from carlrab/azurecli-app-service-new
carlrab Apr 18, 2022
acf3857
docker web app only
carlrab Apr 18, 2022
1683b22
Merge pull request #442 from carlrab/azurecli-app-service-new
carlrab Apr 18, 2022
75fc953
more script updates
carlrab Apr 21, 2022
d47f64e
more updated scripts
carlrab Apr 21, 2022
61c9615
Merge pull request #443 from carlrab/azurecli-app-service-new
carlrab Apr 21, 2022
069ec24
two more scripts updated
carlrab Apr 21, 2022
f0d2e73
Merge pull request #444 from carlrab/azurecli-app-service-new
carlrab Apr 21, 2022
f8af0e1
one more script
carlrab Apr 21, 2022
4fa89ea
Merge pull request #445 from carlrab/azurecli-app-service-new
carlrab Apr 21, 2022
c699d73
vsts continuous updated script
carlrab Apr 25, 2022
4e687ba
Merge pull request #449 from carlrab/azurecli-app-service-new
carlrab Apr 25, 2022
8aec482
more upated scripts
carlrab Apr 25, 2022
68f4446
Merge pull request #450 from carlrab/azurecli-app-service-new
carlrab Apr 25, 2022
67509a6
review and update
carlrab Apr 25, 2022
088524d
Merge pull request #451 from carlrab/azurecli-app-service-new
carlrab Apr 25, 2022
cd1dc5f
fixed 3 scripts
carlrab Apr 25, 2022
3cdeaa7
Merge pull request #452 from carlrab/azurecli-app-service-new
carlrab Apr 25, 2022
0e0009c
one more fix
carlrab Apr 25, 2022
e554b3b
Merge pull request #453 from carlrab/azurecli-app-service-new
carlrab Apr 25, 2022
11f70da
retested all scripts
carlrab Apr 25, 2022
4a6c0a2
Merge pull request #454 from carlrab/azurecli-app-service-new
carlrab Apr 25, 2022
ea84e89
fixed docker script
carlrab Apr 25, 2022
9e53942
Merge pull request #455 from carlrab/azurecli-app-service-new
carlrab Apr 25, 2022
b78f55e
cleanup and one more script
carlrab Apr 25, 2022
0af8b57
Merge pull request #456 from carlrab/azurecli-app-service-new
carlrab Apr 25, 2022
b11a352
re-order steps
carlrab Apr 25, 2022
d600137
Merge pull request #457 from carlrab/azurecli-app-service-new
carlrab Apr 25, 2022
6db992e
fix typo
carlrab Apr 25, 2022
e493192
Merge pull request #458 from carlrab/azurecli-functions-error-investi…
carlrab Apr 25, 2022
12cab55
work in progress
carlrab Apr 27, 2022
cedb849
Merge branch 'master' of https://github.com/Azure-Samples/azure-cli-s…
carlrab Apr 27, 2022
d828657
delete unused
carlrab Apr 27, 2022
bcd758e
Merge pull request #460 from carlrab/azurecli-app-service-delete-unused
carlrab Apr 27, 2022
ed1f3b1
Merge pull request #439 from DanielLarsenNZ/dalars/afd-sample-refresh
carlrab Apr 27, 2022
6f54215
new file for code blocks
carlrab Apr 30, 2022
86a28b3
Merge pull request #461 from carlrab/azurecli-code-blocks
carlrab Apr 30, 2022
f279453
fixed missing bracket
carlrab Apr 30, 2022
21ad49b
Merge pull request #462 from carlrab/azurecli-code-blocks
carlrab Apr 30, 2022
3a9ddf6
another script
carlrab Apr 30, 2022
28dff11
Merge pull request #463 from carlrab/azurecli-code-blocks
carlrab Apr 30, 2022
cf3e6fd
fix typos in html
carlrab May 1, 2022
4abbeaa
Merge pull request #464 from carlrab/azurecli-code-blocks
carlrab May 1, 2022
aaf0eca
add delete block
carlrab May 3, 2022
cfce768
Merge pull request #465 from carlrab/azurecli-code-blocks
carlrab May 3, 2022
1885ca2
new file from code blocks
carlrab May 3, 2022
2d6e583
Merge pull request #466 from carlrab/azurecli-monitor-logs
carlrab May 3, 2022
9385a44
Delete azure-monitor directory
carlrab May 3, 2022
afc3910
Fix typo msdcos -> msdocs (#435)
mabeshark May 19, 2022
8743958
Fix allowed values for the storage SKU (#446)
alexandair May 19, 2022
0144f8d
Add a missing storage variable (#447)
alexandair May 19, 2022
6acf752
Fix a typo (#448)
alexandair May 19, 2022
1cd73ec
Create test-deploy.yml
DanielLarsenNZ May 23, 2022
5c86487
Fix GH action
DanielLarsenNZ May 23, 2022
58d62d7
Fix GH action
DanielLarsenNZ May 23, 2022
3d1227d
Testing GH action
DanielLarsenNZ May 23, 2022
47f73ec
Test deploy GH Action
DanielLarsenNZ May 23, 2022
50f0499
gh action cd to file path
DanielLarsenNZ May 23, 2022
b840882
test the action
DanielLarsenNZ May 23, 2022
d9ee991
test the action
DanielLarsenNZ May 23, 2022
9821124
suppress resource group delete error
DanielLarsenNZ May 24, 2022
fc1de87
delete RG if exists
DanielLarsenNZ May 24, 2022
4d550df
Fix action
DanielLarsenNZ May 24, 2022
b5b468e
Fix GH test deploy action
DanielLarsenNZ May 24, 2022
bab194b
Fix resource group env var
DanielLarsenNZ May 24, 2022
5bb6e25
Fix resource group env var
DanielLarsenNZ May 24, 2022
4114456
Tidy up GH action
DanielLarsenNZ May 24, 2022
9fc0fa8
updated scripts
carlrab May 24, 2022
dc5c673
pass fail info and date tested
carlrab May 24, 2022
d3121b5
Update pull_request_template.md (#469)
carlrab May 25, 2022
a9efbcc
Merge pull request #1 from carlrab/azure-actions
carlrab May 26, 2022
2e97bff
Update test-deploy.yml
carlrab May 26, 2022
c0fd484
Update test-deploy.yml
carlrab May 26, 2022
ead2c45
Update add-application.sh
carlrab May 26, 2022
52fa44f
Update test-deploy.yml
carlrab May 27, 2022
88f4bb6
Merge branch 'master' into azurecli-batch
carlrab May 27, 2022
fa82bc4
fixed scripts
carlrab May 27, 2022
e91b879
Merge branch 'azurecli-batch' of https://github.com/carlrab/azure-cli…
carlrab May 27, 2022
d9fe5e6
Update test-deploy.yml
carlrab May 27, 2022
b2447ca
RG > env variable
carlrab May 27, 2022
5afd2b1
remove space
carlrab May 27, 2022
7c60ca2
remove subscriptionId
carlrab May 27, 2022
b8c83a4
Merge pull request #436 from carlrab/azurecli-batch
carlrab May 27, 2022
a8fc0ae
updated script description
carlrab May 27, 2022
171d337
Merge pull request #470 from carlrab/azurecli-batch
carlrab May 27, 2022
9659650
Update test-deploy.yml
carlrab May 27, 2022
57f7469
Merge branch 'master' of https://github.com/carlrab/azure-cli-samples…
carlrab May 29, 2022
a9f3f69
Update test-deploy.yml
carlrab May 29, 2022
cba82c4
Update create-account-user-subscription.sh
carlrab May 29, 2022
2cc900e
test
carlrab May 31, 2022
b32d9bf
Update add-application.sh
carlrab May 31, 2022
4568725
Merge branch 'master' of https://github.com/Azure-Samples/azure-cli-s…
carlrab May 31, 2022
2833c01
deleted as deprecated
carlrab May 31, 2022
2fc3cf8
Merge pull request #472 from carlrab/aks
carlrab May 31, 2022
ac58fba
Autoscale update (#473)
markjbrown Jun 22, 2022
9d8b8d5
add free-tier script (#474)
markjbrown Jul 8, 2022
922ee97
Free tier (#475)
markjbrown Jul 12, 2022
d915bb5
fix missing priority (#476)
madsd Sep 6, 2022
b01d9fb
fxl---Fixed typos in script (#478)
flang-msft Mar 1, 2023
d69492f
id instead of objectId (#479)
in4margaret Apr 6, 2023
a31cd57
Removing typo (#483)
roygara May 2, 2023
5b02286
Updating script to accommodate Premium SSD v2 and Ultra Disks. (#485)
roygara Jun 1, 2023
e883aa1
Update connect-to-storage.sh (#484)
flcdrg Jun 14, 2023
a39537a
Update service-endpoints.sh
dbradish-microsoft Jun 14, 2023
78cf735
Update service-endpoints-ignore-missing-vnet.sh
dbradish-microsoft Jun 14, 2023
84d5567
Update regions.sh
dbradish-microsoft Jun 14, 2023
5b4fda2
Update keys.sh
dbradish-microsoft Jun 14, 2023
0f11b76
Typo "MySQL Flexible server"→"MySQL Flexible Server" (#487)
hyoshioka0128 Oct 5, 2023
57d3b3c
Update README.md (#489)
dbradish-microsoft Oct 10, 2023
f9143bf
Create Azure Container Registry README.md (#488)
dbradish-microsoft Oct 10, 2023
8ac2530
Update app-service primary README.md (#491)
dbradish-microsoft Oct 25, 2023
341beec
Update scale-manual.sh (#507)
msangapu-msft Nov 16, 2023
fcd7450
Update scale-geographic.sh (#508)
msangapu-msft Nov 16, 2023
4e2606f
Update integrate-with-app-gateway.sh (#506)
msangapu-msft Nov 16, 2023
3780193
Update monitor-with-logs.sh (#505)
msangapu-msft Nov 16, 2023
9a3aae4
Update deploy-linux-docker-webapp-only.sh (#504)
msangapu-msft Nov 16, 2023
9540643
Update deploy-deployment-slot.sh (#503)
msangapu-msft Nov 16, 2023
75b8aee
Update deploy-github.sh (#502)
msangapu-msft Nov 16, 2023
3682727
Update connect-to-documentdb.sh (#501)
msangapu-msft Nov 16, 2023
cc0c083
Update connect-to-redis.sh (#500)
msangapu-msft Nov 16, 2023
cc86361
Update connect-to-storage.sh (#499)
msangapu-msft Nov 16, 2023
4df0cda
Update connect-to-sql.sh (#498)
msangapu-msft Nov 16, 2023
dccb444
Update configure-ssl-certificate-webapp-only.sh (#497)
msangapu-msft Nov 16, 2023
94e5307
Update configure-custom-domain-webapp-only.sh (#496)
msangapu-msft Nov 16, 2023
c94c980
Update backup-restore.sh (#495)
msangapu-msft Nov 16, 2023
9be67de
Update deploy-ftp.sh (#493)
msangapu-msft Nov 16, 2023
f7e41b7
updated Ubuntu marketplace image name (#509)
dbradish-microsoft Nov 16, 2023
ed0d1de
Update deploy-github.sh (#494)
msangapu-msft Jan 30, 2024
97adf13
Update create-managed-instance.sh (#511)
MashaMSFT Feb 16, 2024
e04b4d5
Adding optional parameters for OS disks (#514)
roygara Mar 26, 2024
b6e9fca
Update create-manage-cache.sh (#516)
dbradish-microsoft Apr 15, 2024
1fd819a
Create create-azure-resources-at-scale-metadata.csv (#518)
dbradish-microsoft Apr 25, 2024
da21ae6
Create create-azure-resources-at-scale.sh (#517)
dbradish-microsoft Apr 25, 2024
acb9b2f
Create create-azure-resources-at-scale.ps1 (#519)
dbradish-microsoft Apr 25, 2024
60c5c14
Create delete-azure-resources-at-scale.sh (#520)
dbradish-microsoft Apr 25, 2024
974a393
Create delete-azure-resources-at-scale.ps1 (#521)
dbradish-microsoft Apr 25, 2024
9b7beda
Update create-azure-resources-at-scale.sh
dbradish-microsoft Apr 26, 2024
f9a69b5
Update create-azure-resources-at-scale.ps1
dbradish-microsoft Apr 26, 2024
6d6bf0e
Update create-azure-resources-at-scale-metadata.csv
dbradish-microsoft Apr 29, 2024
a78f609
Update create-azure-resources-at-scale.sh
dbradish-microsoft Apr 29, 2024
ce880ed
Update create-azure-resources-at-scale.sh
dbradish-microsoft Apr 29, 2024
bc38124
Update create-azure-resources-at-scale.sh
dbradish-microsoft Apr 29, 2024
77278a5
Update create-azure-resources-at-scale.sh
dbradish-microsoft Apr 29, 2024
f42229a
Update create-azure-resources-at-scale.sh
dbradish-microsoft Apr 29, 2024
f04c52a
Update create-azure-resources-at-scale.sh
dbradish-microsoft Apr 29, 2024
1fef9a6
Update create-azure-resources-at-scale.sh
dbradish-microsoft Apr 29, 2024
55df158
Update create-azure-resources-at-scale.ps1
dbradish-microsoft Apr 30, 2024
8211fc5
Update create-azure-resources-at-scale.ps1
dbradish-microsoft Apr 30, 2024
f7b7dc4
Update create-azure-resources-at-scale-metadata.csv
dbradish-microsoft Apr 30, 2024
f70fc5d
Update create-azure-resources-at-scale.sh
dbradish-microsoft May 1, 2024
0764f6b
Update create-azure-resources-at-scale-metadata.csv
dbradish-microsoft May 1, 2024
76496df
Update create-azure-resources-at-scale-metadata.csv
dbradish-microsoft May 1, 2024
c930dfe
Update create-azure-resources-at-scale-metadata.csv
dbradish-microsoft May 2, 2024
d136c4a
Update create-azure-resources-at-scale.sh
dbradish-microsoft May 2, 2024
1670e8f
Update create-azure-resources-at-scale.sh
dbradish-microsoft May 2, 2024
9d257a0
removing /en-us/ from links (#524)
dbradish-microsoft May 7, 2024
c5c3108
Update create-azure-resources-at-scale-metadata.csv
dbradish-microsoft May 14, 2024
c0c815b
Update create-azure-resources-at-scale.sh
dbradish-microsoft May 15, 2024
8ef83b4
Update and rename create-azure-resources-at-scale.ps1 to create-azure…
dbradish-microsoft May 15, 2024
6e81c4f
PS script for creating resources at scale (#525)
dbradish-microsoft May 15, 2024
c2c3583
create resources at scale | testing improvements and more log reporti…
dbradish-microsoft May 17, 2024
a87d772
Update create-azure-resources-at-scale.ps1
dbradish-microsoft May 17, 2024
ca2f636
Update create-azure-resources-at-scale.sh
dbradish-microsoft May 17, 2024
c8a43e3
Update create-azure-resources-at-scale.sh
dbradish-microsoft May 17, 2024
b8bd0e5
Update create-azure-resources-at-scale.ps1
dbradish-microsoft May 17, 2024
7d4d949
Update create-azure-resources-at-scale.ps1
dbradish-microsoft May 17, 2024
90aea2b
Update create-azure-resources-at-scale.sh
dbradish-microsoft May 17, 2024
7db61c8
Update create-azure-resources-at-scale.sh
dbradish-microsoft May 25, 2024
78fbe03
Update create-azure-resources-at-scale.sh
dbradish-microsoft May 25, 2024
fff2c29
Update and rename create-azure-resources-at-scale.sh to tbd.sh
dbradish-microsoft May 25, 2024
64f4333
Update create-azure-resources-at-scale.ps1
dbradish-microsoft May 25, 2024
b18795d
Update create-azure-resources-at-scale.sh
dbradish-microsoft May 25, 2024
0ecda33
Delete azure-cli/create-azure-resources-at-scale/powershell/tbd.sh
dbradish-microsoft May 28, 2024
9a565ac
Update create-azure-resources-at-scale.sh
dbradish-microsoft May 29, 2024
956ac1d
Update create-azure-resources-at-scale.ps1
dbradish-microsoft May 29, 2024
92c8682
Add convert to autoscale script (#528)
markjbrown Jul 26, 2024
fdf209f
add end full script tag (#529)
markjbrown Jul 29, 2024
f555dac
Create container-instances-nat-gateway-custom.md (#531)
tailerchimchar Oct 30, 2024
5c68328
Cosmos DB bulk IP Firewall Rule samples (#532)
markjbrown Nov 12, 2024
50a19de
Create nat-gateway-arm-template.json (#533)
tailerchimchar Nov 22, 2024
ac2bcda
Bulk RBAC policy script (#534)
markjbrown Jan 1, 2025
dae7b24
database-auditing-and-threat-detection.sh | removed deprecated comman…
dbradish-microsoft Jan 2, 2025
c7f3ffb
Add RBAC bulk apply sample (#536)
markjbrown Feb 7, 2025
27544a9
create user assigned identity for users (#537)
markjbrown Feb 10, 2025
b74bfce
update bulk rbac apply (#539)
markjbrown Mar 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text

# Denote all files that are truly binary and should not be modified.
*.gif binary
*.ico binary
*.jpg binary
*.png binary

# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
49 changes: 49 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--
Thanks for contributing to the Azure CLI samples repo! For contributors, make sure that you
fill in the PR checklist in this template, and:

* Internal contributors: Follow the style guides and PR submission process docs:
- CLI style guide: https://review.docs.microsoft.com/help/contribute/conventions-azure-cli?branch=master
- Best practices: https://review.docs.microsoft.com/help/contribute/conventions-azure-scripts?branch=master
- PR submission process: https://review.docs.microsoft.com/help/contribute/contribute-scripts-pr-process?branch=master

* External contributors: Make sure that you test _all_ of your scripts that you modified. You can't read the contribution
guides yet, but reviewer feedback will be detailed and clear about any required changes.
-->

## Description

<!-- Include a brief description of your changes. -->

## Checklist

<!--
Filling in this checklist is mandatory! If you don't, your pull request
will be rejected without further review. Checklists must be completed
within 7 days of PR submission.

To check a box in markdown, make sure that it is formatted as [X] (no whitespace).
Not formatting checkboxes correctly may break automated tools and delay PR processing.
-->

- [ ] Scripts in this pull request are written for the `bash` shell.
- [ ] This pull request was tested on __at least one of__ the following platforms:
- [ ] Linux
- [ ] Azure Cloud Shell
- [ ] macOS
- [ ] Windows Subsystem for Linux
- [ ] The most recent test date and test method are recorded in the script file.
- [ ] Scripts do not contain passwords or other secret tokens that are not randomized.
- [ ] No deprecated commands or arguments are used. ([Release notes](https://docs.microsoft.com/cli/azure/release-notes-azure-cli))
- [ ] All Azure resource identifiers which must be universally unique are guaranteed to be so.
- [ ] Resource names use a random function to ensure scripts can be run multiple times in quick succession without error.
- [ ] All scripts can be run in their entirely without user input.

### Testing information

CLI version:
```
az --version
```

Extensions required:
61 changes: 61 additions & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Test & Deploy

on:
pull_request:
branches: [ master ]
paths:
- '**.sh'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
environment: 'AzureCloud'

- name: Run any shell scripts in this commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
az config set extension.use_dynamic_install=yes_without_prompt

echo "===================================="
echo "Files in PR ${{ github.head_ref }}:"
gh pr view ${{ github.head_ref }} --json files -q '.files[].path'

# For each file in this commit
for file in $( gh pr view ${{ github.head_ref }} --json files -q '.files[].path' )
do
# If file exists and is shell script
if [ -e "$file" ]
then
if [[ "$file" == *.sh ]]
then
# Generate a resource group name so that it can be deleted when finished
let "randomIdentifier=$RANDOM*$RANDOM"
resourceGroup="test-deploy-rg-$randomIdentifier"

echo "===================================="
echo "Running $file ..."
pushd $(dirname "${file}")
chmod +X $(basename "${file}")
RESOURCE_GROUP=$resourceGroup /bin/bash $(basename "${file}")
popd
echo "===================================="

# Clean up the resource group
if [ $(az group exists --name $resourceGroup) = true ]; then
echo "Deleting resource group $resourceGroup..."
az group delete -n $resourceGroup -y --no-wait
fi
fi
fi
done
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# Contributing
---
page_type: sample
description: "A collection of Azure CLI code samples used in Microsoft's official Azure CLI Documentation."
languages:
- azurecli
products:
- azure
---

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
# Sample code used in Microsoft's official Azure CLI documentation

All code in this repository is non-production samples used in Microsoft's official Azure CLI
documentation on [docs.microsoft.com](https://docs.microsoft.com/), and is designed to be used
by our customers for learning and experimentation purposes.

## Contributing

We welcome public contributions into this repository via pull requests. Please note that before we
can accept your pull request you must sign our
[Contribution License Agreement](https://cla.microsoft.com/). This is a one-time requirement.

## License

The MIT License applies to the code contained in this repo. For more information, see
[LICENSE](LICENSE).

## Microsoft Open Source Code of Conduct

This repository has adopted the
[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more
information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or
comments.
66 changes: 66 additions & 0 deletions app-service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
page_type: sample
languages:
- azurecli
products:
- azure
- azure-cli
- azure-app-service
name: Azure App Service sample scripts
url-fragment:
description: These scripts demonstrate how to work with Azure App Service using the Azure CLI
---
# Azure App Service

## Azure CLI sample scripts

The scripts in this directory demonstrate working with [Azure App Service][aas-home] using the [Azure CLI reference commands][azure-cli].

| Script | Description |
| ------ | ----------- |
|**Backup and restore app**||
|[backup-restore.sh][aas-1]| Creates an App Service app and creates a one-time backup for it, creates a backup schedule for it, and then restores an App Service app from a backup. |
|**Configure app**||
|[configure-custom-domain-webapp-only.sh][aas-2]| Creates an App Service app and maps a custom domain name to it.|
|[configure-ssl-certificate-webapp-only.sh][aas-3]| Creates an App Service app and binds the TLS/SSL certificate of a custom domain name to it.|
|[configure-ssl-certificate.sh][aas-4]| | Creates an App Service app
|**Connect app to resources**||
|[connect-to-documentdb.sh][aas-5]| Creates an App Service app and an Azure Cosmos DB, then adds the Azure Cosmos DB connection details to the app settings. |
|[connect-to-redis.sh][aas-6]| Creates an App Service app and an Azure Cache for Redis, then adds the redis connection details to the app settings.|
|[connect-to-sql.sh][aas-7]| Creates an App Service app and a database in Azure SQL Database, then adds the database connection string to the app settings. |
|[connect-to-storage.sh][aas-8]| Creates an App Service app and a storage account, then adds the storage connection string to the app settings. |
|**Create app**||
|[deploy-deployment-slot.sh][aas-9]| Creates an App Service app with a deployment slot for staging code changes.|
|[deploy-ftp.sh][aas-10]| Creates an App Service app and deploys a file to it using FTP.|
|[deploy-github.sh][aas-11]| Creates an App Service app and deploys code from a public GitHub repository. |
|[deploy-linux-docker-webapp-only.sh][aas-12]| Creates an App Service app on Linux and loads a Docker image from Docker Hub.|
|[deploy-vsts-continuous-webapp-only.sh][aas-13]| Creates an App Service app with continuous publishing from a GitHub repository you own. |
|[integrate-with-app-gateway.sh][aas-14]| Creates an App Service app and configures code push into a local Git repository.|
|**Monitor app**||
|[monitor-with-logs.sh][aas-15]| Creates an App Service app, enables logging for it, and downloads the logs to your local machine.|
|**Scale app**||
|[scale-geographic.sh][aas-16]| Creates two App Service apps in two different geographical regions and makes them available through a single endpoint using Azure Traffic Manager.|
|[scale-manual.sh][aas-17]| Creates an App Service app and scales it across 2 instances.|

<!-- SCRIPTS -->
[aas-1]: ./backup-one-time-schedule-restore/backup-restore.sh
[aas-2]: ./configure-custom-domain/configure-custom-domain-webapp-only.sh
[aas-3]: ./configure-ssl-certificate/configure-ssl-certificate-webapp-only.sh
[aas-4]: ./configure-ssl-certificate/configure-ssl-certificate.sh
[aas-5]: ./connect-to-documentdb/connect-to-documentdb.sh
[aas-6]: ./connect-to-redis/connect-to-redis.sh
[aas-7]: ./connect-to-sql/connect-to-sql.sh
[aas-8]: ./connect-to-storage/connect-to-storage.sh
[aas-9]: ./deploy-deployment-slot/deploy-deployment-slot.sh
[aas-10]: ./deploy-ftp/deploy-ftp.sh
[aas-11]: ./deploy-github/deploy-github.sh
[aas-12]: ./deploy-linux-docker/deploy-linux-docker-webapp-only.sh
[aas-13]: ./deploy-vsts-continuous/deploy-vsts-continuous-webapp-only.sh
[aas-14]: ./integrate-with-app-gateway/integrate-with-app-gateway.sh
[aas-15]: ./monitor-with-logs/monitor-with-logs.sh
[aas-16]: ./scale-geographic/scale-geographic.sh
[aas-17]: ./scale-manual/scale-manual.sh

<!-- EXTERNAL -->
[aas-home]: https://azure.microsoft.com/services/container-registry/
[azure-cli]: https://learn.microsoft.com/cli/azure/reference-index
87 changes: 87 additions & 0 deletions app-service/backup-one-time-schedule-restore/backup-restore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/bin/bash
# Passed validation in Cloud Shell on 4/25/2022 - other than the restore step

# <FullScript>
# Backup and restore a web app from a backup
#
# This sample script creates a web app in App Service with its related resources.
# It then creates a one-time backup for it, and also a scheduled backup for it.
# Finally, it restores the web app from backup.
#
# set -e # exit if error
# Variable block
let "randomIdentifier=$RANDOM*$RANDOM"
location="East US"
resourceGroup="msdocs-app-service-rg-$randomIdentifier"
tag="backup-restore.sh"
appServicePlan="msdocs-app-service-plan-$randomIdentifier"
webapp="msdocs-web-app-$randomIdentifier"
storage="webappstorage$randomIdentifier"
container="appbackup$randomIdentifier"
backup="backup$randomIdentifier"
expirydate=$(date -I -d "$(date) + 1 month")

# Create a resource group.
echo "Creating $resourceGroup in "$location"..."
az group create --name $resourceGroup --location "$location" --tag $tag

# Create a Storage Account
echo "Creating $storage"
az storage account create --name $storage --resource-group $resourceGroup --location "$location" \
--sku Standard_LRS

# Create a storage container
echo "Creating $container on $storage..."
key=$(az storage account keys list --account-name $storage --resource-group $resourceGroup -o json --query [0].value | tr -d '"')

az storage container create --name $container --account-key $key --account-name $storage

# Generate a SAS token for the storage container, valid for one month.
# NOTE: You can use the same SAS token to make backups in App Service until --expiry
sastoken=$(az storage container generate-sas --account-name $storage --name $container --account-key $key \
--expiry $expirydate --permissions rwdl --output tsv)

# Construct the SAS URL for the container
sasurl=https://$storage.blob.core.windows.net/$container?$sastoken

# Create an App Service plan in Standard tier. Standard tier allows one backup per day.
echo "Creating $appServicePlan"
az appservice plan create --name $appServicePlan --resource-group $resourceGroup --location "$location" \
--sku S1

# Create a web app
echo "Creating $webapp"
az webapp create --name $webapp --plan $appServicePlan --resource-group $resourceGroup

# Create a one-time backup
echo "Creating $backup"
az webapp config backup create --resource-group $resourceGroup --webapp-name $webapp \
--backup-name $backup --container-url $sasurl

# List statuses of all backups that are complete or currently executing.
az webapp config backup list --resource-group $resourceGroup --webapp-name $webapp

# Schedule a backup every day and retain for 10 days
az webapp config backup update --resource-group $resourceGroup --webapp-name $webapp \
--container-url $sasurl --frequency 1d --retain-one true --retention 10

# Show the current scheduled backup configuration
az webapp config backup show --resource-group $resourceGroup --webapp-name $webapp

# List statuses of all backups that are complete or currently executing
az webapp config backup list --resource-group $resourceGroup --webapp-name $webapp

# (OPTIONAL) Change the backup schedule to every 2 days
az webapp config backup update --resource-group $resourceGroup --webapp-name $webapp \
--container-url $sasurl --frequency 2d --retain-one true --retention 10

# Restore the app by overwriting it with the backup data

az webapp config backup restore --resource-group $resourceGroup --webapp-name $webapp \
--backup-name $backup --container-url $sasurl --overwrite

# fails - https://github.com/Azure/azure-cli/issues/19492
# </FullScript>

# echo "Deleting all resources"
# az group delete --name $resourceGroup -y
42 changes: 0 additions & 42 deletions app-service/backup-onetime/backup-onetime.sh

This file was deleted.

14 changes: 0 additions & 14 deletions app-service/backup-restore/backup-restore.sh

This file was deleted.

Loading