Commit Graph

11407 Commits

Author SHA1 Message Date
Paul Stack e28caa0496 Update CHANGELOG.md 2016-07-13 23:54:24 +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
Paul Stack d1666ba76c Update CHANGELOG.md 2016-07-13 21:05:27 +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
Joonas Bergius 0ce6337a2a docs: Add digitalocean_tag resource to the sidebar (#7629) 2016-07-13 20:48:00 +01:00
Paul Hinze 4d5162ae2c Update CHANGELOG.md 2016-07-13 12:55:35 -06: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 30ff7df954 Merge pull request #7611 from hashicorp/b-iam-policy-document-fixes
provider/aws: Fix data.aws_iam_policy_document IDs
2016-07-13 12:21:11 -06:00
James Nugent 821d9d8b13 Update CHANGELOG.md 2016-07-13 12:16:04 -06:00
James Nugent 9ca3f2dd13 Merge pull request #7608 from hashicorp/nested-output-formatting
core: Correctly format nested outputs
2016-07-13 12:14:47 -06:00
James Nugent 4212ab24c7 Merge pull request #7628 from hashicorp/improve-module-splat-var-coverage
core: Add context test for module var from splat
2016-07-13 12:14:17 -06: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 56aadab115 core: Add context test for module var from splat
This adds additional coverage of the situation reported in #7195 to
prevent against regression. The actual fix was in 2356afd, in response
to #7143.
2016-07-13 11:23:56 -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 b4048dfc1d core: Add -json flag to `terraform output`
This commit removes the ability to index into complex output types using
`terraform output a_list 1` (for example), and adds a `-json` flag to
the `terraform output` command, such that the output can be piped
through a post-processor such as jq or json. This removes the need to
allow arbitrary traversal of nested structures.

It also adds tests of human readable ("normal") output with nested lists
and maps, and of the new JSON output.
2016-07-13 10:42:55 -06:00
James Nugent ef3aad1231 core: Correctly format nested outputs
This commit pretty prints outputs which consist of nested complex
structures (e.g. lists of lists, lists of maps).

Fixes #7143.
2016-07-13 09:46:07 -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
Paul Stack e13e4977f0 Update CHANGELOG.md 2016-07-13 15:38:06 +01: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
Paul Stack 9018e073fb Update CHANGELOG.md 2016-07-13 10:08:49 +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
Joe Topjian 8c6d71daf6 Merge pull request #7616 from hpcloud/admin_state_default
Setting admin_state_up default to true
2016-07-12 21:35:07 -06: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
Clint b01e2e6084 Update CHANGELOG.md 2016-07-12 13:21:12 -06: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 1ca51ab454 Merge pull request #7589 from hashicorp/b-data-source-plan-counts
command: Do not count data sources in plan totals
2016-07-12 11:56:31 -06: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
Radek Simko 1ad0402b29 docs/aws: Fix wrong resource name in sidebar (#7606) 2016-07-12 16:23:35 +01:00
Paul Stack 2cb1df2d9d Update CHANGELOG.md 2016-07-12 14:16:00 +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