This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"properties": { | |
"displayName": "NIST SP 800-53 R4", | |
"policyType": "BuiltIn", | |
"description": "This initiative includes audit and virtual machine extension deployment policies that address a subset of NIST SP 800-53 R4 controls. Additional policies will be added in upcoming releases. For more information, visit https://aka.ms/nist80053-blueprint.", | |
"metadata": { | |
"version": "2.0.1", | |
"category": "Regulatory Compliance" | |
}, | |
"policyDefinitions": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCOPE=/subscriptions/$SUBSCRIPTION_ID | |
az policy assignment create --name "Require https for storage in subscription" --scope $SCOPE \ | |
--policy "denyStorageAccountNotUsingHttps" \ | |
--params '{ "effectType" : { "value": "Deny" } }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir myclonedrepo && cd myclonedrepo | |
git clone $REPOSITORY_URL | |
cd $PROJECT_NAME | |
git status | |
# create a new file and add | |
echo "print('new')" > newpythonfile.py | |
cat newpythonfile.py # displays the new python file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connect-AzAccount | |
# You may have more than one subscription. | |
$SUBSCRIPTION_ID= Read-Host -p "Enter your subscription id" | |
Select-AzSubscription -Subscription $SUBSCRIPTION_ID | |
# Set environment variables | |
$LOCATION = Read-Host -p "Enter your region, such as WestUS " | |
$RESOURCE_GROUP_NAME = Read-Host -p "Enter your resource group name " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az provider list --query "[].{Provider:namespace, Status:registrationState}" --out table | |
# register the Microsoft.Batch provider | |
az provider register --namespace Microsoft.Batch | |
# show the provider registration state | |
az provider show --namespace Microsoft.Batch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: azure-vote-back | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: azure-vote-back | |
template: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
spec: | |
selector: | |
matchLabels: | |
app: nginx | |
replicas: 2 # tells deployment to run 2 pods matching the template | |
template: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl create job job1 -o yaml --dry-run=client --image=busybox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: redis | |
spec: | |
containers: | |
- name: redis | |
image: redis | |
volumeMounts: | |
- name: redis-storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: minimal-ingress | |
annotations: | |
nginx.ingress.kubernetes.io/rewrite-target: / | |
spec: | |
rules: | |
- http: | |
paths: |