Skip to content

Instantly share code, notes, and snippets.

View pedromvieira's full-sized avatar

Pedro Vieira pedromvieira

View GitHub Profile
@richardjortega
richardjortega / curl_rest_api.md
Last active March 2, 2021 14:14
cURL REST API for Azure Resource Manager (ARM)

Using cURL and Azure REST API to access Azure Resource Manager (non-interactive)

Note: This guide assumes Azure CLI 2.0 is installed and familiarity with Azure concepts.

Register Client App and Obtain Service Principal (via CLI)

The APP_ID_URI needs to match what is expected in client request calls.

$ az ad sp create-for-rbac --name [APP_ID_URI] --password [PASSWORD]
@jcderr
jcderr / nginx-conf.d-conf-file
Last active January 15, 2019 16:50
Kubernetes Nginx Gateway with Upstreams from ConfigMap
include /etc/nginx/conf.d/upstreams/*.conf;
server {
listen 8080;
resolver 10.99.254.254;
server_name ~^(?<svc>[a-zA-Z0-9]+)(?<env>[\-a-zA-Z0-9]*)\..*\.com$;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;