Commit Graph

4446 Commits

Author SHA1 Message Date
stack72 a74bd870e2
provider/aws: Support Import of `aws_ses_receipt_filter`
```
% make testacc TEST=./builtin/providers/aws  TESTARGS='-run=TestAccAWSSESReceiptFilter_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSSESReceiptFilter_ -timeout 120m
=== RUN   TestAccAWSSESReceiptFilter_importBasic
--- PASS: TestAccAWSSESReceiptFilter_importBasic (18.18s)
=== RUN   TestAccAWSSESReceiptFilter_basic
--- PASS: TestAccAWSSESReceiptFilter_basic (18.42s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    36.633s
```
2016-07-07 17:37:56 +01:00
David Tolnay 4ba75bd54e Retry finding route after creating it (#7463)
The symptom is that a route "fails" to create, then every subsequent
`terraform apply` fails with RouteAlreadyExists.

CreateRoute was succeeding but the very next DescribeRouteTables
was not listing the new route.
2016-07-05 15:04:09 -05:00
Paul Stack d60594695f provider/aws: `aws_customer_gateway` refreshing from state on deleted (#7482)
state

Fixes #7136
2016-07-05 16:34:06 +01:00
Paul Stack 58c324676d provider/aws: Add support for `encryption` and `kms_key_id` to `aws_ami` (#7181)
This fixes #7157. It doesn't change the way aws_ami works

```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSAMICopy'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAMICopy
-timeout 120m
=== RUN   TestAccAWSAMICopy
--- PASS: TestAccAWSAMICopy (479.75s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    479.769s
```
2016-07-05 09:50:48 -05:00
Paul Stack 06ff7bfcfe provider/aws: Remove EFS File System from State when NotFound (#7437)
Fixes #7433

When an EFS File System is created via Terraform, Deleted from the AWS
console, then Terraform would give us as error as:

```
* aws_efs_file_system.file_system: FileSystemNotFound: File system
 'fs-9d739e54' does not exist.
        status code: 404, request id:
        d505a682-3ec7-11e6-81d3-1d41202f0881
```

On a 404, we now remove the EFS File System from state so that Terraform
can recreate it as expected
2016-07-05 13:56:05 +01:00
James Nugent 730d59734f Merge pull request #7338 from hashicorp/import-aws-dbpg
provider/aws: Support Import for `aws_db_parameter_group`
2016-07-05 13:51:51 +01:00
Radek Simko 120d7c4f2e provider/aws: Only allow max. 1 health_check block for ELB 2016-07-05 10:56:17 +01:00
Eric Rutherford 32051156c7 adding states that should be considered as deleted for vpc peering (#7466) 2016-07-03 16:58:19 +01:00
David Harris c744bb6fa8 provider/aws: import Elastic Beanstalk Application and Environment (#7444) 2016-07-03 16:42:12 +01:00
Joe Topjian 480542d2ab provider/openstack: Support Import openstack_compute_keypair_v2 (#7346) 2016-07-03 16:39:20 +01:00
Joe Topjian 713c0daa52 provider/openstack: Support Import openstack_compute_floatingip_v2 (#7348) 2016-07-03 16:38:38 +01:00
Joe Topjian 0466520626 provider/openstack: Support Import openstack_compute_servergroup_v2 (#7349) 2016-07-03 16:38:21 +01:00
Joe Topjian c1e4d297f3 provider/openstack: Support Import openstack_compute_secgroup_v2 (#7350) 2016-07-03 16:37:58 +01:00
Joe Topjian 8d8becdfdb provider/openstack: Support Import of OpenStack FWaaS Resources (#7471) 2016-07-03 16:37:35 +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
Joe Topjian b5ca75f165 Merge pull request #7468 from jtopjian/openstack-secgroup-eof
provider/openstack: Fix Security Group EOF Error
2016-07-02 11:50:32 -06:00
Joe Topjian bc6be73c1d provider/openstack: Fix Security Group EOF Error
When applying or removing 2+ security groups from an instance, an EOF
error will be triggered even though the action was successful. This
patch accounts for and ignores the EOF error. It also adds a test
case.

Security Group and Port documentation are also updated in this
commit.
2016-07-02 14:18:04 +00: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
Joe Topjian de99379a87 Merge pull request #7422 from jtopjian/openstack-lbpoolmember-deprecated
provider/openstack: Deprecate openstack_lb_pool_v1 member attribute
2016-07-01 20:37:23 -06:00
David Tolnay be7162747f Remove unused variables 2016-07-01 13:37:48 -07:00
Paul Hinze 3b732131d2 Merge pull request #7446 from hashicorp/b-jit-resource-validate
core: rerun resource validation before plan and apply
2016-07-01 15:00:40 -05:00
Paul Hinze afccf62e3e Merge pull request #7459 from hashicorp/r-resource-unit-test
helper/resource: Consolidate unit test override
2016-07-01 13:23:13 -05:00
Paul Hinze 4a1b36ac0d
core: rerun resource validation before plan and apply
In #7170 we found two scenarios where the type checking done during the
`context.Validate()` graph walk was circumvented, and the subsequent
assumption of type safety in the provider's `Diff()` implementation
caused panics.

Both scenarios have to do with interpolations that reference Computed
values. The sentinel we use to indicate that a value is Computed does
not carry any type information with it yet.

That means that an incorrect reference to a list or a map in a string
attribute can "sneak through" validation only to crop up...

 1. ...during Plan for Data Source References
 2. ...during Apply for Resource references

In order to address this, we:

 * add high-level tests for each of these two scenarios in `provider/test`
 * add context-level tests for the same two scenarios in `terraform`
   (these tests proved _really_ tricky to write!)
 * place an `EvalValidateResource` just before `EvalDiff` and `EvalApply` to
   catch these errors
 * add some plumbing to `Plan()` and `Apply()` to return validation
   errors, which were previously only generated during `Validate()`
 * wrap unit-tests around `EvalValidateResource`
 * add an `IgnoreWarnings` option to `EvalValidateResource` to prevent
   active warnings from halting execution on the second-pass validation

Eventually, we might be able to attach type information to Computed
values, which would allow for these errors to be caught earlier. For
now, this solution keeps us safe from panics and raises the proper
errors to the user.

Fixes #7170
2016-07-01 13:12:57 -05:00
Paul Hinze 5656d7388c
helper/resource: Consolidate unit test override
I noticed we had two mechanisms for unit test override. One that dropped
a sentinel into the env var, and another with a struct member on
TestCase. This consolidates the two, using the cleaner struct member
internal mechanism and the nicer `resource.UnitTest()` entry point.
2016-07-01 13:08:43 -05:00
Clint 98fd603bdf provider/atlas: Add a Atlas Artifact Data Source (#7419)
* small doc update

* provider/atlas: Add docs for Artifact Data Source

* provider/atlas: Remove a test method that isn't used

* provider/atlas: Add Data Source for Atlas Artifact

* provider/atlas: Show deprecation error on atlas_artifact resource
2016-07-01 10:29:53 -05:00
clint shryock c4fa91b176 Merge branch 'pr-5939'
* pr-5939:
  Update acc tests
  provider/aws: Allow `aws_redshift_security_group` ingress rules to change
2016-07-01 10:15:29 -05:00
clint shryock 1d1cc9b572 Update acc tests 2016-07-01 10:14:18 -05:00
Clint 6367bade03 Merge pull request #6851 from TeaBough/master
provider/aws: Handled case when instanceId is absent in network interfaces
2016-07-01 09:42:35 -05: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 54c0022d38 Revert "provider/aws: Read Elastic Beanstalk stack name" (#7452) 2016-07-01 10:03:31 +01:00
David Harris a347b1795f provider/aws: Read Elastic Beanstalk stack name (#7445) 2016-07-01 09:34:28 +01:00
Clint 14fa3a88fd provider/aws: Added support for redshift destination to firehose delivery streams (supersedes #5304) (#7375)
* Added support for redshift destination to firehose delivery streams

* Small documentation fix

* go fmt after rebase

* small fixes after rebase

* provider/aws: Firehose test cleanups

* provider/aws: Update docs

* Convert Redshift and S3 blocks to TypeList

* provider/aws: Add migration for S3 Configuration in Kinesis firehose

* providers/aws: Safety first when building Redshift config options

* restore commented out log statements in the migration

* provider/aws: use MaxItems in schema
2016-06-30 15:03:31 -05:00
Clint 2ba1b0fb01 provider/aws: Populate self in Security Group Rule imports (#7164)
* provider/aws: Populate self in Security Group Rule imports

* provider/aws: Add regression test for SG Rule import
2016-06-30 15:01:38 -05: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
Radek Simko b54481909b Merge pull request #7428 from TimeIncOSS/f-efs-target-hostname
provider/aws: Add dns_name to aws_efs_mount_target
2016-06-30 12:40:48 +01:00
Radek Simko 32019fa008 provider/aws: Add dns_name to aws_efs_mount_target 2016-06-30 11:24:18 +01:00
Joe Topjian 4ca5c948b6 provider/openstack: Deprecate openstack_lb_pool_v1 member attribute
This commit marks the "member" attribute of the
openstack_lb_pool_v1 resource as being deprecated. Users should begin
migrating to the openstack_lb_member_v1 resource.
2016-06-30 02:12:15 +00:00
Clint dd0850af59 provider/aws: Add inplace edit/update DB Security Group Rule Ingress (#7245) 2016-06-29 15:55:58 -05:00
Eloy Coto ab390359be Vsphere: Added uuid attributes (#4382) 2016-06-29 21:45:59 +01:00
Paul Stack e905aa2840 provider/digitalocean: Support Import `digitalocean_droplet` (#7344)
```
ake testacc TEST=./builtin/providers/digitalocean
TESTARGS='-run=TestAccDigitalOceanDroplet_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/digitalocean -v -run=TestAccDigitalOceanDroplet_ -timeout 120m
=== RUN   TestAccDigitalOceanDroplet_importBasic
--- PASS: TestAccDigitalOceanDroplet_importBasic (39.42s)
=== RUN   TestAccDigitalOceanDroplet_Basic
--- PASS: TestAccDigitalOceanDroplet_Basic (38.46s)
=== RUN   TestAccDigitalOceanDroplet_Update
--- PASS: TestAccDigitalOceanDroplet_Update (244.82s)
=== RUN   TestAccDigitalOceanDroplet_UpdateUserData
--- PASS: TestAccDigitalOceanDroplet_UpdateUserData (73.05s)
=== RUN   TestAccDigitalOceanDroplet_PrivateNetworkingIpv6
--- PASS: TestAccDigitalOceanDroplet_PrivateNetworkingIpv6 (67.24s)
PASS
```
2016-06-29 20:28:47 +01:00
dkalleg ab92fa4dff Refreshing devices list after adding a disk or cdrom controller (#7167)
Also taking out an unnecessary ForceNew on controller_type as well
as correcting a reference to controller_type in Update case.
2016-06-29 19:47:56 +01:00
Paul Stack c25eb9b4b8 provider/vsphere: Make `vsphere_virtual_machine` `product_key` optional (#7410)
Fixes #6690

Luckily, the code was already checking to see if the product_key was
specified
2016-06-29 19:37:04 +01:00
Paul Stack 70578d4e99 provider/digitalocean: Support Import `digitalocean_floating_ip` (#7343)
```
make testacc TEST=./builtin/providers/digitalocean
TESTARGS='-run=TestAccDigitalOceanFloatingIP_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/digitalocean -v -run=TestAccDigitalOceanFloatingIP_ -timeout 120m
=== RUN   TestAccDigitalOceanFloatingIP_importBasicRegion
--- PASS: TestAccDigitalOceanFloatingIP_importBasicRegion (3.76s)
=== RUN   TestAccDigitalOceanFloatingIP_importBasicDroplet
--- PASS: TestAccDigitalOceanFloatingIP_importBasicDroplet (72.41s)
=== RUN   TestAccDigitalOceanFloatingIP_Region
--- PASS: TestAccDigitalOceanFloatingIP_Region (3.46s)
=== RUN   TestAccDigitalOceanFloatingIP_Droplet
--- PASS: TestAccDigitalOceanFloatingIP_Droplet (74.49s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/digitalocean
154.128s
```
2016-06-29 16:30:11 +01:00
Paul Stack bc163cadaa provider/digitalocean: Support Import `digitalocean_domain` (#7342)
```
make testacc TEST=./builtin/providers/digitalocean
TESTARGS='-run=TestAccDigitalOceanDomain_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/digitalocean -v -run=TestAccDigitalOceanDomain_ -timeout 120m
=== RUN   TestAccDigitalOceanDomain_importBasic
--- PASS: TestAccDigitalOceanDomain_importBasic (3.07s)
=== RUN   TestAccDigitalOceanDomain_Basic
--- PASS: TestAccDigitalOceanDomain_Basic (1.99s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/digitalocean
5.072s
```
2016-06-29 16:10:56 +01:00
Paul Stack ae2bd7a0ff provider/digitalocean: Support Import `digitalocean_ssh_key` (#7345)
```
make testacc TEST=./builtin/providers/digitalocean
TESTARGS='-run=TestAccDigitalOceanSSHKey_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/digitalocean -v -run=TestAccDigitalOceanSSHKey_ -timeout 120m
=== RUN   TestAccDigitalOceanSSHKey_importBasic
--- PASS: TestAccDigitalOceanSSHKey_importBasic (2.13s)
=== RUN   TestAccDigitalOceanSSHKey_Basic
--- PASS: TestAccDigitalOceanSSHKey_Basic (1.52s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/digitalocean
3.665s
```
2016-06-29 16:09:34 +01:00
Paul Stack 7a1b78593b provider/digitalocean: Reassign Floating IP when droplet changes (#7411)
Fixes #6673

When a floating IP is changed in the DO console, this PR will allow it
to be reassociated to the machine that Terraform attached it to and
change it back
2016-06-29 16:05:36 +01:00
Daniel Portella 21618a9111 provider/docker: Docker documentation and additional test message (#7412)
* added additional error info for when memory swap assert fails.

related to https://github.com/hashicorp/terraform/pull/7392

* updated docker_container documentation

reflect recent changes to docker provider around tests, dns options and
dns search support.

* Grammar and punctuation changes

Docker container documentation.

* Spell checking, grammar and punctuation.

Docker container documentation.

* Markdown change sto docker container documentation
2016-06-29 15:48:15 +01:00
Daniel Portella b8a84691ec provider/docker: Docker DNS Setting Enhancements (#7392)
* fixed go vet issues on aws provider in  master

* added support for dns, dns options and dns search for docker container.

On docker container resource you can specify dns_opts nad dns_search
which maps directly to docker --dns_opt and --dns_search parameters.
Allowing users to setup the embedded dns settings for their containers.

* fixed the asserts for the new features in tests.

fixed tests around DNS, DNS_OPTS and DNS_SEARCH
2016-06-29 13:38:46 +01:00
David Lanner 8fd843fa91 correct true and false string values to fix manage_bundler config bug (#7219) 2016-06-29 09:51:26 +01:00
stack72 8ca3d94858 provider/docker: Fixing the Docker Container Mount Test
```
make testacc TEST=./builtin/providers/docker TESTARGS='-run=TestAccDockerContainer_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/docker -v
-run=TestAccDockerContainer_ -timeout 120m
=== RUN   TestAccDockerContainer_basic
--- PASS: TestAccDockerContainer_basic (17.25s)
=== RUN   TestAccDockerContainer_volume
--- PASS: TestAccDockerContainer_volume (16.79s)
=== RUN   TestAccDockerContainer_customized
--- PASS: TestAccDockerContainer_customized (19.65s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/docker 53.712s
```
2016-06-29 09:38:56 +01:00