Commit Graph

305 Commits

Author SHA1 Message Date
Peter McAtominey 20efd54995 provider/azurerm: set ForceNew for storage image and OS disk of virtual_machine (#10340)
TF_ACC=1 go test ./builtin/providers/azurerm -v -run "TestAccAzureRMVirtualMachine_change" -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_changeStorageImageReference
--- PASS: TestAccAzureRMVirtualMachine_changeStorageImageReference (937.49s)
=== RUN   TestAccAzureRMVirtualMachine_changeOSDiskVhdUri
--- PASS: TestAccAzureRMVirtualMachine_changeOSDiskVhdUri (1187.81s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	2125.317s
2016-11-24 15:22:50 +00:00
Peter McAtominey e3e8261857 provider/azurerm: enable import of more resources (#10195)
* provider/azurerm: support import of virtual_machine

TF_ACC=1 go test ./builtin/providers/azurerm -v -run "TestAccAzureRMVirtualMachine_(basic|import)" -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_importBasic
--- PASS: TestAccAzureRMVirtualMachine_importBasic (561.08s)
=== RUN   TestAccAzureRMVirtualMachine_basicLinuxMachine
--- PASS: TestAccAzureRMVirtualMachine_basicLinuxMachine (677.49s)
=== RUN   TestAccAzureRMVirtualMachine_basicLinuxMachine_disappears
--- PASS: TestAccAzureRMVirtualMachine_basicLinuxMachine_disappears (674.21s)
=== RUN   TestAccAzureRMVirtualMachine_basicWindowsMachine
--- PASS: TestAccAzureRMVirtualMachine_basicWindowsMachine (1105.18s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	3017.970s

* provider/azurerm: support import of servicebus_namespace

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMServiceBusNamespace_import -timeout 120m
=== RUN   TestAccAzureRMServiceBusNamespace_importBasic
--- PASS: TestAccAzureRMServiceBusNamespace_importBasic (345.80s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	345.879s

* provider/azurerm: document import of servicebus_topic and servicebus_subscription

* provider/azurerm: support import of dns record resources

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMDns[A-z]+Record_importBasic -timeout 120m
=== RUN   TestAccAzureRMDnsARecord_importBasic
--- PASS: TestAccAzureRMDnsARecord_importBasic (102.84s)
=== RUN   TestAccAzureRMDnsAAAARecord_importBasic
--- PASS: TestAccAzureRMDnsAAAARecord_importBasic (100.59s)
=== RUN   TestAccAzureRMDnsCNameRecord_importBasic
--- PASS: TestAccAzureRMDnsCNameRecord_importBasic (98.94s)
=== RUN   TestAccAzureRMDnsMxRecord_importBasic
--- PASS: TestAccAzureRMDnsMxRecord_importBasic (107.30s)
=== RUN   TestAccAzureRMDnsNsRecord_importBasic
--- PASS: TestAccAzureRMDnsNsRecord_importBasic (98.55s)
=== RUN   TestAccAzureRMDnsSrvRecord_importBasic
--- PASS: TestAccAzureRMDnsSrvRecord_importBasic (100.19s)
=== RUN   TestAccAzureRMDnsTxtRecord_importBasic
--- PASS: TestAccAzureRMDnsTxtRecord_importBasic (97.49s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	706.000s

* provider/azurerm: support import of cdn_endpoint, document profile import

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMCdnEndpoint_import -timeout 120m
=== RUN   TestAccAzureRMCdnEndpoint_importWithTags
--- PASS: TestAccAzureRMCdnEndpoint_importWithTags (207.83s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	207.907s

* provider/azurerm: support import of sql_server, fix sql_firewall import

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMSql[A-z]+_importBasic -timeout 120m
=== RUN   TestAccAzureRMSqlFirewallRule_importBasic
--- PASS: TestAccAzureRMSqlFirewallRule_importBasic (153.72s)
=== RUN   TestAccAzureRMSqlServer_importBasic
--- PASS: TestAccAzureRMSqlServer_importBasic (119.83s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	273.630s
2016-11-22 14:13:11 +02:00
Robert Rudduck 9a70b6f482 Check storage uri for nil. (#10283) 2016-11-22 13:39:35 +02:00
Christian Karlsen 50b859ba9a provider/azurerm: make DiskSizeGB optional for data disks 2016-11-18 23:08:49 +01:00
James Bardin bda84e03f7 Merge pull request #10032 from hashicorp/jbardin/vet
Fix future vet errors in providers
2016-11-14 08:49:16 -05:00
Peter McAtominey 4996f3e289 provider/azurerm: allow updating load balancer sub-resources (#10016)
* provider/azurerm: allow updating of lb_rule resource

* check if rule is being updated rather than assuming created
* added test to cover guard against multiple rules with the same name

TF_ACC=1 go test ./builtin/providers/azurerm -v -run "TestAccAzureRMLoadBalancerRule_" -timeout 120m
=== RUN   TestAccAzureRMLoadBalancerRule_basic
--- PASS: TestAccAzureRMLoadBalancerRule_basic (157.45s)
=== RUN   TestAccAzureRMLoadBalancerRule_removal
--- PASS: TestAccAzureRMLoadBalancerRule_removal (163.67s)
=== RUN   TestAccAzureRMLoadBalancerRule_inconsistentReads
--- PASS: TestAccAzureRMLoadBalancerRule_inconsistentReads (150.00s)
=== RUN   TestAccAzureRMLoadBalancerRule_update
--- PASS: TestAccAzureRMLoadBalancerRule_update (164.20s)
=== RUN   TestAccAzureRMLoadBalancerRule_duplicateRules
--- PASS: TestAccAzureRMLoadBalancerRule_duplicateRules (137.51s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	772.846s

* provider/azurerm: allow updating of lb_nat_rule resource

* check if NAT rule is being updated rather than assuming created
* added test to cover guard against multiple NAT rules with the same name

TF_ACC=1 go test ./builtin/providers/azurerm -v -run "TestAccAzureRMLoadBalancerNatRule" -timeout 120m
=== RUN   TestAccAzureRMLoadBalancerNatRule_basic
--- PASS: TestAccAzureRMLoadBalancerNatRule_basic (148.48s)
=== RUN   TestAccAzureRMLoadBalancerNatRule_removal
--- PASS: TestAccAzureRMLoadBalancerNatRule_removal (163.48s)
=== RUN   TestAccAzureRMLoadBalancerNatRule_update
--- PASS: TestAccAzureRMLoadBalancerNatRule_update (176.97s)
=== RUN   TestAccAzureRMLoadBalancerNatRule_duplicate
--- PASS: TestAccAzureRMLoadBalancerNatRule_duplicate (136.36s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	625.301s

* provider/azurerm: allow updating of lb_probe resource

* check if probe is being updated rather than assuming created
* added test to cover guard against multiple probes with the same name

TF_ACC=1 go test ./builtin/providers/azurerm -v -run "TestAccAzureRMLoadBalancerProbe" -timeout 120m
=== RUN   TestAccAzureRMLoadBalancerProbe_basic
--- PASS: TestAccAzureRMLoadBalancerProbe_basic (134.53s)
=== RUN   TestAccAzureRMLoadBalancerProbe_removal
--- PASS: TestAccAzureRMLoadBalancerProbe_removal (168.06s)
=== RUN   TestAccAzureRMLoadBalancerProbe_update
--- PASS: TestAccAzureRMLoadBalancerProbe_update (175.99s)
=== RUN   TestAccAzureRMLoadBalancerProbe_duplicate
--- PASS: TestAccAzureRMLoadBalancerProbe_duplicate (139.01s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	617.598s

* provider/azurerm: allow updating of lb_nat_pool resource

* check if NAT pool is being updated rather than assuming created
* added test to cover guard against multiple NAT pools with the same name

TF_ACC=1 go test ./builtin/providers/azurerm -v -run "TestAccAzureRMLoadBalancerNatPool" -timeout 120m
=== RUN   TestAccAzureRMLoadBalancerNatPool_basic
--- PASS: TestAccAzureRMLoadBalancerNatPool_basic (146.52s)
=== RUN   TestAccAzureRMLoadBalancerNatPool_removal
--- PASS: TestAccAzureRMLoadBalancerNatPool_removal (158.34s)
=== RUN   TestAccAzureRMLoadBalancerNatPool_update
--- PASS: TestAccAzureRMLoadBalancerNatPool_update (174.05s)
=== RUN   TestAccAzureRMLoadBalancerNatPool_duplicate
--- PASS: TestAccAzureRMLoadBalancerNatPool_duplicate (136.94s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	615.866s
2016-11-11 13:09:00 +02:00
James Bardin 909099560d Fix future vet errors in providers 2016-11-10 18:10:43 -05:00
Peter McAtominey a23c5bda72 provider/azurerm: move ConfigureFunc outside of Provider literal, fixes nil reference
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMDnsARecord_basic -timeout 120m
=== RUN   TestAccAzureRMDnsARecord_basic
--- PASS: TestAccAzureRMDnsARecord_basic (91.92s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	91.994s
2016-11-09 15:49:14 +00:00
Peter McAtominey 464fb021f7 provider/azurerm: add virtual_machine_extension resource (#9962)
Picked up from where #6548 left off

settings and protected_settings take JSON objects as strings to make extension
generic

TF_ACC=1 go test ./builtin/providers/azurerm -v -run "TestAccAzureRMVirtualMachineExtension" -timeout 120m
=== RUN   TestAccAzureRMVirtualMachineExtension_importBasic
--- PASS: TestAccAzureRMVirtualMachineExtension_importBasic (697.55s)
=== RUN   TestAccAzureRMVirtualMachineExtension_basic
--- PASS: TestAccAzureRMVirtualMachineExtension_basic (824.17s)
=== RUN   TestAccAzureRMVirtualMachineExtension_concurrent
--- PASS: TestAccAzureRMVirtualMachineExtension_concurrent (929.74s)
=== RUN   TestAccAzureRMVirtualMachineExtension_linuxDiagnostics
--- PASS: TestAccAzureRMVirtualMachineExtension_linuxDiagnostics (803.19s)
PASS
ok 	github.com/hashicorp/terraform/builtin/providers/azurerm	3254.663s
2016-11-09 15:13:48 +00:00
Mitchell Hashimoto 2b7177cfe7 Merge pull request #9607 from hashicorp/f-provider-stop-redo
terraform: ResourceProvider.Stop (redo)
2016-11-08 15:58:48 -08:00
Tom Harvey b15b7e1c40 provider/azurerm: EventHubs (#9889)
* Implemented EventHubs

* Missing the sidebar link

* Fixing the type

* Fixing the docs for Namespace

* Removing premium tests

* Checking the correct status code on delete

* Added a test case for the import

* Documentation for importing

* Fixing a typo
2016-11-07 10:19:59 +00:00
Peter McAtominey 491a74fd53 provider/azurerm: allow storage_account resource with name "$root" (#9813)
Fixes #8763

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMStorageContainer -timeout 120m
=== RUN   TestAccAzureRMStorageContainer_basic
--- PASS: TestAccAzureRMStorageContainer_basic (131.40s)
=== RUN   TestAccAzureRMStorageContainer_disappears
--- PASS: TestAccAzureRMStorageContainer_disappears (126.20s)
=== RUN   TestAccAzureRMStorageContainer_root
--- PASS: TestAccAzureRMStorageContainer_root (125.98s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	383.661s
2016-11-02 22:57:57 +00:00
Peter McAtominey 565e8719db provider/azurerm: update Azure SDK to 6.0 Beta (#9700)
Fix keyvault KeyPermissions references
2016-11-01 19:25:20 +00:00
Peter McAtominey f2606bfa5d provider/azurerm: fix sql_database resource reading tags (#9767)
tags were not being set in the read function

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMSqlDatabase_basic -timeout 120m
=== RUN   TestAccAzureRMSqlDatabase_basic
--- PASS: TestAccAzureRMSqlDatabase_basic (190.60s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	190.719s
2016-11-01 10:55:02 +00:00
Paul Stack 7ddc7211ca provider/azurerm: Guard against panic when importing arm_virtual_network (#9739)
Fixes #9410

When importing an azurerm_virtual_network that has no DNSServers,
terraform was throwing a panic as it was trying to dereference that list
of servers to set to state

This commit adds a simple check to make sure there are DNSServers before
dereferencing them

```
make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMVirtualNetwork_'                            2 ↵ ✹
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/10/31 11:20:36 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMVirtualNetwork_ -timeout 120m
=== RUN   TestAccAzureRMVirtualNetwork_importBasic
--- PASS: TestAccAzureRMVirtualNetwork_importBasic (150.63s)
=== RUN   TestAccAzureRMVirtualNetwork_basic
--- PASS: TestAccAzureRMVirtualNetwork_basic (122.90s)
=== RUN   TestAccAzureRMVirtualNetwork_disappears
--- PASS: TestAccAzureRMVirtualNetwork_disappears (113.07s)
=== RUN   TestAccAzureRMVirtualNetwork_withTags
--- PASS: TestAccAzureRMVirtualNetwork_withTags (139.56s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm526.168
```
2016-10-31 17:03:12 +00:00
Andreas Kyrris 59d036202d provider/azurerm: Fix VHD deletion when VM and Storage account are in separate resource groups (#9631)
* Improve messaging when storage account isn't found.

* Add client for finding resources when you don't know it's resource group.

* Add function to find Storage Account resource group name.

* Use the storage account resource group, not the virtual machine's resource group when deleting VHDs.

* Add description of storage account ID for clarity.

* Improve VHD deletion test when storage account is in different resource group.

* Use common function for ID parsing of storage account.
2016-10-27 16:42:47 +01:00
Peter McAtominey acb6d68120 provider/azurerm: lower servicebus_topic max size to Azure limit, fix test (#9649)
This test was previously passing but the limit appears to have been reduced
since.

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMServiceBusTopic_enableParti -timeout 120m
=== RUN   TestAccAzureRMServiceBusTopic_enablePartitioning
--- PASS: TestAccAzureRMServiceBusTopic_enablePartitioning (377.14s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	377.235s
2016-10-27 12:05:54 +01:00
Peter McAtominey d920105440 provider/azurerm: support importing of subnet resource (#9646)
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMSubnet -timeout 120m
=== RUN   TestAccAzureRMSubnet_importBasic
--- PASS: TestAccAzureRMSubnet_importBasic (165.04s)
=== RUN   TestAccAzureRMSubnet_basic
--- PASS: TestAccAzureRMSubnet_basic (165.39s)
=== RUN   TestAccAzureRMSubnet_disappears
--- PASS: TestAccAzureRMSubnet_disappears (170.02s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	500.533s
2016-10-27 10:20:45 +01:00
Mitchell Hashimoto 8dcd5881f9
providers/azurerm: don't leak the context cancellation function 2016-10-25 12:08:36 -07:00
Mitchell Hashimoto 5ee8042dff
helper/schema: expose stop information as a Context 2016-10-25 12:08:36 -07:00
Mitchell Hashimoto 990df480dc
providers/azurerm: convert to Stop() usage as example 2016-10-25 12:08:36 -07:00
Mitchell Hashimoto 60140b28f4
Revert "Merge pull request #9536 from hashicorp/f-provider-stop"
This reverts commit c3a4cff133, reversing
changes made to 791a02e6e4.

This change requires plugin recompilation and we should hold off until a
minor release for that.
2016-10-25 12:00:36 -07:00
Mitchell Hashimoto d7402d0473
providers/azurerm: don't leak the context cancellation function 2016-10-25 11:47:47 -07:00
Mitchell Hashimoto 86eb30b8a2
helper/schema: expose stop information as a Context 2016-10-25 11:32:30 -07:00
Mitchell Hashimoto 9089aa24d5
providers/azurerm: convert to Stop() usage as example 2016-10-25 11:32:17 -07:00
Jonathan Rudenberg d265a6fee3 provider/azurerm: Add disk_size_gb param to VM storage_os_disk (#9200)
TF_ACC=1 go test ./builtin/providers/azurerm -v -run=TestAccAzureRMVirtualMachine_basicLinuxMachine -timeout 120m
    === RUN   TestAccAzureRMVirtualMachine_basicLinuxMachine
    --- PASS: TestAccAzureRMVirtualMachine_basicLinuxMachine (540.83s)
    PASS
    ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	540.841s

    TF_ACC=1 go test ./builtin/providers/azurerm -v -run=TestAccAzureRMVirtualMachine_withDataDisk -timeout 120m
    === RUN   TestAccAzureRMVirtualMachine_withDataDisk
    --- PASS: TestAccAzureRMVirtualMachine_withDataDisk (431.19s)
    PASS
    ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	431.203s
2016-10-25 17:54:55 +01:00
Peter McAtominey c199d1fde2 provider/azurerm: fix servicebus_topic updating values (#9323)
enable_partitioning set to ForceNew
requires_duplicate_detection set to ForceNew

max_size_in_megabytes would cause a loop if enable_partitioning was true as this
causes the value to be multiplied by 16 for it's effective value, this computed
value is then returned by the ARM API in the same field which caused Terraform
to always detect a change

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMServiceBusTopic -timeout 120m
=== RUN   TestAccAzureRMServiceBusTopic_importBasic
--- PASS: TestAccAzureRMServiceBusTopic_importBasic (345.08s)
=== RUN   TestAccAzureRMServiceBusTopic_basic
--- PASS: TestAccAzureRMServiceBusTopic_basic (342.23s)
=== RUN   TestAccAzureRMServiceBusTopic_update
--- PASS: TestAccAzureRMServiceBusTopic_update (359.56s)
=== RUN   TestAccAzureRMServiceBusTopic_enablePartitioning
--- PASS: TestAccAzureRMServiceBusTopic_enablePartitioning (362.80s)
=== RUN   TestAccAzureRMServiceBusTopic_enableDuplicateDetection
--- PASS: TestAccAzureRMServiceBusTopic_enableDuplicateDetection (364.97s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	1774.657s
```
2016-10-25 16:34:08 +01:00
Tom Harvey 59a81da74e provider/azurerm: Event Hub Namespaces (#9297)
Add support for EventHub NameSpaces
2016-10-25 15:50:07 +01:00
Paul Stack d485512d71 Merge pull request #9468 from wendorf/arm_loadbalancer_rule_naming_fix
Azure RM loadbalancer rules have correct naming restrictions
2016-10-25 15:12:26 +01:00
Paul Stack a24a068196 Merge pull request #8674 from enieuw/feature/arm_storage_file
provider/azurerm: Implement azurerm_storage_share
2016-10-25 14:16:46 +01:00
Paul Stack ecb467aa7d Merge pull request #9478 from BedeGaming/azurerm-keyvault
provider/azurerm: key_vault resource and client_config datasource
2016-10-25 13:35:29 +01:00
Peter McAtominey e7d64b28bd provider/azurerm: add key_vault resource
- vendor keyvault sdk package

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMKeyV -timeout 120m
=== RUN   TestAccAzureRMKeyVault_importBasic
--- PASS: TestAccAzureRMKeyVault_importBasic (89.01s)
=== RUN   TestAccAzureRMKeyVault_basic
--- PASS: TestAccAzureRMKeyVault_basic (83.36s)
=== RUN   TestAccAzureRMKeyVault_update
--- PASS: TestAccAzureRMKeyVault_update (102.83s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	275.285s
```
2016-10-25 13:01:45 +01:00
Paul Stack f7d4110b2d Merge pull request #9455 from BedeGaming/azurerm-lb-concurrency-fix
provider/azurerm: lock mutex in load_balancer resources
2016-10-24 14:29:29 +01:00
Paul Stack 3f16f3d4c9 Merge pull request #9207 from BedeGaming/azurerm-nic-hash
provider/azurerm: write load_balanacer attributes to network_interface_card hash
2016-10-24 14:26:20 +01:00
Paul Stack b35ab4de62 Merge pull request #9307 from BedeGaming/azurerm-tags-computed-fix
provider/azurerm: fix computed tags causing non-empty plan
2016-10-24 14:20:00 +01:00
Paul Stack 7ac85e9f6d Merge pull request #9408 from BedeGaming/azurerm-storage-account-tier
provider/azurerm: add account_kind and access_tier to storage_account
2016-10-24 14:15:34 +01:00
Peter McAtominey 6f72b2c36a provider/azurerm: lock mutex in load_balancer resources
This fixes races between sub resources causing inconsistent writes of the load
balancer resource

Fixes #9424

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMLoadBalancer -timeout 120m
=== RUN   TestAccAzureRMLoadBalancerBackEndAddressPool_basic
--- PASS: TestAccAzureRMLoadBalancerBackEndAddressPool_basic (150.95s)
=== RUN   TestAccAzureRMLoadBalancerBackEndAddressPool_removal
--- PASS: TestAccAzureRMLoadBalancerBackEndAddressPool_removal (146.25s)
=== RUN   TestAccAzureRMLoadBalancerNatPool_basic
--- PASS: TestAccAzureRMLoadBalancerNatPool_basic (157.43s)
=== RUN   TestAccAzureRMLoadBalancerNatPool_removal
--- PASS: TestAccAzureRMLoadBalancerNatPool_removal (169.46s)
=== RUN   TestAccAzureRMLoadBalancerNatRule_basic
--- PASS: TestAccAzureRMLoadBalancerNatRule_basic (149.04s)
=== RUN   TestAccAzureRMLoadBalancerNatRule_removal
--- PASS: TestAccAzureRMLoadBalancerNatRule_removal (170.35s)
=== RUN   TestAccAzureRMLoadBalancerProbe_basic
--- PASS: TestAccAzureRMLoadBalancerProbe_basic (146.88s)
=== RUN   TestAccAzureRMLoadBalancerProbe_removal
--- PASS: TestAccAzureRMLoadBalancerProbe_removal (166.25s)
=== RUN   TestAccAzureRMLoadBalancerRule_basic
--- PASS: TestAccAzureRMLoadBalancerRule_basic (146.36s)
=== RUN   TestAccAzureRMLoadBalancerRule_removal
--- PASS: TestAccAzureRMLoadBalancerRule_removal (164.24s)
=== RUN   TestAccAzureRMLoadBalancerRule_inconsistentReads
--- PASS: TestAccAzureRMLoadBalancerRule_inconsistentReads (153.19s)
=== RUN   TestAccAzureRMLoadBalancer_basic
--- PASS: TestAccAzureRMLoadBalancer_basic (102.59s)
=== RUN   TestAccAzureRMLoadBalancer_frontEndConfig
--- PASS: TestAccAzureRMLoadBalancer_frontEndConfig (187.92s)
=== RUN   TestAccAzureRMLoadBalancer_tags
--- PASS: TestAccAzureRMLoadBalancer_tags (119.93s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	2130.930s
```
2016-10-20 14:59:01 +01:00
Peter McAtominey 6374cc7d33 provider/azurerm: add client_config data source
azurerm_client_config provides access to:

 - client_id
 - tenant_id
 - subscription_id

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMClientConfig -timeout 120m
=== RUN   TestAccAzureRMClientConfig_basic
--- PASS: TestAccAzureRMClientConfig_basic (27.79s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	27.862s
```
2016-10-20 11:29:48 +01:00
Dan Wendorf 957d1cb3a8 Azure RM loadbalancer rules have correct naming restrictions
- The name cannot be empty
- The name cannot be more than 80 characters
- The name must begin with a letter or number
- The name must end with a letter, number, or underscore
- The name must only contain letters, numbers, underscores, periods, or hyphens
2016-10-19 17:58:44 -07:00
James Nugent e2f3832769 provider/azurerm: Fix error message wording 2016-10-18 08:00:38 -05:00
Andreas Kyrris 182ebf3abb Use better variable naming. 2016-10-18 10:44:15 +01:00
Andreas Kyrris da12ed640a Checking for azure credentials isn't required.
The check for ARM_SUBSCRIPTION_ID breaks the PR testing. The PR
testing isn't trying to check acceptance tests anyway.
There will still be a correct failure for missing ARM_SUBSCRIPTION_ID
when running the acceptance test due to the later testAccPreCheck().
2016-10-18 09:26:36 +01:00
Andreas Kyrris 7b133ad356 Fix id of azurerm_lb_backend_address_pool, azurerm_lb_rule, azurerm_lb_nat_rule, azurerm_lb_nat_pool. 2016-10-18 08:48:25 +01:00
Andreas Kyrris 4a22fa0438 Use Probe's property to lookup loadbalancer_id. 2016-10-18 08:33:31 +01:00
Andreas Kyrris e63d120b57 Fix id of azurerm_lb_probe. 2016-10-18 08:33:31 +01:00
Andreas Kyrris a0ad874d25 Update test for azurerm_lb_nat_rule id. 2016-10-18 08:33:31 +01:00
Andreas Kyrris 4bf1985453 Update test for azurerm_lb_nat_pool id. 2016-10-18 08:33:31 +01:00
Andreas Kyrris f4980bf1b5 Update test for azurerm_lb_rule id. 2016-10-18 08:33:31 +01:00
Andreas Kyrris c1d4397673 Update test for azurerm_lb_probe id. 2016-10-18 08:33:31 +01:00
Andreas Kyrris 25794f6692 Update test for azurerm_lb_backend_address_pool id. 2016-10-18 08:33:31 +01:00
Peter McAtominey 89b49f809b provider/azurerm: add account_kind and access_tier to storage_account resource
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMStorageAccount -timeout 120m
=== RUN   TestAccAzureRMStorageAccount_importBasic
--- PASS: TestAccAzureRMStorageAccount_importBasic (140.06s)
=== RUN   TestAccAzureRMStorageAccount_basic
--- PASS: TestAccAzureRMStorageAccount_basic (155.43s)
=== RUN   TestAccAzureRMStorageAccount_disappears
--- PASS: TestAccAzureRMStorageAccount_disappears (134.99s)
=== RUN   TestAccAzureRMStorageAccount_blobEncryption
--- PASS: TestAccAzureRMStorageAccount_blobEncryption (161.59s)
=== RUN   TestAccAzureRMStorageAccount_blobStorageWithUpdate
--- PASS: TestAccAzureRMStorageAccount_blobStorageWithUpdate (131.49s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	723.694s
2016-10-17 17:49:07 +01:00
Eric Nieuwenhuijsen 3e651a7130 provider/azurerm: Implement azurerm_storage_share 2016-10-11 11:41:21 +02:00
James Nugent f1503d3b39 Merge pull request #9305 from BedeGaming/azurerm-lb-rule-validation
provider/azurerm: fix loadbanacer_rule tests failing validation
2016-10-10 22:42:56 -04:00
Peter McAtominey a07275df5e provider/azurerm: fix computed tags causing non-empty plan
The tag schema was changed in #9199, setting the Computed flag, this was causing
the plan to not be empty for resources which support tags but none were set, as
no value would be set by flattenAndSetTags.

Setting an empty map instead fixes the issue, ran original failing test and an
update tags test to ensure nothing else was broken.

Depends on #9305.

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMCdnProfile -timeout 120m
=== RUN   TestAccAzureRMCdnProfile_importWithTags
--- PASS: TestAccAzureRMCdnProfile_importWithTags (171.64s)
=== RUN   TestAccAzureRMCdnProfile_basic
--- PASS: TestAccAzureRMCdnProfile_basic (162.70s)
=== RUN   TestAccAzureRMCdnProfile_withTags
--- PASS: TestAccAzureRMCdnProfile_withTags (203.12s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	537.538s
```
2016-10-10 14:19:20 +01:00
Peter McAtominey d60b9ab018 provider/azurerm: fix cdn_profile ID parsing, add import capability
cdn_profile resource was using `Profiles` instead of `profiles` to gather the
name in the read and delete methods, added importing capability with test to
confirm read now works as expected.

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMCdnProfile -timeout 120m
=== RUN   TestAccAzureRMCdnProfile_importWithTags
--- PASS: TestAccAzureRMCdnProfile_importWithTags (170.00s)
=== RUN   TestAccAzureRMCdnProfile_basic
--- PASS: TestAccAzureRMCdnProfile_basic (166.33s)
=== RUN   TestAccAzureRMCdnProfile_withTags
--- PASS: TestAccAzureRMCdnProfile_withTags (185.94s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	522.333s
```
2016-10-10 14:03:48 +01:00
Peter McAtominey c4963dd66e provider/azurerm: fix loadbanacer_rule tests failing validation
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMLoadBalancerRule -timeout 120m
=== RUN   TestAccAzureRMLoadBalancerRule_basic
--- PASS: TestAccAzureRMLoadBalancerRule_basic (149.43s)
=== RUN   TestAccAzureRMLoadBalancerRule_removal
--- PASS: TestAccAzureRMLoadBalancerRule_removal (165.38s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	314.894s
2016-10-10 10:16:16 +01:00
Paul Stack 89138fe22b Merge pull request #9122 from hashicorp/b-arm-vm-diagnostics
provider/azurerm: arm_virtual_machine diagnostics_profile was causing a panic on the Read func
2016-10-07 19:42:15 +01:00
stack72 dcfdc6ab30
provider/azurerm: arm_virtual_machine diagnostics_profile was causing a
panic on the Read func

Fixes #8995

The Diagnostics profile was a badly laid out resource. All we needed to
set was whether it was enabled and the storage account to save the logs
to. The old schema parameter was deprecated and replaced with a much
simplier structure

```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMVirtualMachine_diagnosticsProfile'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/29 12:21:04 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMVirtualMachine_diagnosticsProfile -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_diagnosticsProfile
--- PASS: TestAccAzureRMVirtualMachine_diagnosticsProfile (1066.76s)
PASS
ok
github.com/hashicorp/terraform/builtin/providers/azurerm1066.776s
```
2016-10-07 19:36:45 +01:00
Paul Stack a085c8d71e provider/azurerm: Add Load Balancer resources (#9199)
* provider/azurerm: Add AzureRM Loadbalancer resource

Adds support for the elusive Azure LoadBalancer

* [x] `azurerm_lb`
* [x] `azurerm_lb_backend_address_pool`
* [x] `azurerm_lb_rule`
* [x] `azurerm_lb_nat_rule`
* [x] `azurerm_lb_probe`
* [x] `azurerm_lb_nat_pool`

Test Results:

```
make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMLoadbalancer'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMLoadbalancer -timeout 120m
=== RUN   TestAccAzureRMLoadbalancerBackEndAddressPool_basic
--- PASS: TestAccAzureRMLoadbalancerBackEndAddressPool_basic (207.26s)
=== RUN   TestAccAzureRMLoadbalancerBackEndAddressPool_removal
--- PASS: TestAccAzureRMLoadbalancerBackEndAddressPool_removal (165.89s)
=== RUN   TestAccAzureRMLoadbalancerNatRule_basic
--- PASS: TestAccAzureRMLoadbalancerNatRule_basic (179.30s)
=== RUN   TestAccAzureRMLoadbalancerNatRule_removal
--- PASS: TestAccAzureRMLoadbalancerNatRule_removal (180.73s)
=== RUN   TestAccAzureRMLoadbalancerRule_basic
--- PASS: TestAccAzureRMLoadbalancerRule_basic (170.40s)
=== RUN   TestAccAzureRMLoadbalancerRule_removal
--- PASS: TestAccAzureRMLoadbalancerRule_removal (204.23s)
=== RUN   TestAccAzureRMLoadbalancer_basic
--- PASS: TestAccAzureRMLoadbalancer_basic (136.03s)
=== RUN   TestAccAzureRMLoadbalancer_frontEndConfig
--- PASS: TestAccAzureRMLoadbalancer_frontEndConfig (214.47s)
=== RUN   TestAccAzureRMLoadbalancer_tags
--- PASS: TestAccAzureRMLoadbalancer_tags (215.52s)
=== RUN   TestAccAzureRMLoadbalancerProbe_basic
--- PASS: TestAccAzureRMLoadbalancerProbe_basic (183.36s)
=== RUN   TestAccAzureRMLoadbalancerProbe_removal
--- PASS: TestAccAzureRMLoadbalancerProbe_removal (185.86s)
=== RUN   TestAccAzureRMLoadbalancerNatPool_basic
--- PASS: TestAccAzureRMLoadbalancerNatPool_basic (161.47s)
=== RUN   TestAccAzureRMLoadbalancerNatPool_removal
--- PASS: TestAccAzureRMLoadbalancerNatPool_removal (167.38s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
1673.852s
```

* provider/azurerm: Documentation for the ARM LB resources
2016-10-07 14:14:26 -04:00
Paul Stack 4ac7d0a6bb Merge pull request #8103 from BedeGaming/validation-helper
helper: create validation package to provide common validation functions
2016-10-07 13:42:29 +01:00
Paul Stack 250be11fdd Merge pull request #9073 from carinadigital/GH-9072
provider/azurerm: set resource_group_name on resource import
2016-10-07 13:29:08 +01:00
Peter McAtominey 0cb6e7df8b provider/azurerm: add enable_blob_encryption to storage_account resource
This allows Storage Service Encryption to be enabled.

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMStorageAccount -timeout 120m
=== RUN   TestAccAzureRMStorageAccount_importBasic
--- PASS: TestAccAzureRMStorageAccount_importBasic (139.00s)
=== RUN   TestAccAzureRMStorageAccount_basic
--- PASS: TestAccAzureRMStorageAccount_basic (151.03s)
=== RUN   TestAccAzureRMStorageAccount_blobEncryption
--- PASS: TestAccAzureRMStorageAccount_blobEncryption (149.94s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	440.051s
2016-10-06 22:50:02 +01:00
Paul Stack 97ad032474 Merge pull request #8859 from carinadigital/arm-vm-fix
provider/azurerm: Terraform Plan errors when created resources disappear
2016-10-06 22:38:30 +01:00
Paul Stack e012c4fcc5 Merge pull request #9242 from BedeGaming/azurerm-sb-namespace-keys
provider/azurerm: expose default keys for servicebus_namespace
2016-10-06 21:53:23 +01:00
Peter McAtominey f733d6aa8a provider/azurerm: expose default keys for servicebus_namespace
A default authorization rule is created by Azure which, if present is exported by
the resource.

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMServiceBusNamespace -timeout 120m
=== RUN   TestAccAzureRMServiceBusNamespaceCapacity_validation
--- PASS: TestAccAzureRMServiceBusNamespaceCapacity_validation (0.00s)
=== RUN   TestAccAzureRMServiceBusNamespaceSku_validation
--- PASS: TestAccAzureRMServiceBusNamespaceSku_validation (0.00s)
=== RUN   TestAccAzureRMServiceBusNamespace_basic
--- PASS: TestAccAzureRMServiceBusNamespace_basic (352.03s)
=== RUN   TestAccAzureRMServiceBusNamespace_readDefaultKeys
--- PASS: TestAccAzureRMServiceBusNamespace_readDefaultKeys (349.17s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	701.278s
2016-10-05 22:12:28 +01:00
stack72 9089b415d4
provider/azurerm: Support AzureRM Sql Database DataWarehouse
Fixes #9194

Removes the validation for the types and adds an acceptance test to make
sure we get a successful Sql Database created

```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMSqlDatabase_datawarehouse'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/10/03 21:57:16 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMSqlDatabase_datawarehouse -timeout 120m
=== RUN   TestAccAzureRMSqlDatabase_datawarehouse
--- PASS: TestAccAzureRMSqlDatabase_datawarehouse (307.95s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm307.963s
```
2016-10-04 14:38:51 +01:00
Peter McAtominey 86b984a68d provider/azurerm: write load_balanacer attributes to network_interface_card hash
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMNetworkInterface -timeout 120m
=== RUN   TestAccAzureRMNetworkInterface_basic
--- PASS: TestAccAzureRMNetworkInterface_basic (197.24s)
=== RUN   TestAccAzureRMNetworkInterface_enableIPForwarding
--- PASS: TestAccAzureRMNetworkInterface_enableIPForwarding (188.65s)
=== RUN   TestAccAzureRMNetworkInterface_withTags
--- PASS: TestAccAzureRMNetworkInterface_withTags (226.13s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	612.088s
2016-10-04 14:36:43 +01:00
Paul Stack 3c63c80b86 Merge pull request #9185 from BedeGaming/azurerm-servicebus-sub
provider/azurerm: add servicebus_subscription resource
2016-10-03 17:35:31 +01:00
Paul Stack 122a985767 Merge pull request #9163 from BedeGaming/azurerm-resource-id-fix
provider/azurerm: fix resource ID parsing for subscriptions resources
2016-10-03 17:07:36 +01:00
Andreas Kyrris 409ec88157 Fix failing acceptance tests by using case insensitive diff function.
Some resource fail due to resource_group_name always being stored as
lowercase. For those resources we add the case insensitive diff
function.
2016-10-03 15:46:34 +01:00
Andreas Kyrris da2bb09a32 Update tests to include capitalisation of resource group names.
Some azurerm resources store resource_group_name in lowercase only.
Other store resource_group_name using lower and upper case.
Ensure that all test cases use capitalisation in resource_group_name
to find errors in diffs due to capitalisation.

Some resource_group_name were refactored to match naming scheme
across the azurerm tests.
2016-10-03 15:46:34 +01:00
Andreas Kyrris b2f85a766c Fix import of resource group name for azurerm_sql_firewall_rule. 2016-10-03 15:46:34 +01:00
Andreas Kyrris 48055158b6 Fix import of resource group name for azurerm_local_network_gateway. 2016-10-03 15:46:34 +01:00
Andreas Kyrris d7c0050e18 Fix import of resource group name for azurerm_availability_set. 2016-10-03 15:46:34 +01:00
Andreas Kyrris bc3be270f1 Fix import of resource group name for azurerm_traffic_manager_profile. 2016-10-03 15:46:34 +01:00
Andreas Kyrris 0394a4e072 Fix import of resource group name for azurerm_traffic_manager_endpoint. 2016-10-03 15:46:34 +01:00
Andreas Kyrris 9998adb6ad Fix import of resource group name for azurerm_network_security_group_rule. 2016-10-03 15:46:34 +01:00
Andreas Kyrris 8c678121e6 Fix import of resource group name for azurerm_network_security_group. 2016-10-03 15:46:34 +01:00
Andreas Kyrris 3a047c06ba Fix import of resource group name for azurerm_virtual_network_peering. 2016-10-03 15:46:34 +01:00
Andreas Kyrris e60d5dd260 Fix import of resource group name for azurerm_virtual_network. 2016-10-03 15:46:34 +01:00
Andreas Kyrris 9916e6b2f2 Fix import of resource group name for azurerm_dns_zone. 2016-10-03 15:46:34 +01:00
Andreas Kyrris 82cc9d3e56 Supress diffs for differences in resource_group_name capitalisation. 2016-10-03 15:46:34 +01:00
Andreas Kyrris e589fee01c Set resource_group_name when reading from API. 2016-10-03 15:46:34 +01:00
Andreas Kyrris e55852888a Check state of resource_group_name on import. 2016-10-03 15:46:34 +01:00
Peter McAtominey 475fd4decb provider/azurerm: add servicebus_subscription resource
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMServiceBusSubscription -timeout 120m
=== RUN   TestAccAzureRMServiceBusSubscription_importBasic
--- PASS: TestAccAzureRMServiceBusSubscription_importBasic (339.00s)
=== RUN   TestAccAzureRMServiceBusSubscription_basic
--- PASS: TestAccAzureRMServiceBusSubscription_basic (328.47s)
=== RUN   TestAccAzureRMServiceBusSubscription_update
--- PASS: TestAccAzureRMServiceBusSubscription_update (368.95s)
=== RUN   TestAccAzureRMServiceBusSubscription_updateRequiresSession
--- PASS: TestAccAzureRMServiceBusSubscription_updateRequiresSession (348.47s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	1384.966s
2016-10-03 15:27:28 +01:00
Peter McAtominey cdbf0d7df4 provider/azurerm: add servicebus_topic resource
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMServiceBusTopic -timeout 120m
=== RUN   TestAccAzureRMServiceBusTopic_importBasic
--- PASS: TestAccAzureRMServiceBusTopic_importBasic (328.72s)
=== RUN   TestAccAzureRMServiceBusTopic_basic
--- PASS: TestAccAzureRMServiceBusTopic_basic (331.04s)
=== RUN   TestAccAzureRMServiceBusTopic_update
--- PASS: TestAccAzureRMServiceBusTopic_update (348.69s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	1008.588s
2016-10-03 11:25:50 +01: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
Andreas Kyrris 00c0c75b16 Add tests to azurerm resources for cases where created resources
disappear.
2016-10-03 10:10:10 +01:00
Peter McAtominey 70d5914e1b provider/azurerm: fix resource ID parsing for subscriptions resources
If a resource ID has more than one subscriptions key, as is the case for Service
Bus subscriptions the Azure SubscriptionID field was overwritten by the second
value.

TF_ACC= go test ./builtin/providers/azurerm -run TestParseAzureResourceID -timeout=30s -parallel=4
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	0.060s
2016-10-01 17:47:19 +01:00
Peter McAtominey 9fb9b67381 provider/azurerm: update Azure SDK
Based off master v4
2016-09-22 10:15:57 +01:00
Krzysztof Wilczynski e999ae77ba
Add normalizeJsonString and validateJsonString functions.
This commit adds ValidateFunc to the policy attribute so that JSON parsing
errors can be caught early. Generally, when there is a ValidateFunc set for the
attribute, one can safely assume that before any of the creation and/or update
of the existing resource would happen it would have to succeed validation. Also
adds support for new helper function which is used to normalise JSON string.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2016-09-17 23:34:50 +01:00
Krzysztof Wilczynski 1eed5ddbe0 Fix. Correct a typo in the error message. (#8882)
This comment corrects a simple typo in the error message issued when the
credentials are not working and/or do not offer access to AzureRM, etc.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2016-09-16 16:09:20 +01:00
stack72 0fe822e822
provider/azurerm: Removing the diagnostics part of the test from the azurerm virtual machine unattended acceptance test 2016-09-12 17:52:54 +01:00
stack72 971b08f320
Merge conflict resolution of virtual_machine.html.markdown in AzureRM 2016-09-12 11:13:24 +01:00
Paul Hinze 0db012fcf1
provider/azurerm: Remove editorialization from comment 2016-09-05 15:03:58 -05: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
James Nugent c853eb5525 Update CHANGELOG.md 2016-08-23 14:38:48 +02:00
Jeff Goldschrafe 08f2e6797b provider/azurerm: support Diagnostics Profile
Add support for a diagnostics profile, which allows boot diagnostics to
be enabled on a virtual machine.
2016-08-18 23:46:47 -04:00
Kristinn Örn Sigurðsson 7f096a677f provider/azurerm: Public IP - Setting idle timeout value caused panic. (#8283)
Setting the idle_timeout_in_minutes value of the azurerm_public_ip
resource always caused a panic.

This fixes it and adds a test to actually test that particular
attribute.
2016-08-18 14:05:14 +01:00
Mitchell Hashimoto 31dbddbfdc
providers/azurerm: more reliable testing of ID being available for
storage account
2016-08-16 09:49:54 -07:00