terraform-provider-azure

Deploy azure function using terraform

荒凉一梦 提交于 2019-12-11 17:22:47
问题 I have an example how to deploy azure function using terraform. But, unfortunately, it deploys only zip package. Is there are any other way to do it? How can I deploy multiple packages into one function? How can I configure proxy using terraform? resource "azurerm_function_app" "azure_function_scenario1_hop2" { name = "scenario1-hop2-azure-function" location = "${var.location}" resource_group_name = "${var.resource_group_name}" app_service_plan_id = "${var.app_service_plan_id}" storage

Creating a Azure Windows VM through terraform

若如初见. 提交于 2019-12-11 04:07:56
问题 In Azure , I'm trying to create a Windows VM using terraform. I have done this through powershell previously using Template.json file. Now I have to do with terraform, which I'm completely new to. So I have searched for some Sample scripts which creates VM in Azure and found this. In this link , there is a sample terraform script to spin a linux VM. But I need to spin a windows VM from an Image. Where should I give the Image details. My complete requirement is : 1. Create a Windows VM from an

Terraform Azure network security

风格不统一 提交于 2019-12-10 16:26:25
问题 I'm trying to configure a network security rule for a network security group in Azure via Terraform with multiple source addresses. Based on the documentation https://www.terraform.io/docs/providers/azurerm/r/network_security_rule.html However, I'm not able to get this to work nor can I find any examples for it: https://www.terraform.io/docs/providers/azurerm/r/network_security_rule.html#source_address_prefixes I get the Error: Error: azurerm_network_security_rule.test0: "source_address

Recover output value of Azure ARm template with terraform output

瘦欲@ 提交于 2019-12-08 13:04:19
问题 Using terraform and Azure ARM template, in order to configre event grid with a particular azure function, I am trying to recover some values in a terraform output. Indeed, I have this ARm template deployment to have the systems keys of a particular function: { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "functionApp": { "type": "string", "defaultValue": "" } }, "variables": { "functionAppId": "

Terraform azurerm_virtual_machine_extension

ぐ巨炮叔叔 提交于 2019-12-08 10:41:59
问题 I'm using azurerm_virtual_machine_extension to bootstrap some virtual machines in azure. All examples i've found show using something similar to: settings = <<SETTINGS { "fileUris": [ "https://my.bootstrapscript.com/script.sh}" ], "commandToExecute": "bash script.sh" } SETTINGS While this works, my issue is i'm having to publicly host script for use with fileUris . Is there an option within settings that will allow me to send local file contents from my terraform folder? Something like:

How to configure environment variables in Hashicorp Terraform

北城余情 提交于 2019-12-05 18:43:51
I'm quite new to Terraform, though I have gone through all of the instructional modules available on Hashicorp's site. Currently, I'm struggling with understanding how to set up environment variables. I know how to reference variables in the main.tf config ( access_key = "${var.access_key}" ), and I know how to save that access key to a separate file and reference that, but what I don't understand (and can't find any documentation/instruction on) is how to set up environment variables so I don't have to save the access key to a file. Does anyone know how best to go about doing this? Terraform

Using Terraform to import existing resources on Azure

与世无争的帅哥 提交于 2019-11-30 21:22:13
I have an existing resource group on Azure with a VM running on it and have been playing around with Terraform to try and import the resource to my state file. I have set up a skeleton file, and as far as my understanding is once I import TF should populate this with the values on my resource group in Azure resource "azurerm" "example" { # ...instance configuration... name = "MyResourceGroup" } Command I am running from CLI: terraform import azurerm_resource_group.MyResourceGroup/subscriptions/MySubscriptionNumber/resourceGroups/MyResourceGroup Message from Terraform: The import command

Using Terraform to import existing resources on Azure

橙三吉。 提交于 2019-11-30 05:01:36
问题 I have an existing resource group on Azure with a VM running on it and have been playing around with Terraform to try and import the resource to my state file. I have set up a skeleton file, and as far as my understanding is once I import TF should populate this with the values on my resource group in Azure resource "azurerm" "example" { # ...instance configuration... name = "MyResourceGroup" } Command I am running from CLI: terraform import azurerm_resource_group.MyResourceGroup