Commit Graph

15 Commits

Author SHA1 Message Date
Stephen Weatherford b65df9b5ac [MS] 14058 single placement group tf (#14510)
* Add single_placement_group to VMSS

* Add test, plus fixes

* Fix tests
2017-05-16 11:46:07 +03:00
Sertaç Özercan e0cd380814 [MS] provider/azurerm: Virtual Machine Scale Sets with managed disk support (#13717)
* added vmss with managed disk support

* Update vmss docs

* update vmss test

* added vmss managed disk import test

* update vmss tests

* remove unused test resources

* reverting breaking changes on storage_os_disk and storage_image_reference

* updated vmss tests and documentation

* updated vmss flatten osdisk

* updated vmss resource and import test

* update name in vmss osdisk

* update vmss test to include a blank name

* update vmss test to include a blank name
2017-05-12 15:58:00 +03:00
Tom Harvey f7f800bdfb provider/azurerm: VM Scale Sets - import support + fixes (#13464)
* Ensuring we base64 decode the custom data if it's base64 encoded

* Import support for VM Scale Sets

* Updating the docs to mention Import support

* Fixes #13009, where the SSH Keys would be set at the incorrect index

(leaving a null entry at the start, causing a crash on the second apply)

* Adding tests to cover the updating use-case

* Adding an import linux test

* Storing the base64 encoded value
Making custom_data a force new, since it an't be updated

* Updating the docs
2017-04-17 01:37:28 +03:00
tombuildsstuff 277d1b6b2d Refactoring the schema diff/validation -> core 2017-03-27 15:41:55 +01:00
Robert Rudduck e0bdc5f8f7 provider/azurerm: Add support for extensions on virtual machine scale sets (#12124)
* Add support for vmss extensions.

* Update website.

* Add multi extension test.

* Return error from settings parsing.

* Update extension hash.
2017-03-12 16:13:38 +02:00
Seth Vargo d387860c19 Hash custom_data in state storage (#12214)
This also switches to helpers for b64.
2017-03-08 23:57:51 +02:00
Paul Stack dc7f267758 provider/azurerm: Auto base64encode virtual_machine custom data (#12164)
Reported by @sethvargo - we auto encode for AWS, we should follow a
similar pattern for Azure.

In order to escape the double encoding, we check that it's not already
encoded before encoding
2017-02-22 18:26:35 +02:00
Paul Stack 97cf8f6543 provider/azurerm: Mark the azurerm_scale_set machine password as (#11982)
sensitive

This was pointed out at the HUG in London tonight that we save the plain
text password in state

I don't think this will be ported back to 0-8-stable
2017-02-15 23:03:55 +00:00
Robert Rudduck 512b155f64 Fix azurerm_virtual_machine_scale_sets (#11516)
* Image and vhdcontainers are mutually exclusive.

* Fix ip configuration handling and update support for load balancer backend pools.

* Fix os disk handling.

* Remove os_type from disk hash.

* Load balancer pools should not be computed.

* Add support for the overprovision property.

* Update documentation.

* Create acceptance test for scale set lb changes.

* Create acceptance test for scale set overprovisioning.
2017-01-31 12:57:11 +00:00
Paul Stack 54459900c5 [WIP] provider/azurerm: Bump sdk version to 7.0.1 (#10458)
* provider/azurerm: Bump sdk version to 7.0.1

* Fixing the build (#10489)

* Fixing the broken tests (#10499)

* Updating the method signatures to match (#10533)
2016-12-06 08:39:47 +00:00
Peter McAtominey a4054c999e provider/azurerm: create common schema for location field, add diff suppress (#10409) 2016-11-29 15:54:00 +00:00
Andreas Kyrris e5219ba56d Fixes behaviour when azurerm resources disappear.
Regressions were introduced when fixing
https://github.com/hashicorp/terraform/pull/8607 . Specifically when
resources in the statefile are deleted or missing in real life, then
terraform plan would exit with an error when it recieved a 404 not
found. The correct behaviour would be to show a plan with the offer to
create the missing resources.
2016-10-03 10:10:10 +01:00
stack72 392f634ff4
provider/azurerm: Reordering the checks after an Azure API Get
We are receiving suggestions of a panic as follows:

```
2016/09/01 07:21:55 [DEBUG] plugin: terraform: panic: runtime error: invalid memory address or nil pointer dereference
2016/09/01 07:21:55 [DEBUG] plugin: terraform: [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xa3170f]
2016/09/01 07:21:55 [DEBUG] plugin: terraform:
2016/09/01 07:21:55 [DEBUG] plugin: terraform: goroutine 114 [running]:
2016/09/01 07:21:55 [DEBUG] plugin: terraform: panic(0x27f4e60, 0xc4200100e0)
2016/09/01 07:21:55 [DEBUG] plugin: terraform: 	/opt/go/src/runtime/panic.go:500 +0x1a1
2016/09/01 07:21:55 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/builtin/providers/azurerm.resourceArmVirtualMachineRead(0xc4206d8060, 0x2995620, 0xc4204d0000, 0x0, 0x17)
2016/09/01 07:21:55 [DEBUG] plugin: terraform: 	/opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/azurerm/resource_arm_virtual_machine.go:488 +0x1ff
2016/09/01 07:21:55 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc420017a40, 0xc42040c780, 0x2995620, 0xc4204d0000, 0xc42019c990, 0x1, 0x0)
```

This is because the code is as follows:

```
resp, err := client.Get(resGroup, vnetName, name)
if resp.StatusCode == http.StatusNotFound {
	d.SetId("")
	return nil
}
if err != nil {
	return fmt.Errorf("Error making Read request on Azure virtual network peering %s: %s", name, err)
}
```

When a request throws an error, the response object isn't valid. Therefore, we need to flip that code to check the error first

```
resp, err := client.Get(resGroup, vnetName, name)
if err != nil {
	return fmt.Errorf("Error making Read request on Azure virtual network peering %s: %s", name, err)
}
if resp.StatusCode == http.StatusNotFound {
	d.SetId("")
	return nil
}
```
2016-09-01 15:31:42 +01:00
Steven Eschinger 9c095d66e1 azurerm: fix vault_certificates in vm/scale_set (#7681)
When setting the certificate_url and certificate_store values in
os_profile_secrets / vault_certificates for a Windows VM in AzureRM, I
was getting the following error:

```
[DEBUG] Error setting Virtual Machine Storage OS Profile Secrets:
&errors.errorString{s:"Invalid address to set:
[]string{\"os_profile_secrets\", \"0\", \"vault_certificates\"}"}
```

This seems to resolve the issue.
2016-07-18 10:20:18 +01:00
Paul Stack 514d8422f3 provider/azurerm: Add `azurerm_virtual_machine_scale_set` resource (#6711) 2016-06-11 00:37:14 +02:00