Commit Graph

14 Commits

Author SHA1 Message Date
Seth Vargo 9d34612be0 Ignore case on protocol and allocation types (#12176) 2017-02-22 22:30:07 +02:00
Peter McAtominey bbde0537d1 provider/azurerm: support import for load balancer and sub resources (#11610)
implemented ResourceImporter for sub resources which extracts the lb id
deprecated location on each sub resource as it was unused
2017-02-01 17:17:51 +00:00
Peter McAtominey c104ce6815 provider/azurerm: check if lb sub resources exist when reading (#11553)
This fixes detection when a sub resource is deleted via the API or Portal
2017-01-31 15:55:17 +00:00
Peter McAtominey b869e1682a provider/azurerm: make lb sub resources idempotent (#11128)
If an error occurred which prevented the lb sub resources being written to state
then the next apply would fail as the resources would already exist in the API.

go test -c ./builtin/providers/azurerm -o ./builtin/providers/azurerm/test-azurerm
TestAccAzureRMLoadBalancerBackEndAddressPool_reapply
TestAccAzureRMLoadBalancerBackEndAddressPool_removal
TestAccAzureRMLoadBalancerNatPool_basic
TestAccAzureRMLoadBalancerBackEndAddressPool_basic
TestAccAzureRMLoadBalancerNatRule_basic
TestAccAzureRMLoadBalancerNatPool_reapply
TestAccAzureRMLoadBalancerNatPool_removal
TestAccAzureRMLoadBalancerNatPool_update
TestAccAzureRMLoadBalancerProbe_basic
TestAccAzureRMLoadBalancerNatRule_removal
TestAccAzureRMLoadBalancerNatRule_update
TestAccAzureRMLoadBalancerNatRule_reapply
TestAccAzureRMLoadBalancerProbe_removal
TestAccAzureRMLoadBalancerProbe_reapply
TestAccAzureRMLoadBalancerProbe_update
TestAccAzureRMLoadBalancerRule_basic
TestAccAzureRMLoadBalancerRule_inconsistentReads
TestAccAzureRMLoadBalancerRule_removal
TestAccAzureRMLoadBalancerProbe_updateProtocol
TestAccAzureRMLoadBalancer_basic
TestAccAzureRMLoadBalancerRule_update
TestAccAzureRMLoadBalancerRule_reapply
TestAccAzureRMLoadBalancer_frontEndConfig
TestAccAzureRMLoadBalancer_tags
2017-01-12 15:57:07 +02:00
Peter McAtominey 825a41aa08 provider/azurerm: fix update protocol for lb_probe (#11125)
request_path had Computed enabled which prevented updating it to an empty value

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMLoadBalancerProbe -timeout 120m
=== RUN   TestAccAzureRMLoadBalancerProbe_basic
--- PASS: TestAccAzureRMLoadBalancerProbe_basic (119.63s)
=== RUN   TestAccAzureRMLoadBalancerProbe_removal
--- PASS: TestAccAzureRMLoadBalancerProbe_removal (122.50s)
=== RUN   TestAccAzureRMLoadBalancerProbe_update
--- PASS: TestAccAzureRMLoadBalancerProbe_update (129.98s)
=== RUN   TestAccAzureRMLoadBalancerProbe_duplicate
--- PASS: TestAccAzureRMLoadBalancerProbe_duplicate (115.22s)
=== RUN   TestAccAzureRMLoadBalancerProbe_updateProtocol
--- PASS: TestAccAzureRMLoadBalancerProbe_updateProtocol (127.25s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	614.657s
2017-01-10 08:49:30 +00:00
Paul Stack 54459900c5 [WIP] provider/azurerm: Bump sdk version to 7.0.1 (#10458)
* provider/azurerm: Bump sdk version to 7.0.1

* Fixing the build (#10489)

* Fixing the broken tests (#10499)

* Updating the method signatures to match (#10533)
2016-12-06 08:39:47 +00:00
Peter McAtominey a4054c999e provider/azurerm: create common schema for location field, add diff suppress (#10409) 2016-11-29 15:54:00 +00:00
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
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
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 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
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