azure-resource-manager

Possible to create new Database from Point In Time Restore using Azure ARMs SqlManagementClient?

瘦欲@ 提交于 2019-12-18 09:12:51
问题 Specifically looking for a way to perform point in time restore to a new Database, preserve the original database; using Managed API instead of REST API or Templates . Code I have so far: public async Task CreateDatabaseFromRestorePointAsync( string resourceGroupName, string serverName, string databaseName, DateTime time) { using (SqlManagementClient sqlMgmtClient = GetSqlManagementClient()) { DatabaseInner myDb = await sqlMgmtClient.Databases.GetAsync( resourceGroupName, serverName,

ARM template for enabling Update Management on Azure Virtual Machine

南楼画角 提交于 2019-12-14 04:21:34
问题 Could someone help me to enable update management on Azure VM with Azure Resource Manager Template. I could find any template online to enable it. Reference: https://docs.microsoft.com/en-us/azure/automation/automation-update-management 回答1: you cannot enable vm for update management, you can link oms and azure automation with update management enabled. more or less. here's a more or less working variant: { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate

How do I dynamically generate Traffic Manager endpoints in an ARM template?

…衆ロ難τιáo~ 提交于 2019-12-14 03:50:55
问题 I have an ARM template that creates an arbitrary number of Azure webapps using the copy construct, like so (non-relevant portions removed): { "parameters": { "numWebsites": { "type": "int", "defaultValue": 2 } }, "resources": [ "name": "[concat('webapp-', copyIndex()]", "type": "Microsoft.Web/sites", "copy": { "name": "websitescopy", "count": "[parameters('numWebsites')]" } ] } I'd also like to create a Traffic Manager profile with an endpoint for each of the websites created. However, there

SubscriptionNotFound: The subscription 'resourceGroups' could not be found

余生颓废 提交于 2019-12-14 03:21:20
问题 I'm trying to follow the Resource group authenticate service principal to be able to access some resource manager stuff. But when trying to do anything, I get the following error: SubscriptionNotFound: The subscription 'resourceGroups' could not be found. Using the C# code in the article to get an access token, and then calling the follow methods: var dnsClient = new DnsManagementClient(new Microsoft.Azure.TokenCloudCredentials(result.AccessToken)); var zone = dnsClient.Zones.CreateOrUpdate(

Removing VHD's from Azure Resource Manager after removing VM

有些话、适合烂在心里 提交于 2019-12-14 01:15:58
问题 It was brought to my attention that, if you create a new VM and then delete it (and its associated resources), you do not in fact delete the corresponding VHD file -- that file is left in blob storage, blocking the provisioning of a new machine with the same hostname, and also costing real money for wasted and unused storage. I wish to delete the VHD's along with the VM's. Where can I find a good write-up of the current wisdom on how to deal with this? All I can find is references from before

How to run Azure VM CustomScriptExtension as domain user? (part 2)

早过忘川 提交于 2019-12-13 05:14:27
问题 Updated to explain my root problem: If Azure has extensions for VM's, as they are being provisioned , to join a domain, and to run scripts, how can I run a script as a domain user? The script needs to be run as a domain user in order to access a file share to retrieve installation files and other scripts that are neither part of the VM template image nor can (reasonably) be uploaded to Azure blob storage and downloaded as part of provisioning. I split this question in two because the 2nd half

Azure provisioning with Jenkins

家住魔仙堡 提交于 2019-12-13 04:24:43
问题 As part of QA pipeline(in Jenkins), goal is to automate provisioning and configuration of a VM to run the QA tests. Jenkins pipeline can trigger Terraform code to automate provisioning of VM and ansible code for configuration of a VM, but, issues like rollback , error handling is not easy unless we use some vendor specific template like AzureResourceManager template. So, with Jenkins pipeline,What should be the best approach to provision and configure a VM in Azure cloud? we write pipeline

ARM template deploying Diagnostics Settings does not enable Metrics logs

本秂侑毒 提交于 2019-12-13 04:01:54
问题 I'm using Azure RM Template deployments with a Visual Studio 2017 Resource Group project to deploy IoTHub instance with diagnostics settings in Log Analytics. The problem is with deployment of the Diagnostics Settings template and specifically with the AllMetrics category under the metrics property. I'm following the instructions for deploying Diagnostics Settings as Non-Compute resource template The deployment completes successfully, but this one { "type": "providers/diagnosticSettings",

Import a database using AzureRM Powershell

…衆ロ難τιáo~ 提交于 2019-12-13 02:18:55
问题 There is a document named Import a BACPAC file to create a new Azure SQL database using PowerShell that covers how to import a bacpac file into SQL server under ASM. Is there a way to import a bacpac file into an Azure SQL Server using Azure Resource Management cmdlets. Following on from @juvchan answer I have been trying to get the following to work. $update = @{ "operationMode" = "Import" "storageKey"= "Key" "storageKeyType" = "Primary" "administratorLogin"= "adminlogin"

How do I find the properties of a resource with azure resource manager

六月ゝ 毕业季﹏ 提交于 2019-12-13 00:26:17
问题 How can I see the configuration of a resource in a resource group? I've provisioned a database through the portal and I'd like to see what that configuration is in the template language. 回答1: You can use the Azure Resource Manager REST API to list the template deployments for your resource group. A reference to the API is here. Near the top of the response is a templateLink that you can follow to get the deployment template. For example, this is what I get back for one of my deployments where