Skip to content

Instantly share code, notes, and snippets.

View sathishjayapal's full-sized avatar
🎯
Focusing

dotsky sathishjayapal

🎯
Focusing
View GitHub Profile
@sathishjayapal
sathishjayapal / multiple-providers-sample
Created October 6, 2022 02:02
sample for multiple providers template
terraform {
#Required Terraform version
required_version = "~>1.3.1"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">=3.0, <=3.24.0"
}
}
azure
account
list [options] #List the imported subscriptions
show [options] [subscriptionNameOrId] #Show details about a subscription
set [options] <subscriptionNameOrId> #Set the current subscription
clear [options] #Remove a subscription or environment, or clear all of the stored account and environment info
import [options] <file> #Import a publishsettings file or certificate for your account
download [options] #Launch a browser to download your publishsettings file
env... #Commands to manage your account environment

AZ- Service principal commands

Loging with service principal credentials. Remember the tenant parameter

az login --service-principal -u -p --tenant

List the role definitions - List all the role definitions

az role definition list --all

List the role assignments - Lists all the role assignments

az role assignment list --all

You can find the same information by running the following command in the Cloud Shell. They are listed in the Additional Outbound IP Addresses field.

az webapp show \