Commit Graph

389 Commits

Author SHA1 Message Date
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
Mitchell Hashimoto ecad167e31
providers/azurerm: address PR feedback 2016-08-16 09:42:05 -07:00
Mitchell Hashimoto 284725fa94
providers/azurerm: timeout storage account for an hour 2016-08-16 09:26:33 -07:00
Mitchell Hashimoto ccb972ae50
providers/azurerm: attempt to read storage account ID if cancelled 2016-08-16 09:18:00 -07:00
Mitchell Hashimoto 8dafcb36fd
providers/azurerm: cancellable storage account creation 2016-08-15 21:12:32 -07:00
Andy Royle e18b1962a9 provider/azurerm: Add support for servicebus namespaces (#8195)
* add dep for servicebus client from azure-sdk-for-node

* add servicebus namespaces support

* add docs for servicebus_namespaces

* add Microsoft.ServiceBus to providers list
2016-08-15 18:00:00 +01:00
Dave Walter ec42a98cb2 Azure blob contents can be copied from an existing blob (#8126)
- adds "source_uri" field

- "source_uri" expects the URI to an existing blob that you have access
  to
- it can be in a different storage account, or in the Azure File service

- the docs have been updated to reflect the change

Signed-off-by: Dan Wendorf <dwendorf@pivotal.io>
2016-08-14 11:14:41 +01:00
Peter McAtominey e67f141561 provider/azurerm: create virtual_network_peering resource (#8168)
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMVirtualNetworkPeering -timeout 120m
=== RUN   TestAccAzureRMVirtualNetworkPeering_importBasic
--- PASS: TestAccAzureRMVirtualNetworkPeering_importBasic (225.50s)
=== RUN   TestAccAzureRMVirtualNetworkPeering_basic
--- PASS: TestAccAzureRMVirtualNetworkPeering_basic (216.95s)
=== RUN   TestAccAzureRMVirtualNetworkPeering_update
--- PASS: TestAccAzureRMVirtualNetworkPeering_update (266.97s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	709.545s
2016-08-13 22:37:46 +04:00
Peter McAtominey d7285d1b14 provider/azurerm: fix; add tests for importing traffic manager resources (#8111)
* provider/azurerm: add test for importing traffic manager profile resource

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMTrafficManagerProfile_import -timeout 120m
=== RUN   TestAccAzureRMTrafficManagerProfile_importBasic
--- PASS: TestAccAzureRMTrafficManagerProfile_importBasic (84.50s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	84.722s

* provider/azurerm: fix; add test for importing traffic_manager_endpoint resource

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMTrafficManagerEndpoint -timeout 120m
=== RUN   TestAccAzureRMTrafficManagerEndpoint_importBasic
--- PASS: TestAccAzureRMTrafficManagerEndpoint_importBasic (130.66s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_basic
--- PASS: TestAccAzureRMTrafficManagerEndpoint_basic (152.87s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_basicDisableExternal
--- PASS: TestAccAzureRMTrafficManagerEndpoint_basicDisableExternal (151.55s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_updateWeight
--- PASS: TestAccAzureRMTrafficManagerEndpoint_updateWeight (199.33s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_updatePriority
--- PASS: TestAccAzureRMTrafficManagerEndpoint_updatePriority (113.15s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_nestedEndpoints
--- PASS: TestAccAzureRMTrafficManagerEndpoint_nestedEndpoints (97.05s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	844.740s
2016-08-11 16:00:23 +12:00
Peter McAtominey 012fd9825f provider/azurerm: refactor traffic_manager_ resources to use validation helpers
Updated:
	traffic_manager_profile
	traffic_manager_endpoint
2016-08-10 14:48:20 +01:00
Ryan Moran 85b551a934 Adds support for uploading blobs to azure storage from local source
- adds "source", "parallelism", and "attempts" fields
- supports both block and page type blobs
- uploads run concurrently
- page blobs skip empty byte ranges to efficiently upload large sparse
  files

- "source" expects an absolute path to a file on the local file
  system
- "parallelism" expects an integer value that indicates the number of
  workers per CPU core to run for concurrent uploads
- "attempts" expects an integer value for number of attempts to make per
  page or block when uploading

Signed-off-by: Raina Masand <rmasand@pivotal.io>
2016-08-04 16:08:30 -07:00
Peter McAtominey cc18e4d7ca provider/azurerm: add traffic manager resources (#7826)
* provider/azurerm: vendor arm/trafficmanager package

* provider/azurerm: add azurerm_traffic_manager_profile resource

* provider/azurerm: add azurerm_traffic_manager_endpoint resource

* provider/azurerm: document traffic manager resources

* provider/azurerm: use short type argument for traffic manager endpoint

The resource now takes the short type for example azureEndpoints instead of the
long form Microsoft.Network/TrafficManagerProfiles/azureEndpoints.

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMTrafficManagerEndpoint -timeout 120m
=== RUN   TestAccAzureRMTrafficManagerEndpoint_basic
--- PASS: TestAccAzureRMTrafficManagerEndpoint_basic (179.72s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_basicDisableExternal
--- PASS: TestAccAzureRMTrafficManagerEndpoint_basicDisableExternal (171.36s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_updateWeight
--- PASS: TestAccAzureRMTrafficManagerEndpoint_updateWeight (167.24s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_updatePriority
--- PASS: TestAccAzureRMTrafficManagerEndpoint_updatePriority (192.91s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_nestedEndpoints
--- PASS: TestAccAzureRMTrafficManagerEndpoint_nestedEndpoints (111.18s)
PASS
ok   github.com/hashicorp/terraform/builtin/providers/azurerm    822.534s
```

* provider/azurerm: remove unnecesary dereferences in traffic manager resources

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMTrafficManager -timeout 120m
=== RUN   TestAccAzureRMTrafficManagerEndpoint_basic
--- PASS: TestAccAzureRMTrafficManagerEndpoint_basic (176.08s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_basicDisableExternal
--- PASS: TestAccAzureRMTrafficManagerEndpoint_basicDisableExternal (172.28s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_updateWeight
--- PASS: TestAccAzureRMTrafficManagerEndpoint_updateWeight (148.97s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_updatePriority
--- PASS: TestAccAzureRMTrafficManagerEndpoint_updatePriority (101.18s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_nestedEndpoints
--- PASS: TestAccAzureRMTrafficManagerEndpoint_nestedEndpoints (88.33s)
=== RUN   TestAccAzureRMTrafficManagerProfile_weighted
--- PASS: TestAccAzureRMTrafficManagerProfile_weighted (80.92s)
=== RUN   TestAccAzureRMTrafficManagerProfile_performance
--- PASS: TestAccAzureRMTrafficManagerProfile_performance (82.98s)
=== RUN   TestAccAzureRMTrafficManagerProfile_priority
--- PASS: TestAccAzureRMTrafficManagerProfile_priority (81.07s)
=== RUN   TestAccAzureRMTrafficManagerProfile_withTags
--- PASS: TestAccAzureRMTrafficManagerProfile_withTags (102.50s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	1034.458s
```
2016-07-31 23:46:15 +01:00
Paul Stack c3ec9c7948 provider/azurerm: `azurerm_storage_blob` validation fix (#7328)
The validation for the `azurerm_storage_blob` `type` parameter was
checking for `blob` where it should have been `block`

This commits fixes it up

```
make testacc TEST=./builtin/providers/azurerm
TESTARGS='-run=TestResourceAzureRMStorageBlobType_validation'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestResourceAzureRMStorageBlobType_validation -timeout 120m
=== RUN   TestResourceAzureRMStorageBlobType_validation
--- PASS: TestResourceAzureRMStorageBlobType_validation (0.00s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
0.014s
```
2016-07-28 13:32:40 +01:00
Paul Stack 630de403ce provider/azurerm: Wait for `azurerm_storage_account` to be available (#7329)
Fixes #7005 where a container tried to provision *before* the storage
account was available. We now wait for the Storage Account to be in the
`Succeeded` state before returning

```
make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMStorageAccount_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMStorageAccount_ -timeout 120m
=== RUN   TestAccAzureRMStorageAccount_basic
--- PASS: TestAccAzureRMStorageAccount_basic (163.68s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
163.695s
```
2016-07-27 22:57:02 +01:00
Paul Stack 61c5c9f56b provider/azurerm: `azurerm_storage_table` resource (#7327)
* provider/azurerm: `azurerm_storage_table` resource

Fixes #7257

``````

* Update resource_arm_storage_table.go

* Update resource_arm_storage_table.go
2016-07-27 22:49:43 +01:00
Paul Stack 390e1acb3c provider/azurerm: Change of `availability_set_id` on (#7650)
`azurerm_virtual_machine` should ForceNew

Fixes #6873

```
make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMVirtualMachine_ChangeAvailbilitySet'
==> 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=TestAccAzureRMVirtualMachine_ChangeAvailbilitySet -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_ChangeAvailbilitySet
--- PASS: TestAccAzureRMVirtualMachine_ChangeAvailbilitySet (976.35s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
976.367s
```
2016-07-27 22:39:03 +01:00
Peter McAtominey 1c13cc994b provider/azurerm: add option to delete VMs Data disks on termination (#7793)
```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMVirtualMachine_deleteVHD -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_deleteVHDOptOut
--- PASS: TestAccAzureRMVirtualMachine_deleteVHDOptOut (621.84s)
=== RUN   TestAccAzureRMVirtualMachine_deleteVHDOptIn
--- PASS: TestAccAzureRMVirtualMachine_deleteVHDOptIn (623.95s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	1245.930s
```
2016-07-25 17:57:02 +01:00
James Bardin f66d1a10a4 Add VersionString
We conditionally format version with VersionPrerelease in a number of
places. Add a package-level function where we can unify the version
format. Replace most of version formatting in terraform, but leave th
few instances set from the top-level package to make sure we don't break
anything before release.
2016-07-21 16:43:49 -04:00
Paul Stack af4cc20ec0 provider/azurerm: `azurerm_virtual_machine` computer_name now Required (#7308)
Fixes #7299 where it was found that computer_name is not optional (as
the msdn documentation states)

```
make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMVirtualMachine_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v -run=TestAccAzureRMVirtualMachine_ -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_basicLinuxMachine
--- PASS: TestAccAzureRMVirtualMachine_basicLinuxMachine (403.53s)
=== RUN   TestAccAzureRMVirtualMachine_tags
--- PASS: TestAccAzureRMVirtualMachine_tags (488.46s)
=== RUN   TestAccAzureRMVirtualMachine_updateMachineSize
--- PASS: TestAccAzureRMVirtualMachine_updateMachineSize (601.82s)
=== RUN   TestAccAzureRMVirtualMachine_basicWindowsMachine
--- PASS: TestAccAzureRMVirtualMachine_basicWindowsMachine (646.75s)
=== RUN   TestAccAzureRMVirtualMachine_windowsUnattendedConfig
--- PASS: TestAccAzureRMVirtualMachine_windowsUnattendedConfig (891.42s)
=== RUN   TestAccAzureRMVirtualMachine_winRMConfig
--- PASS: TestAccAzureRMVirtualMachine_winRMConfig (768.73s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	3800.734s
```
2016-07-20 20:03:54 +01:00
Peter McAtominey c9138daacc provider/azurerm: dump entire Request/Response in autorest Decorator (#7719) 2016-07-20 20:02:40 +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
shanoor d9e3beb276 azurerm_storage_account now returns storage keys value instead of their names (#7674) 2016-07-16 14:36:15 +01:00
James Nugent 63a8c53796 Merge pull request #7646 from hashicorp/b-arm-forcenew-computername
provider/azurerm: Change of `azurerm_virtual_machine` computer_name now ForceNew
2016-07-14 13:31:16 -06:00
James Nugent 3f80eb40ee Merge pull request #7630 from hashicorp/import-arm-nsr
provider/azurerm: Support Import `azurerm_network_security_rule`
2016-07-14 13:29:49 -06:00
Peter McAtominey 0fde61b9ab provider/azurerm: catch azurerm_template_deployment errors (#7644)
The error was ignored causing Terraform to report that the deployments was
successful rather than in a bad state. This commit cause the apply operation
to report the error.

Added a test which attempts to create a storage account with a name longer
than the maximum permitted length to force a failure.

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMTemplateDeployment_ -timeout 120m
=== RUN   TestAccAzureRMTemplateDeployment_basic
--- PASS: TestAccAzureRMTemplateDeployment_basic (377.78s)
=== RUN   TestAccAzureRMTemplateDeployment_withParams
--- PASS: TestAccAzureRMTemplateDeployment_withParams (327.89s)
=== RUN   TestAccAzureRMTemplateDeployment_withError
--- PASS: TestAccAzureRMTemplateDeployment_withError (226.64s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	932.440s
```
2016-07-14 16:06:58 +01:00
stack72 33233be247
provider/azurerm: Change of `azurerm_virtual_machine` computer_name now
ForceNew

```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMVirtualMachine_ChangeComputerName'
==> 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=TestAccAzureRMVirtualMachine_ChangeComputerName -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_ChangeComputerName
--- PASS: TestAccAzureRMVirtualMachine_ChangeComputerName (965.04s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
965.051s
```
2016-07-14 15:48:41 +01:00
Peter McAtominey 324e78020d provider/azurerm: fix tests removed in c141050929 (#7640)
The tests were removed due to a nil pointer panic in
testCheckAzureRMVirtualMachineOSDiskVHDExistance when the storage account itself
had been deleted in the destroy stage

Added a test to cover opting out of VHD delete rather than polluting the basic
linux VM test.

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMVirtualMachine_deleteVHDOpt -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_deleteVHDOptOut
--- PASS: TestAccAzureRMVirtualMachine_deleteVHDOptOut (731.54s)
=== RUN   TestAccAzureRMVirtualMachine_deleteVHDOptIn
--- PASS: TestAccAzureRMVirtualMachine_deleteVHDOptIn (590.87s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	1322.529s
```

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMVirtualMachine_basicLinuxMachine -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_basicLinuxMachine
^[--- PASS: TestAccAzureRMVirtualMachine_basicLinuxMachine (587.63s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	587.738s
```
2016-07-14 14:20:42 +01:00
stack72 c141050929
provider/azurerm: Remove tests for delete_on_termination 2016-07-14 08:33:30 +01:00
Peter McAtominey 37e3aa9d8c provider/azurerm: destroy azurerm_virtual_machine OS Disk VHD on deletion (#7584)
* provider/azurerm: destroy azurerm_virtual_machine OS Disk VHD on deletion

The OS Disk previously wasn't deleted with the VM, this causes subsequent
apply operations which recreate the VM to fail as the VHD blob already exists.

Fixes #6610

* provider/azurerm: add delete_os_disk_on_termination to azurerm_virtual_machine

delete_os_disk_on_termination is a bool which defaults to false to avoid making
a breaking change, and to follow the same flow as the Azure API
2016-07-13 23:52:20 +01:00
stack72 0cfb9b15f6
provider/azurerm: Support Import `azurerm_network_security_rule`
Soooo many missing fields not being set on the Read!

```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMNetworkSecurityRule_'
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/07/13 21:34:24 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMNetworkSecurityRule_ -timeout 120m
=== RUN   TestAccAzureRMNetworkSecurityRule_importBasic
--- PASS: TestAccAzureRMNetworkSecurityRule_importBasic (208.10s)
=== RUN   TestAccAzureRMNetworkSecurityRule_basic
--- PASS: TestAccAzureRMNetworkSecurityRule_basic (190.66s)
=== RUN   TestAccAzureRMNetworkSecurityRule_addingRules
--- PASS: TestAccAzureRMNetworkSecurityRule_addingRules (256.73s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
655.514s
```
2016-07-13 21:44:28 +01:00
James Nugent ecdc5065bf Merge pull request #7620 from hashicorp/import-arm-dnszone
provider/azurerm: Support Import for `azurerm_dns_zone`
2016-07-13 09:43:05 -06:00
James Nugent 1f136a73e6 Merge pull request #7621 from hashicorp/import-arm-sa
provider/azurerm: Support Import `azurerm_storage_account`
2016-07-13 09:42:47 -06:00
James Nugent 79d0c22360 Merge pull request #7624 from hashicorp/import-arm-vnet
provider/azurerm: Support Import of `azurerm_virtual_network`
2016-07-13 09:42:32 -06:00
James Nugent e506213cc8 Merge pull request #7625 from hashicorp/import-arm-sqlfirewall_rule
provider/azurerm: Support Import of `azurerm_sql_firewall_rule`
2016-07-13 09:42:12 -06:00
James Nugent 25c786898f Merge pull request #7626 from hashicorp/import-arm-lng
provider/azurerm: Support Import `azurerm_local_network_gateway`
2016-07-13 09:41:59 -06:00
stack72 c0f14840f3
provider/azurerm: Support Import of `azurerm_network_security_group`
```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMNetworkSecurityGroup_'
==> 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=TestAccAzureRMNetworkSecurityGroup_ -timeout 120m
=== RUN   TestAccAzureRMNetworkSecurityGroup_importBasic
--- PASS: TestAccAzureRMNetworkSecurityGroup_importBasic (148.03s)
=== RUN   TestAccAzureRMNetworkSecurityGroup_basic
--- PASS: TestAccAzureRMNetworkSecurityGroup_basic (143.72s)
=== RUN   TestAccAzureRMNetworkSecurityGroup_withTags
--- PASS: TestAccAzureRMNetworkSecurityGroup_withTags (180.05s)
=== RUN   TestAccAzureRMNetworkSecurityGroup_addingExtraRules
--- PASS: TestAccAzureRMNetworkSecurityGroup_addingExtraRules (236.28s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
708.099s
```
2016-07-13 13:42:50 +01:00
stack72 bab8032058
provider/azurerm: Support Import `azurerm_local_network_gateway`
```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMLocalNetworkGateway_'
==> 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=TestAccAzureRMLocalNetworkGateway_ -timeout 120m
=== RUN   TestAccAzureRMLocalNetworkGateway_importBasic
--- PASS: TestAccAzureRMLocalNetworkGateway_importBasic (137.98s)
=== RUN   TestAccAzureRMLocalNetworkGateway_basic
--- PASS: TestAccAzureRMLocalNetworkGateway_basic (128.17s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
266.169s
```
2016-07-13 13:14:59 +01:00
stack72 5cd908e748
provider/azurerm: Support Import of `azurerm_sql_firewall_rule`
```
% make testacc TEST=./builtin/providers/azurerm  TESTARGS='-run=TestAccAzureRMSqlFirewallRule_'
==> 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=TestAccAzureRMSqlFirewallRule_ -timeout 120m
=== RUN   TestAccAzureRMSqlFirewallRule_importBasic
--- PASS: TestAccAzureRMSqlFirewallRule_importBasic (146.88s)
=== RUN   TestAccAzureRMSqlFirewallRule_basic
--- PASS: TestAccAzureRMSqlFirewallRule_basic (154.34s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
301.231s
```
2016-07-13 12:53:24 +01:00
stack72 dc9dc74026
provider/azurerm: Support Import of `azurerm_virtual_network`
```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMVirtualNetwork_'
==> 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=TestAccAzureRMVirtualNetwork_ -timeout 120m
=== RUN   TestAccAzureRMVirtualNetwork_importBasic
--- PASS: TestAccAzureRMVirtualNetwork_importBasic (129.61s)
=== RUN   TestAccAzureRMVirtualNetwork_basic
--- PASS: TestAccAzureRMVirtualNetwork_basic (128.37s)
=== RUN   TestAccAzureRMVirtualNetwork_withTags
--- PASS: TestAccAzureRMVirtualNetwork_withTags (151.55s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
409.541s
```
2016-07-13 12:32:34 +01:00
stack72 ddf8cde450
provider/azurerm: Support Import `azurerm_storage_account`
Also included the randomizing of the storage account and resource group
names

```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMStorageAccount_'
==> 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=TestAccAzureRMStorageAccount_ -timeout 120m
=== RUN   TestAccAzureRMStorageAccount_importBasic
--- PASS: TestAccAzureRMStorageAccount_importBasic (141.66s)
=== RUN   TestAccAzureRMStorageAccount_basic
--- PASS: TestAccAzureRMStorageAccount_basic (160.18s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
301.852s
```
2016-07-13 12:08:44 +01:00
stack72 b4051d0b98
provider/azurerm: Support Import for `azurerm_dns_zone`
```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMDnsZone_'
==> 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=TestAccAzureRMDnsZone_ -timeout 120m
=== RUN   TestAccAzureRMDnsZone_importBasic
--- PASS: TestAccAzureRMDnsZone_importBasic (88.68s)
=== RUN   TestAccAzureRMDnsZone_basic
--- PASS: TestAccAzureRMDnsZone_basic (93.18s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
181.874s
```
2016-07-13 11:43:05 +01:00
James Nugent 29c1d36cf4 Merge pull request #7571 from hashicorp/import-arm-availset
provider/azurerm: Support Import for `azurerm_availability_set`
2016-07-11 10:35:52 -06:00
James Nugent 4798b13937 Merge pull request #7574 from hashicorp/import-arm-rg
provider/azurerm: Support Import of `azurerm_resource_group`
2016-07-11 10:35:41 -06:00
stack72 c9476ea65b
provider/azurerm: Support Import for `azurerm_public_ip`
Had to make some changes to this resource. Params were not being set in
the Read func - also added a statefunc to the IPAddressAllocation as
that was coming back in a different case to how we were sending it. We
need to treat that property as case-insensitive

```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMPublicIpStatic_'
==> 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=TestAccAzureRMPublicIpStatic_ -timeout 120m
=== RUN   TestAccAzureRMPublicIpStatic_importBasic
--- PASS: TestAccAzureRMPublicIpStatic_importBasic (128.06s)
=== RUN   TestAccAzureRMPublicIpStatic_basic
--- PASS: TestAccAzureRMPublicIpStatic_basic (126.25s)
=== RUN   TestAccAzureRMPublicIpStatic_withTags
--- PASS: TestAccAzureRMPublicIpStatic_withTags (145.99s)
=== RUN   TestAccAzureRMPublicIpStatic_update
--- PASS: TestAccAzureRMPublicIpStatic_update (192.32s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
592.648s
```
2016-07-11 14:36:23 +01:00
Paul Stack f989009448 Update import_arm_resource_group_test.go 2016-07-11 13:33:39 +01:00
stack72 ef707a89a8
provider/azurerm: Support Import of `azurerm_resource_group`
```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMResourceGroup_'
==> 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=TestAccAzureRMResourceGroup_ -timeout 120m
=== RUN   TestAccAzureRMResourceGroup_importBasic
--- PASS: TestAccAzureRMResourceGroup_importBasic (92.84s)
=== RUN   TestAccAzureRMResourceGroup_basic
--- PASS: TestAccAzureRMResourceGroup_basic (91.56s)
=== RUN   TestAccAzureRMResourceGroup_withTags
--- PASS: TestAccAzureRMResourceGroup_withTags (110.42s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
294.832s
```
2016-07-11 12:30:22 +01:00
stack72 f78f0434cd
provider/azurerm: Support Import for `azurerm_availability_set`
```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMAvailabilitySet_'
==> 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=TestAccAzureRMAvailabilitySet_ -timeout 120m
=== RUN   TestAccAzureRMAvailabilitySet_importBasic
--- PASS: TestAccAzureRMAvailabilitySet_importBasic (150.75s)
=== RUN   TestAccAzureRMAvailabilitySet_basic
--- PASS: TestAccAzureRMAvailabilitySet_basic (103.37s)
=== RUN   TestAccAzureRMAvailabilitySet_withTags
--- PASS: TestAccAzureRMAvailabilitySet_withTags (137.65s)
=== RUN   TestAccAzureRMAvailabilitySet_withDomainCounts
--- PASS: TestAccAzureRMAvailabilitySet_withDomainCounts (88.78s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
480.564s
```
2016-07-10 22:33:02 +01:00
Paul Stack 421bda23b0 provider/azurerm: `azurerm_virtual_machine` panic at UnattendConfig (#7453)
Guarding against `invalid memory address` in AdditionalUnattendConfig

```
make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMVirtualMachine_windowsUnattendedConfig'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMVirtualMachine_windowsUnattendedConfig -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_windowsUnattendedConfig
--- PASS: TestAccAzureRMVirtualMachine_windowsUnattendedConfig (943.28s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
943.299s
```
2016-07-03 11:31:35 +01:00
Paul Stack c965d9bea4 provider/azurerm: Add `azurerm_virtual_machine` Acceptance Test for (#7456)
`storage_data_disk`

```
make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMVirtualMachine_withDataDisk'
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/07/01 15:47:13 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMVirtualMachine_withDataDisk -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_withDataDisk
--- PASS: TestAccAzureRMVirtualMachine_withDataDisk (575.39s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
```
2016-07-02 07:55:36 +01:00
Paul Stack 7f948f0ca7 provider/azurerm: `azurerm_dns_zone` now returns `name_servers` (#7434)
Fixes #7374

The introduction of the AzureRM SDK 3.0.0-beta means that the
`name_servers` for the DNS Zone are returned from the API

This PR has a dependency on #7420 being merged first

```
make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMDnsZone_'
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/30 15:20:01 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMDnsZone_ -timeout 120m
=== RUN   TestAccAzureRMDnsZone_basic
--- PASS: TestAccAzureRMDnsZone_basic (92.42s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
92.444s
```
2016-07-01 10:26:01 +01:00
Paul Stack 079e1f9a56 provider/azurerm: Bump azure-sdk-for-go to 3.0.0-beta (#7420)
provider/azurerm: Bump azure-sdk-for-go to 3.0.0-beta
2016-06-30 15:36:08 +01:00
stack72 804f5e1288 provider/azurerm: `azurerm_network_security_group` now polls for State
succeeded

This fixes #7122 where the SG was not fully configured before a
dependant service was created

```
make testacc TEST=./builtin/providers/azurerm
TESTARGS='-run=TestAccAzureRMNetworkSecurityGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMNetworkSecurityGroup_ -timeout 120m
=== RUN   TestAccAzureRMNetworkSecurityGroup_basic
--- PASS: TestAccAzureRMNetworkSecurityGroup_basic (128.93s)
=== RUN   TestAccAzureRMNetworkSecurityGroup_withTags
--- PASS: TestAccAzureRMNetworkSecurityGroup_withTags (164.52s)
=== RUN   TestAccAzureRMNetworkSecurityGroup_addingExtraRules
--- PASS: TestAccAzureRMNetworkSecurityGroup_addingExtraRules (178.20s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
471.677s
```
2016-06-23 23:32:34 +01:00
stack72 e57ee0a067 provider/azurerm: Change `azurerm_virtual_machine` to use MaxItems
There were lots of hacky checks in the ARM VM resource to check for a
length of 1 param block

MaxItems was introduced so this PR updates to use MaxItems
2016-06-13 13:25:32 +02:00
Paul Stack ab721e2ffc provider/azurerm: Fix `azurerm_virtual_machine` windows_config (#7123)
When using winrm config block, we had an address issue. This is no
longer a set but a list (As a list fits it more approp)

    ```
    make testacc TEST=./builtin/providers/azurerm
    TESTARGS='-run=TestAccAzureRMVirtualMachine_'
    ==> Checking that code complies with gofmt requirements...
    go generate $(go list ./... | grep -v /vendor/)
    TF_ACC=1 go test ./builtin/providers/azurerm -v
    -run=TestAccAzureRMVirtualMachine_ -timeout 120m
    === RUN   TestAccAzureRMVirtualMachine_basicLinuxMachine
    --- PASS: TestAccAzureRMVirtualMachine_basicLinuxMachine (587.80s)
    === RUN   TestAccAzureRMVirtualMachine_tags
    --- PASS: TestAccAzureRMVirtualMachine_tags (554.53s)
    === RUN   TestAccAzureRMVirtualMachine_updateMachineSize
    --- PASS: TestAccAzureRMVirtualMachine_updateMachineSize (612.52s)
    === RUN   TestAccAzureRMVirtualMachine_basicWindowsMachine
    --- PASS: TestAccAzureRMVirtualMachine_basicWindowsMachine (765.90s)
    === RUN   TestAccAzureRMVirtualMachine_windowsUnattendedConfig
    --- PASS: TestAccAzureRMVirtualMachine_windowsUnattendedConfig
    (770.53s)
    === RUN   TestAccAzureRMVirtualMachine_winRMConfig
    --- PASS: TestAccAzureRMVirtualMachine_winRMConfig (827.90s)
    PASS
    ok      github.com/hashicorp/terraform/builtin/providers/azurerm
    4119.192s
    ```
2016-06-11 13:28:18 +02:00
Paul Stack b4ed5dfba3 provider/azurerm: VMSS Tests still used old naming convention (#7121) 2016-06-11 10:12:20 +02:00
Paul Stack 514d8422f3 provider/azurerm: Add `azurerm_virtual_machine_scale_set` resource (#6711) 2016-06-11 00:37:14 +02:00
Paul Stack 5644545680 provider/azurerm: DNS CNAME resource wasn't posting records (#7113)
* provider/azurerm: DNS CNAME resource wasn't posting records

Azure changed the API for CNAME at some point and since then we haven't
been creating CNAME records. The API changes from []records to a single
record

This PR changes the schema for dns cnames to have a record parameter and
adds a deprecation warning around records. Talked with @jen20 on this
and we decided that it's currently broken and we should handle this as
part of 0.7 where there are other breaking changes

```
TF_LOG=1 make testacc TEST=./builtin/providers/azurerm
TESTARGS='-run=TestAccAzureRMDnsCNameRecord' 2>~/tf.log
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMDnsCNameRecord -timeout 120m
=== RUN   TestAccAzureRMDnsCNameRecord_basic
--- PASS: TestAccAzureRMDnsCNameRecord_basic (97.22s)
=== RUN   TestAccAzureRMDnsCNameRecord_subdomain
--- PASS: TestAccAzureRMDnsCNameRecord_subdomain (94.94s)
=== RUN   TestAccAzureRMDnsCNameRecord_updateRecords
--- PASS: TestAccAzureRMDnsCNameRecord_updateRecords (116.62s)
```

* Change DNS Records to removed rather than deprecated
2016-06-10 23:53:32 +02:00
Paul Hinze 81a436e956 Merge pull request #7105 from hashicorp/b-arm-vm-winconfig
provider/azurerm: `azurerm_virtual_machine` Windows_config
2016-06-10 16:17:09 -05:00
stack72 155a47fa80 provider/azurerm: `azurerm_virtual_machine` Windows_config
Fixes #7053 where, when using `additional_unattend_config` in
`os_profile_windows_config` we got an error as follows:

```
azurerm_virtual_machine.test: [DEBUG] Error setting Virtual Machine
Storage OS Profile Windows Configuration: &errors.errorString{s:"Invalid
address to set: []string{\"os_profile_windows_config\", \"1534614206\",
\"additional_unattend_config\"}"}
```
2016-06-10 19:33:09 +01:00
clint shryock fad26ec59e provider tests: Update to match new tags map in state 2016-06-10 10:07:02 -05:00
Paul Stack 695633257e provider/azurerm: Fix up some small issues for a post SDK upgrade test (#6981)
issue
2016-06-02 12:59:33 +01:00
James Nugent 738f4bd777 provider/azurerm: Fix azurerm_virtual_machine 2016-06-01 19:52:57 -05:00
James Nugent 6ee2bd4a55 provider/azurerm: Fix CDN resources 2016-06-01 19:52:57 -05:00
James Nugent 0691c0eb91 provider/azurerm: Fix azurerm_template_deployment
Tests are too slow to run.
2016-06-01 19:52:56 -05:00
James Nugent 8ecfddf507 provider/azurerm: Fix azurerm_network_security_group_rule
```
HTTP_PROXY=http://localhost:8888 make testacc TEST=./builtin/providers/azurerm TESTARGS="-run TestAccAzureRMNetworkSecurityRule_"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/01 19:19:59 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMNetworkSecurityRule_ -timeout 120m
=== RUN   TestAccAzureRMNetworkSecurityRule_basic
--- PASS: TestAccAzureRMNetworkSecurityRule_basic (105.61s)
=== RUN   TestAccAzureRMNetworkSecurityRule_addingRules
--- PASS: TestAccAzureRMNetworkSecurityRule_addingRules (141.59s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm    247.221s
```
2016-06-01 19:52:56 -05:00
James Nugent 2f66747e79 provider/azurerm: Fix azurerm_network_security_group
```
HTTP_PROXY=http://localhost:8888 make testacc TEST=./builtin/providers/azurerm TESTARGS="-run TestAccAzureRMNetworkSecurityGroup_"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/01 19:09:36 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMNetworkSecurityGroup_ -timeout 120m
=== RUN   TestAccAzureRMNetworkSecurityGroup_basic
--- PASS: TestAccAzureRMNetworkSecurityGroup_basic (81.00s)
=== RUN   TestAccAzureRMNetworkSecurityGroup_withTags
--- PASS: TestAccAzureRMNetworkSecurityGroup_withTags (101.89s)
=== RUN   TestAccAzureRMNetworkSecurityGroup_addingExtraRules
--- PASS: TestAccAzureRMNetworkSecurityGroup_addingExtraRules (99.33s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	282.240s
```
2016-06-01 19:52:56 -05:00
James Nugent 0e3da1f98c provider/azurerm: Fix azurerm_local_network_gateway
```
HTTP_PROXY=http://localhost:8888 make testacc TEST=./builtin/providers/azurerm TESTARGS="-run TestAccAzureRMLocalNetworkGateway_"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/01 18:59:05 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMLocalNetworkGateway_ -timeout 120m
=== RUN   TestAccAzureRMLocalNetworkGateway_basic
--- PASS: TestAccAzureRMLocalNetworkGateway_basic (95.25s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm    95.260s
```
2016-06-01 19:52:56 -05:00
James Nugent bde2c502b6 provider/azurerm: Fix azurerm_network_interface_card
```
HTTP_PROXY=http://localhost:8888 make testacc TEST=./builtin/providers/azurerm TESTARGS="-run TestAccAzureRMNetworkInterface"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/01 18:46:41 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMNetworkInterface -timeout 120m
=== RUN   TestAccAzureRMNetworkInterface_basic
--- PASS: TestAccAzureRMNetworkInterface_basic (118.72s)
=== RUN   TestAccAzureRMNetworkInterface_enableIPForwarding
--- PASS: TestAccAzureRMNetworkInterface_enableIPForwarding (123.44s)
=== RUN   TestAccAzureRMNetworkInterface_withTags
--- PASS: TestAccAzureRMNetworkInterface_withTags (139.62s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm    381.802s
```
2016-06-01 19:52:56 -05:00
James Nugent a9b9986e76 provider/azurerm: Fix azurerm_route
```
HTTP_PROXY=http://localhost:8888 make testacc TEST=./builtin/providers/azurerm TESTARGS="-run TestAccAzureRMRoute_"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/01 18:28:38 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMRoute_ -timeout 120m
=== RUN   TestAccAzureRMRoute_basic
--- PASS: TestAccAzureRMRoute_basic (98.80s)
=== RUN   TestAccAzureRMRoute_multipleRoutes
--- PASS: TestAccAzureRMRoute_multipleRoutes (130.77s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm    229.584s
```
2016-06-01 19:52:56 -05:00
James Nugent 9b9ec7bb6c provider/azurerm: Fix azurerm_route_table
```
HTTP_PROXY=http://localhost:8888 make testacc TEST=./builtin/providers/azurerm TESTARGS="-run TestAccAzureRMRouteTable"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/01 18:19:00 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMRouteTable -timeout 120m
=== RUN   TestAccAzureRMRouteTable_basic
--- PASS: TestAccAzureRMRouteTable_basic (76.52s)
=== RUN   TestAccAzureRMRouteTable_withTags
--- PASS: TestAccAzureRMRouteTable_withTags (92.15s)
=== RUN   TestAccAzureRMRouteTable_multipleRoutes
--- PASS: TestAccAzureRMRouteTable_multipleRoutes (98.14s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm 266.828s
```
2016-06-01 19:52:56 -05:00
James Nugent 5f45521795 provider/azurerm: Fix azurerm_storage_container
```
HTTP_PROXY=http://localhost:8888 make testacc TEST=./builtin/providers/azurerm TESTARGS="-run TestAccAzureRMStorageContainer"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/01 18:10:56 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMStorageContainer -timeout 120m
=== RUN   TestAccAzureRMStorageContainer_basic
--- PASS: TestAccAzureRMStorageContainer_basic (102.16s)
=== RUN   TestAccAzureRMStorageContainer_disappears
--- PASS: TestAccAzureRMStorageContainer_disappears (101.05s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm 203.221s
```
2016-06-01 19:52:56 -05:00
James Nugent 26e2c9bec2 provider/azurerm: Fix azurerm_storage_account
```
HTTP_PROXY=http://localhost:8888 make testacc TEST=./builtin/providers/azurerm TESTARGS="-run TestAccAzureRMStorageAccount"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/01 18:05:12 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMStorageAccount -timeout 120m
=== RUN   TestAccAzureRMStorageAccount_basic
--- PASS: TestAccAzureRMStorageAccount_basic (89.48s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm 89.491s
```
2016-06-01 19:52:56 -05:00
James Nugent 3831553c72 provider/azurerm: Fix azurerm_public_ip
```
HTTP_PROXY=http://localhost:8888 make testacc TEST=./builtin/providers/azurerm TESTARGS="-run TestAccAzureRMPublicIpStatic"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/01 17:09:54 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMPublicIpStatic -timeout 120m
=== RUN   TestAccAzureRMPublicIpStatic_basic
--- PASS: TestAccAzureRMPublicIpStatic_basic (101.00s)
=== RUN   TestAccAzureRMPublicIpStatic_withTags
--- PASS: TestAccAzureRMPublicIpStatic_withTags (125.13s)
=== RUN   TestAccAzureRMPublicIpStatic_update
--- PASS: TestAccAzureRMPublicIpStatic_update (128.66s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	354.802s
```
2016-06-01 19:52:56 -05:00
James Nugent 876d0269df provider/azurerm: Fix azurerm_subnet
```
make testacc TEST=./builtin/providers/azurerm TESTARGS="-run TestAccAzureRMSubnet"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/01 16:54:37 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMSubnet -timeout 120m
=== RUN   TestAccAzureRMSubnet_basic
--- PASS: TestAccAzureRMSubnet_basic (131.83s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
131.844s
```
2016-06-01 19:52:55 -05:00
James Nugent 36a204506f provider/azurerm: Fix azurerm_virtual_network
```
make testacc TEST=./builtin/providers/azurerm TESTARGS="-run TestAccAzureRMVirtualNetwork"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/01 16:19:17 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMVirtualNetwork -timeout 120m
=== RUN   TestAccAzureRMVirtualNetwork_basic
--- PASS: TestAccAzureRMVirtualNetwork_basic (206.36s)
=== RUN   TestAccAzureRMVirtualNetwork_withTags
--- PASS: TestAccAzureRMVirtualNetwork_withTags (289.05s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	495.422s
```
2016-06-01 19:52:55 -05:00
James Nugent 0769674c54 provider/azurerm: Use new library configuration
Most resources are commented out at this stage, as they require surgery
to make them work with the new world of the Azure SDK.
2016-06-01 19:52:55 -05:00
Paul Stack 1d6493f721 provider/azurerm: Remove storage containers and blobs when storage (#6855)
accounts are not found
2016-05-24 23:01:26 +01:00
Paul Stack d997b3fb5e provider/azurerm: Add support for storage container name validation (#6852) 2016-05-24 22:30:27 +01:00
James Nugent 3356acc1f7 Merge pull request #6790 from hashicorp/b-arm-nic-iphash
provider/azurerm: `azurerm_network_interface` diffs didn't match during apply
2016-05-20 16:56:12 -05:00
Paul Stack 2c8c587ca5 provider/azurerm: Add support for EnableIPForwarding to (#6807)
`azurerm_network_interface`

As requested in #6803

```

```
2016-05-20 22:43:18 +01:00
stack72 a869d2f8a9 provider/azurerm: `azurerm_network_interface` diffs didn't match during
apply

The IP COnfiguration block of `azurerm_network_interface` didn't have a
hash created in a way that changes to the optional params were being
picked up:

```
~ azurerm_network_interface.test
    ip_configuration.273485505.name:                                       "testconfiguration1" => ""
    ip_configuration.273485505.private_ip_address_allocation:              "dynamic" => ""
    ip_configuration.273485505.subnet_id:                                  "/subscriptions/34ca515c-4629-458e-bf7c-738d77e0d0ea/resourceGroups/acctestrg/providers/Microsoft.Network/virtualNetworks/acctvn/subnets/acctsub" => ""
    ip_configuration.~273485505.load_balancer_backend_address_pools_ids.#: "" => "<computed>"
    ip_configuration.~273485505.load_balancer_inbound_nat_rules_ids.#:     "" => "<computed>"
    ip_configuration.~273485505.name:                                      "" => "testconfiguration1"
    ip_configuration.~273485505.private_ip_address:                        "" => "<computed>"
    ip_configuration.~273485505.private_ip_address_allocation:             "" => "dynamic"
    ip_configuration.~273485505.public_ip_address_id:                      "" => "${azurerm_public_ip.test.id}"
    ip_configuration.~273485505.subnet_id:                                 "" => "/subscriptions/34ca515c-4629-458e-bf7c-738d77e0d0ea/resourceGroups/acctestrg/providers/Microsoft.Network/virtualNetworks/acctvn/subnets/acctsub"
```

This caused the following error:

```
Error applying plan:

1 error(s) occurred:

* azurerm_network_interface.test: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue.

Please include the following information in your report:
```

Notice that the hash didn't change. This change adds the remaining optional params to the hash so that the hash id will change.

```
~ azurerm_network_interface.test
    ip_configuration.4255411321.load_balancer_backend_address_pools_ids.#: "" => "<computed>"
    ip_configuration.4255411321.load_balancer_inbound_nat_rules_ids.#:     "" => "<computed>"
    ip_configuration.4255411321.name:                                      "" => "testconfiguration1"
    ip_configuration.4255411321.private_ip_address:                        "" => "<computed>"
    ip_configuration.4255411321.private_ip_address_allocation:             "" => "dynamic"
    ip_configuration.4255411321.public_ip_address_id:                      "" => "/subscriptions/34ca515c-4629-458e-bf7c-738d77e0d0ea/resourceGroups/acctestrg/providers/Microsoft.Network/publicIPAddresses/public-ip"
    ip_configuration.4255411321.subnet_id:                                 "" => "/subscriptions/34ca515c-4629-458e-bf7c-738d77e0d0ea/resourceGroups/acctestrg/providers/Microsoft.Network/virtualNetworks/acctvn/subnets/acctsub"
    ip_configuration.966273186.name:                                       "testconfiguration1" => ""
    ip_configuration.966273186.private_ip_address_allocation:              "dynamic" => ""
    ip_configuration.966273186.subnet_id:                                  "/subscriptions/34ca515c-4629-458e-bf7c-738d77e0d0ea/resourceGroups/acctestrg/providers/Microsoft.Network/virtualNetworks/acctvn/subnets/acctsub" => ""
```

This allows the Update to work as expected :)

```
azurerm_network_interface.test: Modifications complete

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
```
2016-05-20 09:34:40 +01:00
Maxime Bury bd073c539e Fixes terraform crash when using SSH keys with Azure VMs (#6766) 2016-05-19 16:45:58 +01:00
Maxime Bury b33bd427e1 Normalizes availability_set_id to lowercase to avoid spurious diffs (#6768) 2016-05-19 16:44:29 +01:00
Paul Stack be0db001db provider/azurerm: Add support for exporting the (#6742)
`azurerm_storage_account` access keys

Please note that we do NOT have the ability to manage the access keys -
we are just getting the keys that the account creates for us. To manage
the keys, you would need to use the azure portal still
2016-05-18 16:31:43 +01:00
Paul Stack 8fce851878 provider/azurerm: Fixing Acceptance Test for VM tags (#6589) 2016-05-10 22:31:56 +01:00
Antoine Rouaze a105de19c0 [azurerm] Add os_type and image_uri in azurerm_virtual_machine (#6553)
Fix #6372

Partial fix of #6526
2016-05-09 18:51:19 +01:00
Paul Stack d3939db0a1 provider/azurerm: Adding support for `tags` to `azurerm_virtual_machine` (#6556)
provider/azurerm: Adding support for `tags` to `azurerm_virtual_machine`
2016-05-09 18:14:02 +01:00
Felivel Camilo 156d2916d8 Adding private ip address reference to azurerm network interface (#6538)
* Adding private ip address reference

* adding private ip address reference
* Updating the docs.

* Removing optional attrib from private_ip_address

Removing optional attribute from private_ip_address, this element is only being used in the read.

* Selecting the first element instead of using a loop for now.
Change this to a loop when https://github.com/Azure/azure-sdk-for-go/issues/259 is fixed
2016-05-09 15:21:15 +01:00
stack72 8dc47ac799 provider/azurerm: Error creating `azurerm_virtual_machine` data_disk
The `storage_data_disk` was trying to use vhd_url rather than vhd_uri.
This was causing an error on creating a new data_disk as part of a VM

Also added validation as data_disks can only be 1 - 1023 GB in size
2016-05-09 00:48:01 +01:00
stack72 712fc83a20 provider/azurerm: Fix an issue with `azurerm_virtual_machine` ssh_keys
ssh_keys were throwing an error similar to this:

```
* azurerm_virtual_machine.test: [DEBUG] Error setting Virtual Machine
* Storage OS Profile Linux Configuration: &errors.errorString{s:"Invalid
* address to set: []string{\"os_profile_linux_config\", \"0\",
* \"ssh_keys\"}"}
```

This was because of nesting of Set within a Set in the schema. By
changing this to a List within a Set, the schema works as expected. This
means we can now set SSH Keys on VMs. This has been tested using a
remote-exec and a connection block with the ssh key

```
azurerm_virtual_machine.test: Still creating... (2m10s elapsed)
azurerm_virtual_machine.test (remote-exec): Connected!
azurerm_virtual_machine.test (remote-exec): CONNECTED!
```
2016-05-08 22:51:51 +01:00
stack72 2e174ca3d4 provider/azurerm: Update `azurerm_virtual_machine` failed on
adminPassword

The Azure API never returns the AdminPAssword (as is correct) from the
Read API call. Therefore on Create, we do not set the AdminPassword of
the vm as part of the state. The Same func is used for Create & Update,
therefore when we changed anything on the VM, we were getting the
following error:

```
statusCode:Conflict
serviceRequestId:f498a6c8-6e7a-420f-9788-400f18078921
statusMessage:{"error":{"code":"PropertyChangeNotAllowed","target":"adminPassword","message":"Changing property 'adminPassword' is not allowed."}}
```

To fix this, we need to excldue the AdminPassword from the Update func
if it is empty
2016-05-06 23:44:03 +01:00
John Bresnahan 7a4bf6ae47 Azure does not allow CDN ports to be 0 (#6329)
The azure tests relating to cdn endpoints (TestAccAzureRMCdnEndpoint_basic
etc) are breaking because ARM is not accepting port values of 0.  The
following error is received:

statusCode:BadRequest
statusMessage:{"error":{"code":"BadRequest","message":"Invalid port \"0\". Port value must be a number between 1 and 65535."}}

This patch sets the ports for example.com to 443 and 80.
2016-04-25 19:15:14 +01:00
Felivel Camilo ae38ef2e01 provider/azurerm: Make ARM template timeout 40m
Template deployments with multiple extensions can last more than 10
minutes. Fixing that by increasing the timeout to 40 minutes.
2016-04-25 10:29:50 -05:00
James Nugent c90718d1ac provider/azurerm: Error on bad creds and speed++ (#6290)
This commit uses Riviera to register the Microsoft.Compute provider as a
canary for whether or not the Azure account credentials are set up. It
used to use the MS client, but that appeared to panic internally if the
credentials were bad. It's possible that we were using it wrong, but
there are no docs so ¯\_(ツ)_/¯.

As part of this, we parellelise the registration of the other providers.
This shaves the latency of each provider request times the number of
providers minus 1 off the "startup" time of the AzureRM provider. The
result is quite noticeable.
2016-04-22 00:50:47 +01:00
stack72 de4b0a9f00 provider/azurerm: Fix not removing azurerm_storage_account 404 from
state
2016-03-27 16:31:55 +01:00
stack72 6aa11e57e5 provider/azurerm: Fix a potential panic in the
`azurerm_template_deployment` resource
2016-03-21 19:50:30 +00:00
stack72 fe79dcf6c1 provider/azurerm: Add the documentation for the AzureRM Template
Deployment resource
2016-03-21 18:59:54 +00:00
stack72 a4cd5eeb2b provider/azurerm: Scaffold the Azure RM Template Deployment resource 2016-03-21 18:51:38 +00:00
stack72 4db3242c53 provider/azurerm: Scaffolding the AzureRM Virtual Machine Test framework 2016-03-17 15:08:59 +00:00
stack72 cb109043f2 Scaffold the Azure RM Virtual Machine resource 2016-03-17 15:08:59 +00:00
stack72 3eab9f2ff0 provider/azurerm: Add documentation for the `azurerm_search_service`
resource
2016-02-19 00:57:51 +00:00
James Nugent 17a7990708 provider/azurerm: Add generic state refresh func 2016-02-19 00:56:11 +00:00
stack72 0d750c16f0 provider/azurerm: Support `azurerm_search_service` resource 2016-02-19 00:56:09 +00:00
James Nugent d51bdd1772 provider/azurerm: Use Riviera for Resource Groups 2016-02-18 14:50:43 -08:00
stack72 584b52c34c provider/azurerm: Add `azurerm_sql_firewall_rule` resource 2016-02-08 21:13:59 +00:00
stack72 81b50330a1 provider/azurerm: Add `azurerm_dns_mx_record` resource 2016-02-07 22:26:56 +00:00
stack72 8ac4d2e080 provider/azurerm: Add `azurerm_dns_srv_record` resource 2016-02-07 21:49:02 +00:00
stack72 f9ffeae0f6 provider/azurerm: Add `azurerm_dns_ns_record` resource 2016-02-06 19:09:52 +00:00
stack72 37bc5a4c80 provider/azurerm: Add `azurerm_dns_txt_record` resource 2016-02-06 18:43:53 +00:00
stack72 6b5e5710c8 provider/azurerm: Add DNS CName Record Resource 2016-02-05 12:51:33 +00:00
stack72 1357f150a5 provider/azurerm: Add AzureRM AAAA DNS Record resource 2016-02-05 12:14:09 +00:00
stack72 761308cd2a provider/azurerm: Add the DNS A Record Resource 2016-02-05 11:28:48 +00:00
stack72 d89088246c provider/azurerm: Adding azurerm_sql_database resource 2016-02-04 23:36:50 +00:00
stack72 4ef557bed7 deps: Update jen20/riviera 2016-02-04 10:02:58 +00:00
stack72 f6bee13bd4 Scaffold the Sql Server AzureRM Resource 2016-02-03 23:08:56 +00:00
James Nugent 295bb897f2 provider/azurerm: Use separate "if" over "else if" 2016-02-03 13:16:36 -05:00
Paul Stack 1421d4ce18 provider/azurerm: Add `azurerm_dns_zone` resource
This resource is the first which makes use of the new Riviera library
(at https://github.com/jen20/riviera), so there is some additional set
up work to add the provider to the client which gets passed among
resources.
2016-02-02 19:53:00 -05:00
James Nugent f8a40ff371 provider/azurerm: Fix panic if no creds supplied
Using EnvDefaultFunc with a default of empty string causes the
validation which would ordinarily be performed by `Required: true` in
the schema to not have any effect. Instead validate the configuration
used to produce the ARM client before attempting to use it during
provider configuration.
2016-01-29 10:51:25 -05:00
stack72 8696854b51 Randomising the resource names in AzureRM acceptance tests. There is a potential issue that reusing names will cause the tests to be slower while we wait for old resources to go through GC 2016-01-29 12:48:11 +00:00
stack72 5a5c32e7d2 Azure RM Storage Queue:
Adds the schema, CRUD, acceptance tests and documentation for the
AzureRM storage Queue resource
2016-01-27 12:27:58 +00:00
stack72 e470ffd0be AzureRM storage container and blob tests and documentation 2016-01-27 00:23:57 +00:00
James Nugent 4a57ab4022 provider/azurerm: Add storage container and blob
These resources use ARM to get keys for the storage API, but then use
the storage REST API as per the ASM provider. The code is significantly
reworked with better logging and error handling. The key functions can
be reused for queues and file storage resources when they get added.
2016-01-26 15:45:18 -05:00
James Nugent 1b3908633c Merge pull request #4767 from monkeylittleinc/v0.6.9-branch
Add support for multiple final states on the WaitForState resource
2016-01-21 18:19:52 -05:00
stack72 eb6fd87a42 Fixing a flapping AzureRM PublicIP validation test 2016-01-21 20:59:30 +00:00
Ian Duffy 47ac10d66b Change resource.StateChangeConf to use an array for target states
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2016-01-21 01:20:41 +00:00
James Nugent 53c23511ef provider/azurerm: Add `azurerm_storage_account`
This is an unusual resource (so far) in that it cannot be created in one
call, and instead must be created and the modified to set some of the
parameters.

We use the pollIndefinitelyWhileNeeded function which will continue to
poll Azure RM operation monitoring endpoints until an error is reported
or the operation meets one of the given status codes. The function was
originally part of this feature but was separated out in order to
unblock other work.

Currently there is no support for the "custom_domain" section of the
storage account API. This was originally present and was later taken out
of the scope of the storage account resource in order that the following
workflow can be used:

1. Create storage account
2. Create DNS CNAME entry once the account name is known
3. Create custom domain mapping
2016-01-20 19:47:23 -05:00
stack72 d91c7080e0 Scaffold the AzureRM CDN Endpoint resource 2016-01-20 16:47:41 +00:00
James Nugent 734d5698d7 provider/azurerm: Poll indefinitely if no error
This adds a pollIndefinitelyWhileNeeded function which will continue to
poll Azure RM operation monitoring endpoints until an error is reported
or the operation meets one of the given status codes. This may need
revisiting at some point in the future.
2016-01-20 10:25:26 -05:00
stack72 183eb248df Scaffold the Azure RM CDN Profile 2016-01-19 17:37:28 +00:00
James Nugent c3ce8b81ef provider/azurerm: Parse "resourcegroups" in IDs
When parsing resource IDs (probably incorrectly since they are URIs and
should therefore be opaque), we need to look for "resourcegroups" in
addition to "resourceGroups" because the Azure CDN resources return that
in their URIs.

Unfortunately the casing semantics of the rest of the string are not
clear, so downcasing the entire URI is probably best avoided. This is a
fix for a single case.
2016-01-19 11:32:16 -05:00
stack72 a9afb489f6 Adds the ability to tag more of the Azure RM Network resources 2016-01-18 20:55:28 +00:00
stack72 2ebe2c01f1 Add acceptance tests and docs update to allow the tagging of AzureRM resource & 2016-01-18 18:35:41 +00:00
James Nugent 2ff0c65c3c provider/azurerm: Support tagging `azurerm_resource_group` 2016-01-18 13:13:28 -05:00
James Nugent d5e3db9deb provider/azurerm: Add tags to `azurerm_virtual_network` 2016-01-18 13:13:28 -05:00
stack72 d7a7eb4644 Adds an acceptance test to the ARM Availability Set to show that tagging
and updating of tags work as expected

Also updated the documentation for azure rm availability set to
demonstrate this
2016-01-18 17:47:37 +00:00
James Nugent a640ef9f16 provider/azurerm: Add tests for tag scaffolding 2016-01-18 12:28:04 -05:00
James Nugent f374ca77e7 provider/azurerm: Add scaffolding to tags 2016-01-18 11:48:01 -05:00
clint shryock 317ab83743 Go fmt updates 2016-01-12 16:07:26 -06:00
stack72 b1c8c30df3 Scaffold the Azure RM Route Resource 2016-01-10 15:02:48 +00:00
stack72 c1fa8392e3 Scaffold Azure RM Route Table resource 2016-01-10 02:47:20 +00:00
stack72 53714542f8 Scaffold the Azure RM Network Interface resource 2016-01-10 01:23:46 +00:00
stack72 55ba179046 Scaffold the Azure RM Subnet resource 2016-01-09 18:09:46 +00:00
stack72 719f3ad2ce Scaffold the Azure RM Network Security Rule resource 2016-01-09 00:06:58 +00:00
Paul Hinze d9c0b3e6bd provider/azurerm: Additional fixes for upstream breaking changes
More fixes for breaking changes introduced in:

https://github.com/Azure/azure-sdk-for-go/pull/258
2016-01-08 14:48:03 -06:00
Paul Hinze 5912bf25b4 Update azurerm imports to fix build
Catches us up with breaking change introduced here:

https://github.com/Azure/azure-sdk-for-go/pull/258
2016-01-08 14:06:09 -06:00
stack72 eab75dc884 Scaffolds the AzureRM Public IP resource 2016-01-08 00:25:50 +00:00
stack72 f79d951524 Rename the AzureRM Security Group to AzureRM Network Security Group 2016-01-07 22:38:11 +00:00
stack72 43760d4670 Scaffolding for the AzureRM Network Security Groups 2016-01-07 21:05:50 +00:00
stack72 fac989ed5f Azure RM Availability Sets. Adds Schema, CRUD, Acceptance Tests and Documentation 2016-01-07 14:18:18 +00:00
James Nugent 41e9416ab2 provider/azurerm: Set user agent 2016-01-06 14:28:36 -08:00
James Nugent a48e713fe0 provider/azurerm: Register needed Azure providers 2016-01-05 16:43:52 -05:00
James Nugent 008dc970b6 provider/azurerm: Fix up network gateway tests
This diff represents the changes  necessary to make local network
gateway tests pass:

- Parse the resource ID instead of relying on attributes
- Remove unecessary logging (which is handled via the autorest wrapper)
- Resource GUID is removed - if this is actually required for anything
  we may need to find a way to supress it during apply, as we get
  spurious diffs in plans otherwise.
- Various typos fixed.
2015-12-23 18:49:21 +02:00
Nashwan Azhari 1eb129a99b provider/azure: added local network gateway resource 2015-12-23 18:49:21 +02:00
James Nugent 805c4896bd provider/azurerm: Clean up work for base provider
- Add documentation for resources
- Rename files to match standard patterns
- Add acceptance tests for resource groups
- Add acceptance tests for vnets
- Remove ARM_CREDENTIALS file - as discussed this does not appear to be
  an Azure standard, and there is scope for confusion with the
  azureProfile.json file which the CLI generates. If a standard emerges
  we can reconsider this.
- Validate credentials in the schema
- Remove storage testing artefacts
- Use ARM IDs as Terraform IDs
- Use autorest hooks for logging
2015-12-15 18:31:02 -05:00
Nashwan Azhari 63bc8e9852 provider/azurerm: Tidy up minor issues
This commit cleans up some of the work on the Azure ARM provider
following review by @phinze. Specifically:

- Unnecessary ASM-targeted tests are removed
- Validation is added to the `resource_group` resource
- `dns_servers_names` -> `dns_servers` as per the API documentation
- AZURE_SUBSCRIPTION_ID environment variable is renamed to be
  ARM_SUBSCRIPTION_ID in order to match the other environment variables
2015-12-15 17:26:33 -05:00
Nashwan Azhari c279adfc55 provider/azurerm: Initial commit.
This commit brings some of the work over from #3808, but rearchitects to
use a separate provider for Azure Resource Manager. This is in line with
the decisions made by the Azure Powershell Cmdlets, and is important for
usability since the sets of required fields change between the ASM and
ARM APIs.

Currently `azurerm_resource_group` and `azurerm_virtual_network` are
implemented, more resources will follow.
2015-12-15 17:26:33 -05:00