Commit Graph

4435 Commits

Author SHA1 Message Date
David Harris 03157610d8 provider/aws: Read Elastic Beanstalk stack name (#7671) 2016-07-16 14:43:12 +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
Paul Hinze 71932138b9 Merge pull request #7667 from hashicorp/phinze/skip-final-snapshot-import
provider/aws: Fixup skip_final_snapshot import
2016-07-15 13:34:37 -06:00
David Harris bbe7fd2613 provider/aws: Fix Elastic Beanstalk test (#7668)
This fixes the `TestAccAWSBeanstalkEnv_tier` test. The instance profile
needs access to send and receive messages from its sqs queue. Without
these permissions Beanstalk returns an error event, causing the test to
fail.
2016-07-15 20:03:42 +01:00
Paul Hinze 93832527b1
provider/aws: Fixup skip_final_snapshot import
Neither skip_final_snapshot nor final_snapshot_identifier can be fetched
from any API call, so we need to default skip_final_snapshot to true
during import so that final_snapshot_identifier is not required
2016-07-15 11:30:33 -06:00
Paul Hinze 9fe916248c Merge pull request #7654 from hashicorp/zeroae-b-triton-dot-in-tags
Support "." in map keys
2016-07-15 09:48:19 -06:00
Joe Topjian f7da261294 provider/openstack: Support Import of OpenStack LBaaS V1 Resources (#7660) 2016-07-15 09:49:31 +01:00
Joe Topjian bc5a8b827f provider/openstack: Support Import of OpenStack Networking Resources (#7661)
Router-based resources are not included. They will be added later.
2016-07-15 09:47:11 +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
James Nugent 082c4fc2c8 Merge pull request #7538 from hashicorp/import-aws-sqs
provider/aws: Support Import `aws_sqs_queue`
2016-07-14 13:29:19 -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 3d480ca767
provider/aws: Support Import `aws_sqs_queue`
Needed to change the test due to SQS having issues recreating the same
queue multiple times. Now it uses a random name

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSQSQueue_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSQSQueue_
-timeout 120m
=== RUN   TestAccAWSSQSQueue_importBasic
--- PASS: TestAccAWSSQSQueue_importBasic (20.53s)
=== RUN   TestAccAWSSQSQueue_basic
--- PASS: TestAccAWSSQSQueue_basic (33.85s)
=== RUN   TestAccAWSSQSQueue_redrivePolicy
--- PASS: TestAccAWSSQSQueue_redrivePolicy (26.59s)
=== RUN   TestAccAWSSQSQueue_Policybasic
--- PASS: TestAccAWSSQSQueue_Policybasic (36.92s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    117.908s
```
2016-07-13 22:36:28 +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
Raphael Randschau 9081cabd6e Add scaleway provider (#7331)
* Add scaleway provider

this PR allows the entire scaleway stack to be managed with terraform

example usage looks like this:

```
provider "scaleway" {
  api_key = "snap"
  organization = "snip"
}

resource "scaleway_ip" "base" {
  server = "${scaleway_server.base.id}"
}

resource "scaleway_server" "base" {
  name = "test"
  # ubuntu 14.04
  image = "aecaed73-51a5-4439-a127-6d8229847145"
  type = "C2S"
}

resource "scaleway_volume" "test" {
  name = "test"
  size_in_gb = 20
  type = "l_ssd"
}

resource "scaleway_volume_attachment" "test" {
  server = "${scaleway_server.base.id}"
  volume = "${scaleway_volume.test.id}"
}

resource "scaleway_security_group" "base" {
  name = "public"
  description = "public gateway"
}

resource "scaleway_security_group_rule" "http-ingress" {
  security_group = "${scaleway_security_group.base.id}"

  action = "accept"
  direction = "inbound"
  ip_range = "0.0.0.0/0"
  protocol = "TCP"
  port = 80
}

resource "scaleway_security_group_rule" "http-egress" {
  security_group = "${scaleway_security_group.base.id}"

  action = "accept"
  direction = "outbound"
  ip_range = "0.0.0.0/0"
  protocol = "TCP"
  port = 80
}
```

Note that volume attachments require the server to be stopped, which can lead to
downtimes of you attach new volumes to already used servers

* Update IP read to handle 404 gracefully

* Read back resource on update

* Ensure IP detachment works as expected

Sadly this is not part of the official scaleway api just yet

* Adjust detachIP helper

based on feedback from @QuentinPerez in
https://github.com/scaleway/scaleway-cli/pull/378

* Cleanup documentation

* Rename api_key to access_key

following @stack72 suggestion and rename the provider api_key for more clarity

* Make tests less chatty by using custom logger
2016-07-13 21:03:41 +01:00
Sander van Harmelen b05d5fb449 Merge pull request #7612 from svanharmelen/b-cloudstack-provider
provider/cloudstack: fix and improve several use cases
2016-07-13 20:35:31 +02:00
James Nugent 28438daeb4 provider/aws: Fix IDs in aws_iam_policy_document
We cannot use the "id" field to represent policy ID, because it is used
internally by Terraform. Also change the "id" field within a statement
to "sid" for consistency with the generated JSON.
2016-07-13 12:10:20 -06:00
James Nugent 788bff46e2 Merge pull request #7563 from hashicorp/b-ignore-changes-dependency
terraform: another set of ignore_changes fixes
2016-07-13 11:06:49 -06: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
James Nugent 9b3968aa14 Merge pull request #7627 from hashicorp/import-arm-nsg
provider/azurerm: Support Import of `azurerm_network_security_group`
2016-07-13 09:41:28 -06:00
Antoine Grondin 3d6fe76b52 provider/digitalocean: adds a volume resource (#7560)
* provider/digitalocean: add support for volumes

* provider/digitalocean: add documentation for volume resource
2016-07-13 15:36:37 +01: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
Clint 3cea29176f provider/aws: Safely get ELB values (#7585)
- removes dereferences to avoid nil crashes
2016-07-13 10:07:56 +01:00
dkalleg 72660750fd Setting admin_state_up default to true
This is to be inline with OpenStack defaulting admin_state_up to true.
2016-07-12 18:08:16 -07:00
James Nugent b688512133 Merge branch 'b-triton-dot-in-tags' of https://github.com/zeroae/terraform into zeroae-b-triton-dot-in-tags 2016-07-12 15:06:47 -06:00
Sander van Harmelen 28543694de Fix refresing an IP when it’s no longer associated 2016-07-12 21:32:56 +02:00
Justin Nauman 71532fff8b - Adding in additional retry logic due to latency with AWS delete (#7312) 2016-07-12 13:19:55 -06:00
Sander van Harmelen 29ce2df873 Fix refresing ACL rules when the ACL is deleted 2016-07-12 21:11:22 +02:00
Sander van Harmelen b55da4c3e7 Fix creating networks without specifying IP ranges 2016-07-12 21:11:22 +02:00
Sander van Harmelen bdb35006cd Fix several bugs in different resources
- Make sure attaching a disk or a NIC is tried a couple of times as this only works after the OS has fully booted;
- Stop using the device name instead of ID as the names differ depending on the hypervisor that you are using;
- VPC’s do not always have a source NAT IP;
2016-07-12 21:11:22 +02:00
Sander van Harmelen 9ddeb70312 Merge pull request #7074 from serbaut/user_data_update
provider/cloudstack: do not force a new resource when updating instance user_data
2016-07-12 21:08:11 +02:00
James Nugent 6cc47c3f5a Merge pull request #7587 from hashicorp/b-template-file-validate-strings
provider/template: validate vars are primitives
2016-07-12 11:35:31 -06:00
Radek Simko df40b91fb8 provider/aws: Allow importing iam_saml_provider (#7605) 2016-07-12 17:04:01 +01:00
Derek Abdine 7bdc060d24 provider/logentries: Implementing logentries provider (#7067)
* logentries provider

* logentries vendoring

* logentries docs
2016-07-12 14:14:39 +01:00
Paul Stack 4582cbeb5e provider/digitalocean: Add Test for DO Tag Import (#7602)
```
% make testacc TEST=./builtin/providers/digitalocean TESTARGS='-run=TestAccDigitalOceanTag_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/digitalocean -v
-run=TestAccDigitalOceanTag_ -timeout 120m
=== RUN   TestAccDigitalOceanTag_importBasic
--- PASS: TestAccDigitalOceanTag_importBasic (2.42s)
=== RUN   TestAccDigitalOceanTag_Basic
--- PASS: TestAccDigitalOceanTag_Basic (1.72s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/digitalocean
4.151s
```
2016-07-12 13:16:34 +01:00
Paul Stack 7a58ad95f5 provider/aws: Support Import for `aws_simpledb_domain` (#7601)
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSimpleDBDomain_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSSimpleDBDomain_ -timeout 120m
=== RUN   TestAccAWSSimpleDBDomain_importBasic
--- PASS: TestAccAWSSimpleDBDomain_importBasic (19.59s)
=== RUN   TestAccAWSSimpleDBDomain_basic
--- PASS: TestAccAWSSimpleDBDomain_basic (19.93s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    39.535s
```
2016-07-12 13:15:47 +01:00
Martin Häger 32abd937f1 SimpleDB domain resource (#7600) 2016-07-12 12:55:58 +01:00