Friday, July 30, 2021

Resolving "Error parsing Resource ID {resourceid} ID was missing the `serverfarms` element"

If you are familiar with Terraform, you might have experience with terraform state import, which allows to import state of  the already provisioned resources and generate an infra script. This blog explains about an error which occurred when trying do terraform state import and the fix for it.

When trying to import the state of Azure app service plan as shown in the following command,  it gives a  error.


Terraform command :

Terraform import azurerm_app_service_plan.serviceplan /subscriptions/mysubscription /resourceGroups/myresource group/providers/Microsoft.Web/serverFarms/myplanname

Wednesday, July 28, 2021

Add Deployment Target Tags on Demand via Azure DevOps Pipeline

While you are using Azure DevOps pipelines to perform  build and deployment, you can select Azure DevOps agent or Deployment group as a build and deployment agent. If we consider about the Deployment group, there can be one or multiple deployments targets. While you are working with deployment group with multiple targets, there can be situations where you need to do a specific changes only for the selected deployment target. You achieve that via adding a new tag to deployment target. This blog explains how to add new tag to deployment target via a script.

prerequisite:

  • Azure DevOps deployment group with a deployment target
  • Azure DevOps personal access token (PAT)

Let's get started.