Azure RM Resource group deployment failed with error: Creating the deployment xx would exceed the quota of ‘800’.

Recently while deploying the source code using our CI/CD pipelines, we have got this error:

There were errors in your deployment. Error code: DeploymentQuotaExceeded.

2018-05-30T04:52:38.0042831Z ##[error]Creating the deployment ‘azuredeploy-20180430-045236-1abd’ would exceed the quota of ‘800’. The current deployment count is ‘800’, please delete some deployments before creating a new one. Please see https://aka.ms/arm-deploy for usage details.

2018-05-30T04:52:38.0051084Z ##[error]Task failed while creating or updating the template deployment.

One of the steps used by our release pipelines uses ARM template to make sure that resource being targeted has required azure configuration.
Continue reading “Azure RM Resource group deployment failed with error: Creating the deployment xx would exceed the quota of ‘800’.”

Apply / Update application settings for Azure App Service using PowerShell

Windows Azure App Service (Now an umbrella term for Azure Web App, Azure Api App, etc.) has a handy capability whereby developers can store key-value string pairs in Azure as part of the configuration information associated with a website.  At runtime, Windows Azure Web Sites automatically retrieves these values for you and makes them available to code running in your website.  Since the key-value pairs are stored behind the scenes in the Windows Azure Web Sites configuration store, the key-value pairs don’t need to be stored in the file content of your web application.  From a security perspective that is a nice side benefit since sensitive information such as Sql connection strings with passwords never show up as cleartext in a config file. However, sometimes, this can be a little too much for the Azure Admins to configure each setting over there. In this blog post, we’ll learn how to apply application settings using PowerShell.  Continue reading “Apply / Update application settings for Azure App Service using PowerShell”

Create Azure Storage Shared Access Signature and manage files with PowerShell

In one of the previous posts, we discussed how to create and manage Azure Storage accounts using PowerShell. However, we were using storage account key when trying to upload / delete / download files from azure blob storage. In case, you need to delegate access to a third person, this seems like a too much of access since that person will have access to whole storage account. In this post, we will discuss how to use SAS aka Shared Access Signature to delegate access in controlled way.

Concept of Shared Access Signature

A shared access signature is a way to delegate access to resources in a storage account, without sharing the storage account keys. Continue reading “Create Azure Storage Shared Access Signature and manage files with PowerShell”

Provision Azure Storage Account and automate file upload and deletion using PowerShell

Microsoft Azure Storage is a cloud offering from Microsoft that provides highly scalable, available, durable storage. Its a part of Microsoft Azure offerings. Azure Storage consists of three data services: Blob storage, File storage, and Queue storage. Blob storage supports both standard and premium storage, with premium storage using only SSDs for the fastest performance possible.

Now as is often the case with the cloud services, it comes at a cost. So you should be very careful in using only the space you need and not paying for extra storage consumption that you should not need to. Along with that, you should be able to automate it. In this blog post, we’ll learn how to create an Azure Storage account, uploads some files to it in the blob storage and then delete them all using PowerShell.  Continue reading “Provision Azure Storage Account and automate file upload and deletion using PowerShell”

Identify outgoing Azure App Service IP address

Outgoing IP address for Azure App service are different than the incoming IP address. To clarify the difference, the incoming IP address (as the name would indicate) identify the IP address using which data could be sent to App Service. This is what you would see when you would typically do DNS resolution for the App Service. Outgoing IP address identify IP address which would be used when sending data from Azure App service to the outside world. You may need this info because you may need to protect your environment from threats or white-list certain requests.

To identify outgoing Azure App Service IP address, we can simply navigate to the https://portal.azure.com and then go to the app service in reference. Continue reading “Identify outgoing Azure App Service IP address”

Error: The term ‘Save-AzureRMProfile’ is not recognized as the name of a cmdlet, function, script file, or operable program

If you have recently installed Azure PowerShell module on one of the machines and then trying to login using Select-AzureRMProfile, you are likely to receive below error:

Save-AzureRMProfile : The term ‘Save-AzureRMProfile’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try againAt line:3 char:2+  Save-AzureRMProfile -Path “C:\$SubscriptionName.json”+  ~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : ObjectNotFound: (Save-AzureRMProfile:String) [], CommandNotFoundException    + FullyQualifiedErrorId : CommandNotFoundException

I checked the list of cmdlets and it was gone. Continue reading “Error: The term ‘Save-AzureRMProfile’ is not recognized as the name of a cmdlet, function, script file, or operable program”

Azure Resource Group Error: A parameter cannot be found that matches parameter name ‘EnvironmentName’

Recently, if you have been trying to deploy Azure Resource Group template using Visual Studio, you might see below error:

[ERROR] Add-AzureRmAccount : A parameter cannot be found that matches parameter name 
[ERROR] 'EnvironmentName'.
[ERROR] At line:1 char:2379
[ERROR] + ... xmg' -AccountId 'myemail@gmail.com' -EnvironmentName 'AzureC ...
[ERROR] +                                                  ~~~~~~~~~~~~~~~~
[ERROR]     + CategoryInfo          : InvalidArgument: (:) [Add-AzureRmAccount], Param 
[ERROR]    eterBindingException
[ERROR]     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Azure.Commands. 
[ERROR]    Profile.AddAzureRMAccountCommand
[ERROR]  
[ERROR] Run Login-AzureRmAccount to login.

Continue reading “Azure Resource Group Error: A parameter cannot be found that matches parameter name ‘EnvironmentName’”