Commit Graph

13041 Commits

Author SHA1 Message Date
Paul Stack 2b577ea6db Update CHANGELOG.md 2016-09-28 20:28:40 +01:00
Paul Stack 5f8cd8e69f Merge pull request #9101 from hashicorp/b-aws-elasticache-panic-parameter-group
provider/aws: Modifying the parameter_group_name of aws_elasticache_replication_group caused a panic
2016-09-28 20:27:01 +01:00
Paul Stack bc43e48638 Update CHANGELOG.md 2016-09-28 20:12:42 +01:00
Paul Stack 10eb572437 Merge pull request #9050 from hashicorp/b-aws-ecr-delete-timeout
provider/aws: Add retry logic to the aws_ecr_repository delete func
2016-09-28 20:10:35 +01:00
Paul Stack 4c15ca38dc Update CHANGELOG.md 2016-09-28 19:58:06 +01:00
Paul Stack 9202bb4751 Merge pull request #9011 from hashicorp/f-aws-cloudfront-tags
provider/aws: Add support for tags to aws_cloudfront_distribution
2016-09-28 19:54:47 +01:00
Paul Stack c4be9e6e61 Update CHANGELOG.md 2016-09-28 19:53:43 +01:00
Paul Stack b6718de299 Merge pull request #9010 from hashicorp/aws-elasticache-cluster-import
Aws elasticache cluster import
2016-09-28 19:49:42 +01:00
Mickaël Canévet 1521517068 network_id is computed (#9102) 2016-09-28 17:35:37 +02:00
stack72 13cf370d07
provider/aws: Add support for tags to aws_cloudfront_distribution
Fixes #8959

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudFrontDistribution_S3OriginWithTags'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/23 16:30:31 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSCloudFrontDistribution_S3OriginWithTags -timeout 120m
=== RUN   TestAccAWSCloudFrontDistribution_S3OriginWithTags
--- PASS: TestAccAWSCloudFrontDistribution_S3OriginWithTags (1234.66s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws
1234.680s
```
2016-09-28 13:18:41 +01:00
stack72 b02a5c47ec
provider/aws: Support Import of aws_elasticache_cluster
Initial tests were failing as follows:

```
=== RUN   TestAccAWSElasticacheCluster_importBasic
--- FAIL: TestAccAWSElasticacheCluster_importBasic (362.66s)
        testing.go:265: Step 1 error: ImportStateVerify attributes not
        equivalent. Difference is shown below. Top is actual, bottom is
        expected.

        (map[string]string) {

        }

(map[string]string) (len=2) {
             (string) (len=20) "parameter_group_name": (string) (len=20)
             "default.memcached1.4",
                             (string) (len=22) "security_group_names.#":
                             (string) (len=1) "0"

}

FAIL
exit status 1
```

The import of ElastiCache clusters helped to point out 3 things:

1. Currently, we were trying to set the parameter_group_name as follows:

```
d.Set("parameter_group_name", c.CacheParameterGroup)
```

Unfortunately, c.CacheParameterGroup is a struct not a string. This was
causing the test import failure. So this had to be replaced as follows:

```
if c.CacheParameterGroup != nil {
      d.Set("parameter_group_name", c.CacheParameterGroup.CacheParameterGroupName)
}
```

2. We were trying to set the security_group_names as follows:

```
d.Set("security_group_names", c.CacheSecurityGroups)
```

The CacheSecurityGroups was actually a []* so had to be changed to work
as follows:

```
if len(c.CacheSecurityGroups) > 0 {
            d.Set("security_group_names",
            flattenElastiCacheSecurityGroupNames(c.CacheSecurityGroups))

}
```

3. We were trying to set the security_group_ids as follows:

```
d.Set("security_group_ids", c.SecurityGroups)
```

This is another []* and needs to be changed as follows:

```
if len(c.SecurityGroups) > 0 {
            d.Set("security_group_ids",
            flattenElastiCacheSecurityGroupIds(c.SecurityGroups))

}
```

This then allows the import test to pass as expected:

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticacheCluster_importBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/23 10:59:01 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSElasticacheCluster_importBasic -timeout 120m
=== RUN   TestAccAWSElasticacheCluster_importBasic
--- PASS: TestAccAWSElasticacheCluster_importBasic (351.96s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    351.981s
```

As a final test, I ran the basic ElastiCache cluster creation to make
sure all passed as expected:

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticacheCluster_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/23 11:05:51 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSElasticacheCluster_basic -timeout 120m
=== RUN   TestAccAWSElasticacheCluster_basic
--- PASS: TestAccAWSElasticacheCluster_basic (809.25s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    809.267s
```
2016-09-28 12:29:20 +01:00
stack72 15c8534538
provider/aws: Add retry logic to the aws_ecr_repository delete func
Fixes #8597

There was sometimes an issue where Terraform was deleting the ECR
repository from the statefile before the reposity was actually deleted.

Added retry logic for Terraform to wait for the repository to be deleted
before proceeding with the statefile update

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEcrRepository_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/26 12:46:57 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSEcrRepository_ -timeout 120m
=== RUN   TestAccAWSEcrRepository_importBasic
--- PASS: TestAccAWSEcrRepository_importBasic (17.86s)
=== RUN   TestAccAWSEcrRepository_basic
--- PASS: TestAccAWSEcrRepository_basic (16.40s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    34.288s
```
2016-09-28 12:01:13 +01:00
stack72 2efd93a67e
provider/aws: Modifying the parameter_group_name of
aws_elasticache_replication_group caused a panic

Fixes #9097

The update for `parameter_group_name` was trying to find the incorrect
value to set `cache_parameter_group_name` - this is what was causing the
panic

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticacheReplicationGroup_updateParameterGroup'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/28 11:17:30 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSElasticacheReplicationGroup_updateParameterGroup -timeout
120m
=== RUN   TestAccAWSElasticacheReplicationGroup_updateParameterGroup
--- PASS: TestAccAWSElasticacheReplicationGroup_updateParameterGroup
(903.90s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws903.931s
```
2016-09-28 11:48:17 +01:00
Paul Stack 032e7dfc9d Update CHANGELOG.md 2016-09-28 11:19:04 +01:00
Paul Stack d4dd615b52 Merge pull request #9052 from hashicorp/b-aws-rds-option-group
provider/aws: aws_db_option_group flattenOptions failing due to missing values
2016-09-28 11:18:28 +01:00
stack72 df8ca94093
provider/aws: aws_db_option_group flattenOptions failing due to missing
values

Fixes #8332

Not all option_group parameters have values. For example, when you
enable the MariaDB option_group, some of the settings have empty values
(see screenshot)

This PR adds a safety net on reading those values back to the statefile

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBOptionGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/26 13:55:21 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSDBOptionGroup_ -timeout 120m
=== RUN   TestAccAWSDBOptionGroup_importBasic
--- PASS: TestAccAWSDBOptionGroup_importBasic (20.12s)
=== RUN   TestAccAWSDBOptionGroup_basic
--- PASS: TestAccAWSDBOptionGroup_basic (18.45s)
=== RUN   TestAccAWSDBOptionGroup_basicDestroyWithInstance
--- PASS: TestAccAWSDBOptionGroup_basicDestroyWithInstance (597.90s)
=== RUN   TestAccAWSDBOptionGroup_OptionSettings
--- PASS: TestAccAWSDBOptionGroup_OptionSettings (33.27s)
=== RUN   TestAccAWSDBOptionGroup_sqlServerOptionsUpdate
--- PASS: TestAccAWSDBOptionGroup_sqlServerOptionsUpdate (33.39s)
=== RUN   TestAccAWSDBOptionGroup_multipleOptions
--- PASS: TestAccAWSDBOptionGroup_multipleOptions (19.87s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    723.037s
```
2016-09-28 11:06:40 +01:00
Paul Stack 52761701e1 Update CHANGELOG.md 2016-09-28 11:03:52 +01:00
Paul Stack bf5039311b Merge pull request #9049 from hashicorp/b-aws-r53-record-delete
provider/aws: guard against aws_route53_record delete panic
2016-09-28 11:02:03 +01:00
Mitchell Hashimoto ea342b793b
Update reflectwalk vendor to fix State.DeepCopy
The real reasoning for this can be found in #9, #10, and #11. All
these vendor updates aim to fix that issue, with minor adjustments
2016-09-27 19:52:12 -07:00
Mitchell Hashimoto 37c880c377
Update reflectwalk to fix failing tests
As part of working on ResourceConfig.DeepCopy, Equal I updated
reflectwalk (to fix some issues in the new functions) but this
introduced more issues in other parts of Terraform. This update fixes
those.
2016-09-27 19:16:29 -07:00
Mitchell Hashimoto f897fa4701
terraform: ResourceConfig.Equal and tests 2016-09-27 18:52:32 -07:00
Mitchell Hashimoto 56901e5cfd
terraform: ResourceConfig.DeepCopy
This implements DeepCopy, still need to implement Equals to make this
more useful. Coming in the next commit but this still has its own full
functionality + tests.
2016-09-27 16:09:32 -07:00
Mitchell Hashimoto 99e706b502
vendor: update copystructure/reflectwalk
This adds fixes that are needed for ResourceConfig copying, namely
related to copying interfaces, avoiding unexported fields.
2016-09-27 16:08:54 -07:00
clint shryock 2c7d4faf53 provider/google: remove debug spew statement 2016-09-27 17:06:41 -05:00
Seth Vargo 376f0827a3 Merge pull request #9085 from hashicorp/sethvargo/docsbg
Fix rabbitmq docs background
2016-09-27 13:24:43 -07:00
Seth Vargo 8edd0ae2b1
Fix rabbitmq docs background
Refs: https://twitter.com/Jippi/status/780860130468528128
2016-09-27 13:12:07 -07:00
Paul Stack f6ff349d6d Merge pull request #8971 from BedeGaming/azurerm-sdk-4
provider/azurerm: update Azure SDK
2016-09-27 18:58:08 +01:00
James Bardin 3297a460c7 Allow map variables from json
A JSON object will be decoded as a list with a single map value. This
will be properly coerced later, so let it through the initial config
semantic checks.
2016-09-27 13:29:14 -04:00
Paul Stack 060160c4fe Update CHANGELOG.md 2016-09-27 18:02:11 +01:00
Paul Stack 1cf9f41510 Merge pull request #9038 from kwilczynski/feature/error-reporting-aws_vpc_peering_connection
provider/aws: Make sure that VPC Peering Connection in a failed state returns an error.
2016-09-27 17:56:54 +01:00
Joe Topjian b60e1c73bb Update CHANGELOG.md 2016-09-27 09:23:08 -04:00
Joe Topjian 1e85d21dc4 Merge pull request #8948 from jfpucheu/PATCH_8735
Correct Proxy setting for openstack provider: issue 8735
2016-09-27 09:21:33 -04:00
Paul Stack c3158243ee Merge pull request #9071 from optimisticanshul/patch-1
Fix docs aws_instance
2016-09-27 09:05:36 +01:00
Paul Stack b7bf74b619 Update CHANGELOG.md 2016-09-27 08:58:38 +01:00
Paul Stack 3840ff0f40 Merge pull request #8947 from dagnello/vsphere-vm-disks-detach
vSphere: Adding 'detach_unknown_disks_on_delete' flag for VM resource
2016-09-27 08:56:58 +01:00
Anshul Sharma 1d443e87bc Fix docs
Fixes #8714
2016-09-27 13:26:15 +05:30
Davide Agnello dfe1cacc9e Adding 'detach_unknown_disks_on_delete' flag for VM resource
Optional, defaults to false.  If true, will detach disks not managed by
Terraform VM resource prior to VM deletion.

Issue: #8945
2016-09-26 18:16:02 -07:00
Paul Stack 0974250412 Merge pull request #9063 from TimeIncOSS/b-aurora-encryption-docs
aws: Fix docs after changing Aurora instance schema
2016-09-26 22:51:42 +01:00
Radek Simko ac7f551155
aws: Fix docs after changing Aurora instance schema 2016-09-26 20:50:20 +01:00
hanks e12f42a8b5 remove `description` section in Argument Reference of AWS_DEFAULT_SECURITY_GROUP,
because do not support description field according to the source code.
2016-09-26 13:55:57 -05:00
Paul Stack d4e6de3a4c Update CHANGELOG.md 2016-09-26 19:45:37 +01:00
Paul Stack bdb915693b Merge pull request #9060 from TimeIncOSS/b-aws-aurora-encryption
provider/aws: Make encryption in Aurora instances computed-only
2016-09-26 19:44:36 +01:00
James Bardin 475e0f1e6b Fix race on Provisioner.RawConfig
A race when accessing Provisioner.RawConfig can cause unexpected output
for provisioners that interpolate variables. Use RawConfig.Copy which
needs to acquire the RawConfig mutex to get the values.

Fixes #8890
2016-09-26 14:34:05 -04:00
Paul Stack a1ccbda2cc Merge pull request #9058 from hashicorp/sethvargo/update_hashicorp
Update middleman-hashicorp
2016-09-26 18:00:51 +01:00
Seth Vargo 912b97ffa9
Update middleman-hashicorp 2016-09-26 11:33:00 -05:00
Radek Simko de03308b73
provider/aws: Make encryption in Aurora instances computed-only 2016-09-26 17:23:16 +01:00
Paul Stack fdcb3c2aa3 Update CHANGELOG.md 2016-09-26 17:17:12 +01:00
Paul Stack b1f8965da2 Merge pull request #9056 from hashicorp/b-aws-eip-assoc-refresh
provider/aws: Refresh AWS EIP association from state when not found
2016-09-26 17:16:25 +01:00
stack72 054f46b1f9
provider/aws: Refresh AWS EIP association from state when not found
Fixes #6758

We used to throw an error when this was the case - we should refresh
from state so the association can be recreated

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEIPAssociation_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/26 16:42:37 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSEIPAssociation_ -timeout 120m
=== RUN   TestAccAWSEIPAssociation_basic
--- PASS: TestAccAWSEIPAssociation_basic (272.92s)
=== RUN   TestAccAWSEIPAssociation_disappears
--- PASS: TestAccAWSEIPAssociation_disappears (119.62s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws392.559s
```
2016-09-26 16:50:51 +01:00
Paul Stack 14f5833aed Update CHANGELOG.md 2016-09-26 12:03:10 +01:00