I have created an Azure automation account and deploy a runbook using terraform. I want to publish a runbook through webhook. But in terraform, there is no such a module found for webhook.
Is there any way to create a webhook using terraform? I search on many URLs but I didn't find any useful option.
As far as I know, there is no built-in terraform block to create a webhook. As a workaround, you can create it via ARM template or create Webhook using Rest API. Read Programmatically Creating Azure Automation Runbook Webhooks Targeting Hybrid Worker Groups for more details.
You can also use azurerm_template_deployment to manage the deployment of the ARM Template with terraform. Read this blog for more reference.
Related
I'm looking into publishing bicep templates to a Bicep registry (ACR), and then deploying them via the ARM REST api. However the REST create deployment api only allows me to specify a templateSpec - I don't see any way to reference an ACR url. Is this possible, or do I need to use template specs for this?
For context, I need to create an automated service that can deploy resources when a particular event happens, e.g. add new customer -> spin up Azure resources xyz. Having my service use the REST api seems reasonable, and I'd prefer to use the bicep registry over template specs.
Currently Content in the Bicep module registry can only be deployed from another Bicep file. Template specs can be deployed directly from the API, Azure PowerShell, Azure CLI, and the Azure portal. You can even use UiFormDefinition to customize the portal deployment experience.
You can refer to this documentation for more information.
My requirement is to create a Logic App that will receive some inputs from other resources like Azure Data Factory and send out an email. I created this setup using the Azure portal and Logic app designer. When I added a Send an Email (V2) I was asked for an Office 365 account login and everything works as expected.
Now I'm trying to achieve all of this through Terraform. I can import the existing Logic app workflow to an AzureRM resource azurerm_logic_app_workflow but that doesn't import the API connection. I'm unsure on how to import the existing API connection into Terraform (or even to create a new API connection in Terraform).
Please advise.
As azender01 mentioned, the azurerm_api_connection terraform resource does not support all features Azure offers.
Workaround
In the past, i've connected a Logic App with a CosmosDb account using ARM scripts.
With Terraform, you can deploy ARM scripts with azurerm_resource_group_template_deployment. This feels like a big workaround, but i did not found a better solution.
You can export ARM scripts from existing resources in the Azure Portal and use them in your terraform azurerm_resource_group_template_deployment.
I am looking for an example on how to create an Azure Webjob inside an Azure Webapp in Azure but I was no able to find anything online. Does anyone know how to create one?
When Terraform definitions do not exist for Azure resources, you can utilize azurerm_template_deployment to deploy ARM templates.
For your case, looks like the WebJob ARM template can be deployed by azurerm_template_deployment.
I have tried creating with the Azure Bot Service and using the default ARM template generated in Azure, but it is just creating the resource.
Can I create an ARM template which will also configure Azure Bot Service with the following?
Language to be used for development (C# or NodeJS).
Associate the Microsoft App ID and App Password.
Template to be used, such as Basic, Dialog, LUIS or Proactive bot.
LUIS Integration.
It would help to create a new environment in Azure easily through templates.
Also I can use the template in DevOps VSTS release step, so that I can automate the deployment process.
Currently there are no officially supported prebuilt ARM Templates available.
Reference Github. But what can be done is, deploy the resources manually from the azure portal and navigate to resourceGroup Homepage -> Automation Script and grab the template from there and modify it as needed.
I'm trying to create Azure Resource Group template for an application consisting of: Cloud Service (with single WebRole), Notification Hub, Azure Storage and Azure SQL.
I started in VS2013 by creating AzureResourceGroup project and using the JSON Outline i can add storage and SQL resources. But Cloud Service and Notification Hub is missing in Add Resource dialog. What is the schema for them? What is the best way to add them to the template?
Edit: I found schema for NotificatonHubs here and was able to add template for it. Still don't know how to define the Cloud Service.
Cloud Services are in a "private preview" on ARM so we won't have snippets in VS until it goes public. I think that you have to be whitelisted as part of the preview to deploy at the moment... (i.e. the deployment will fail if you're not whitelisted)